1.下載yum源 yum install epel-release
2.安裝redis
3.啓動redis
yum installredis # 啓動redis
service redis start
# 中止redis
service redis stop
# 查看redis運行狀態
service redis status
# 查看redis進程
ps
-ef |
grep
redis
# 進入本機redis
redis-cli
# 列出全部key
keys *
# 打開redis配置文件
html
vi
/etc/redis
.conf
redis
# 找到 bind 127.0.0.1 將其註釋
bash
# 找到 protected-mode yes 將其改成
spa
protected-mode no
rest
7.重啓redis服務code
systemctl restart redis.servicehtm
原文出處:https://www.cnblogs.com/jin-nuo/p/11997477.htmlblog