centos7 yum安装配置redis

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sfeng95/article/details/62887701

1.设置redis的仓库地址

yum install epel-release

2.安装redis

yum install redis

3.启动redis

service redis start  

4.设置开机自动启动

chkconfig redis on

5.打开防火墙端口

firewall-cmd --zone=public --add-port=6379/tcp --permanent

6.应用防火墙设置

firewall-cmd --reload

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

7.1查找redis.conf配置文件的位置

    whereis       redis.config  

7.2如果是在etc/redis.conf,就进入etc目录

cd  /etc

7.3修改编辑它

vi   redis.conf

7.4按i

i

7.5注释这一行

注释#127.0.0.1

7.6保存退出(按ESC,再按:号,wq!)

:wq!    

猜你喜欢

转载自blog.csdn.net/sfeng95/article/details/62887701