安装:
[email protected]:/home/zsxiang# wget http://download.redis.io/releases/redis-4.0.2.tar.gz
[email protected]:/home/zsxiang# tar -zxvf redis-4.0.2.tar.gz
cd redis-4.0.2
make
make install PREFIX=/usr/local/redis-4
cd /usr/local/redis-4
./redis-server
_._
_.-``__ ‘‘-._
_.-`` `. `_. ‘‘-._ Redis 4.0.2 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ‘‘-._
( ‘ , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|‘` _.-‘| Port: 6379
| `-._ `._ / _.-‘ | PID: 7644
`-._ `-._ `-./ _.-‘ _.-‘
|`-._`-._ `-.__.-‘ _.-‘_.-‘|
| `-._`-._ _.-‘_.-‘ | http://redis.io
`-._ `-._`-.__.-‘_.-‘ _.-‘
|`-._`-._ `-.__.-‘ _.-‘_.-‘|
| `-._`-._ _.-‘_.-‘ |
`-._ `-._`-.__.-‘_.-‘ _.-‘
`-._ `-.__.-‘ _.-‘
`-._ _.-‘
`-.__.-‘
success!
cd /home/zsxiang/redis-4.0.2
cp redis.conf /usr/local/redis-4/bin
cd /usr/local/redis-4/bin
vi redis.conf
查找daemonize /daemonize
daemonize no 改成 daemonize yes
服务启动:./redis-server redis.conf
关闭:./redis-cli shutdown
客户端启动:./redis-cli 或./redis-cli -h 127.0.0.1 -p 6379
原文地址:https://www.cnblogs.com/zsxiang/p/9351102.html