$sudo apt-get update
$sudo apt-get install redis-server
1.启动redis服务
$sudo /etc/init.d/redis-server restart
$sudo service redis-server restart
2.连接redis
$ redis-cli -h 127.0.0.1 -p 6379
$sudo apt-get update
$sudo apt-get install redis-server
1.启动redis服务
$sudo /etc/init.d/redis-server restart
$sudo service redis-server restart
2.连接redis
$ redis-cli -h 127.0.0.1 -p 6379
转载于:https://www.cnblogs.com/baby123/p/6490287.html