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

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM