Redis installation under linux system

Download the redis compressed package

wget http://download.redis.io/releases/redis-4.0.8.tar.gz

 Unzip

tar xzvf redis-4.0.8.tar.gz

 installation

  cd redis-4.0.8

  make

  cd src

  make install PREFIX=/usr/local/redis

 Configuration file directory

  mkdir /usr/local/redis/etc

  mv redis.conf /usr/local/redis/etc

 

Configure redis to start in the background

  vi /usr/local/redis/etc/redis.conf // Change daemonize no  to daemonize yes

Add redis to boot

  vi /etc/rc.local //Add content to it: /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf (meaning that the command to start redis is called at boot)

Open redis

  /usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf 

Configure the redis-cli command as a global variable

cp src/redis-cli /usr/local/bin/

Guess you like

Origin blog.csdn.net/Growing_hacker/article/details/102662629