1. Downloading the Installation package

Redis. IO/download

  1. Unpack the

Decompressed in the /opt directory. 3. Install the basic operating environment

Sudo apt-get install GCC g++

  1. Make installation
make 
make install
Copy the code
  1. Copy redis.conf to the /usr/local/bin directory (the default redis installation path)
cd /usr/local/bin
mkdir myredisconfig
cp ~/opt/redis-6.22./redis.conf myredisconfig
Copy the code
  1. Modify the redis.conf configuration file

Redis is not started in the background by default. You need to modify the configuration file

Sudo vi redis.conf change daemonize no to yesCopy the code
  1. Run redis
/usr/local/bin: redis-server myredisconfig/redis.conf 
Copy the code
  1. test
redis-cli -p 6379
ps -ef|grep redis
Copy the code

Ping after successful access

  1. exit

ERR Errors trying to SHUTDOWN. Check logs.

line@line-PC:/usr/local/bin$ redis-cli -p 6379
127.0. 01.:6379> shutdown
127.0. 01.:6379> exit
Copy the code