centos7安装redis
centos7
#安装
yum install epel-release
yum update
yum install redis
#命令
service redis stop
service redis start
service redis status
service redis restart
#开机启动
systemctl enable redis
#禁用开机启动
systemctl disable redis
#配置密码
vi /etc/redis.conf
#查找 requirepass, 默认密码为 foobared, 将 foobared 修改为你的密码即可
#找到 bind 127.0.0.1 将其注释,否则redis只允许本机连接
#找到 protected-mode yes 将其改为:protected-mode no
重启Redis
systemctl restart redis