在Redis主从配置里怎样正确设置authkey来达成安全认证呢?
redis.conf
requirepass
requirepass
requirepassmyStrongPassword
redis-clishutdown
redis-server/path/to/redis.conf
步骤 | 操作内容 |
---|---|
1 | 编辑从服务器配置文件 |
2 | 设置 plaintext 复制 masterauth |
3 | 重启从服务器 |
redis-cli-h<从服务器IP>-p<从服务器端口>
inforeplication
master_link_status
up
通过以上步骤,就能在Redis主从配置中正确设置authkey,实现安全认证。