标签:指令 ddd 5.x rip tom page desc col prot
redis-6379.conf | redis-6380.conf | redis-6381.conf |
---|---|---|
port 6379 | port 6380 | port 6381 |
daemonize yes | daemonize yes | daemonize yes |
logfile "6379.log" | logfile "6380.log" | logfile "6381.log" |
dbfilename dump-6379.rdb | dbfilename dump-6380.rdb | dbfilename dump-6381.rdb |
pidfile /var/run/redis_6379.pid | pidfile /var/run/redis_6380.pid | pidfile /var/run/redis_6381.pid |
protected-mode no | protected-mode no | protected-mode no |
replicaof IP 6379 | replicaof IP 6379 |
并把bind 127.0.0.1全部注释掉,不然外网无法访问。
5.这样以6379端口的实例为主节点,两个从节点的redis集群就搭建好了
注意: 默认主节点可读可写,从节点的数据是只读的。
标签:指令 ddd 5.x rip tom page desc col prot
原文地址:https://www.cnblogs.com/2YSP/p/10068287.html