1、 Redis installation configuration


One way

  1. Official website copy and download address: http://download.redis.io/releases/redis-5.0.7.tar.gz
  2. Download on liunx: WGet http://download.redis.io/releases/redis-5.0.7.tar.gz
  3. Extract the file to the specified directory: tar – XF redis-5.0.7.tar.gz
  4. Installation viewing document (available for all Linux packages): readme.md=>Search install

    Step: A. execute in the redis Directory: make = = > error message to check whether to install C: Yum install GCC

    b. If the dependency is installed and then the make error is reported, the cache will be cleaned up: make destclean

    c. The startup commands are placed uniformly. The production does not use the source code to start: make prefix = / opt / bigdata / redis5 install. At this time, the startup commands can be executed under opt / bigdata / redis5 / bin.

    d. Configure service command and start up:

    1. Configure global variables: CD / etc / Profile:

    export REDIS_HOME=/opt/bigdata/redis5

    export PATH=$PATH:$REDIS_HOME/bin

    2. Refresh configuration: source / etc / profile

    3. Open service: CD utils/

    . / install_server. Sh = = > select port 6379.. = = >You can start multiple

    1. Restart service: service redis? Restart view status: service redis? Status
**Netstat - NATP view network port connection**

Use conf to start in the background:

1. Modify the setting of redis.conf to start in the background: VIM redis.conf daemonize yes = = > daemonizeNo foreground run / yes background start

2. Execute under the file directory: Src / redis-server redis.conf

3. Close the process started by redis: PS – ef|grep redis kill – 9 redis

Recommended Today

PHP Basics – String Array Operations

In our daily work, we often need to deal with some strings or arrays. Today, we have time to sort them out String operation <?php //String truncation $str = ‘Hello World!’ Substr ($STR, 0,5); // return ‘hello’ //Chinese string truncation $STR = ‘Hello, Shenzhen’; $result = mb_ Substr ($STR, 0,2); // Hello //First occurrence of […]