openEuler欧拉部署Redis.240108
一、系统优化
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
关闭selinux
sed -ri 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
setenforce 0
二、安装Redis
dnf -y install redis
vim /etc/redis.conf
#bind 127.0.0.1
bind 0.0.0.0
protected-mode no
requirepass password 
bind 127.0.0.1 #默认只允许本机访问,如果需要开放外网,则注释掉这行,新增0.0.0.0
protected-mode yes #保护模式,如果需要开放外网,则改为 no
port 6379 #可修改端口
requirepass password #登录密码,改配置默认是注释的,放开之后在登录时需要使用如下方式登录
三、测试Redis
redis-cli -p 6379
127.0.0.1:6379> ping
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth password
OK
127.0.0.1:6379> ping
PONG
喜欢请赞赏一下啦^_^赞赏后请加wx:weyocul,相关文章提到的的安装包稍后给到哦!没有收到赞赏直接加我的,直接无视哈!
 
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号