redis在线加密

1、redis修改密码: 注意两个都得修改
redis-cli -p redis-port
>>config set requirepass password
>>config set masterauth password

##查看密码是否修改成功
>>auth password
>>config get requirepass  
>>config get masterauth 

2、redis哨兵修改密码
redis-cli -p sentinel-port
>>info
通过info查看哨兵名称master-name
>>sentinel set  master-name auth-pass password

查看哨兵配置信息密码是否写入
cat  sentinel.conf

3、redis密码写入到配置文件中

echo "requirepass password" >> redis.conf
echo "masterauth password"  >> redis.conf

4、检查redis状态
redis-cli -p redis-port -a password info replication 检查redis的主从复制

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28686045/viewspace-2156044/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/28686045/viewspace-2156044/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值