centos7 yum安装配置redis 并设置密码

centos7 yum安装配置redis 并设置密码

 

1.设置Redis的仓库地址

yum install epel-release

2.安装redis

yum install redis

  修改配置文件,监听所有的IP地址

vim   /etc/redis.conf
找到下面这一行

bind 127.0.0.1
注释掉

#bind 127.0.0.1

3.启动redis,到此完成

service redis start  

 

如果需要设置开机自动启动

chkconfig redis on






另外:

如果需要redis配置认证密码

1.通过配置文件进行配置
yum方式安装的redis配置文件通常在/etc/redis.conf中,打开配置文件找到

#requirepass foobared 

去掉行前的注释,并修改密码为所需的密码,保存文件

requirepass youpwd

 

重启redis完成






 参考文章

安装

http://blog.csdn.net/sfeng95/article/details/62887701?locationNum=7&fps=1

 

设置密码

http://blog.csdn.net/zyz511919766/article/details/42268219

 

 

posted @ 2017-03-28 17:14  fanlinglong  阅读(23069)  评论(0编辑  收藏  举报