-----------第一部分 安裝redis-----------
1.yum添加epel源
yum install epel-release
2.安裝redis
yum install redis
3.Redis 服務端配置
Could not connect to Redis at 127.0.0.1:6379: Connection refused
vim /etc/redis.conf
:set number(顯示行號)
找到redis.conf 並修改 daemonize no(第128行) 為 daemonize yes
4.開啟客戶端要確保服務端啟動
redis-server /etc/redis.conf
5. 查看版本
redis-server -v
6.后台啟動
redis-server /etc/redis.conf &
7.測試啟動 redis-cli ping 返回PONG,啟動成功。
redis-cli ping
PONG
使用redis-cli 進行連接
-----------第二部分 開機啟動-----------
執行命令
chkconfig redis on