- Downloading the Installation package
Redis. IO/download
- Unpack the
Decompressed in the /opt directory. 3. Install the basic operating environment
Sudo apt-get install GCC g++
- Make installation
make
make install
Copy the code
- 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
- 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
- Run redis
/usr/local/bin: redis-server myredisconfig/redis.conf
Copy the code
- test
redis-cli -p 6379
ps -ef|grep redis
Copy the code
Ping after successful access
- 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