篇首语:本文由编程笔记#自由互联小编为大家整理,主要介绍了redis初步认识五相关的知识,希望对你有一定的参考价值。1.发布订阅2.主 篇首语:本文由编程笔记#自由互联小编为大家
篇首语:本文由编程笔记#自由互联小编为大家整理,主要介绍了redis 初步认识五相关的知识,希望对你有一定的参考价值。
1.发布订阅2.主从配置参考:https://www.runoob.com/redis/redis-conf.html一 发布订阅cmd打开另一个窗口redis-cli.exesubscribe channel1cmd打开另一个窗口redis-cli.exepublish channel1 aaaa
主:6379 从 6380。PS: 从默认只能读,不能写
复制6379一份,修改配置:
port 6380slaveof 127.0.0.1 6379 配置主ip 和 端口masterauth 123456 如果主有密码,配置密码
