1.yum添加epel源html
yum install epel-release
2.安裝yum
yum install redis
3.Redis 服務端配置——Could not connect to Redis at 127.0.0.1:6379: Connection refused
vim /etc/redis.confjava
找到redis.conf 並修改 daemonize no(第128行) 爲 daemonize yes redis
:set number(顯示行號)vim
. 4.開啓客戶端要確保服務端啓動 post
redis-server /etc/redis.conf測試
5.redis-server -v 查看版本code
redis-server /etc/redis.conf 啓動server
redis-cli ping
PONGhtm
測試啓動 redis-cli ping 返回PONG,啓動成功。blog
redis-cli 連接