命令行删除slave节点
./redis-cli -a 1111111 -h 192.168.0.110 -p 6000 --cluster del-node 192.168.0.10:6000 97c76add58386f7d592c774347651ec34651283c
命令行查看集群节点信息
redis-cli -h 192.168.0.110 -p 6000 -a 111111 cluster nodes
创建集群
./redis-cli -a 11111111--cluster create 192.168.0.104:6010 192.168.0.104:6011 192.168.0.104:6012 192.168.0.104:6013 192.168.0.104:6014 192.168.0.104:6015
redis有效配置文件,一定要确保配置文件所列出的目录是存在的,否则会启动失败或者无法建立集群
protected-mode yes port 6010 tcp-backlog 511 timeout 0 tcp-keepalive 300 pidfile "/var/run/redis_6010.pid" loglevel notice databases 16 always-show-logo no set-proc-title yes proc-title-template "{title} {listen-addr} {server-mode}" stop-writes-on-bgsave-error yes rdbcompression yes rdbchecksum yes rdb-del-sync-files no replica-serve-stale-data yes replica-read-only yes repl-diskless-sync no repl-diskless-sync-delay 5 repl-diskless-load disabled repl-disable-tcp-nodelay no replica-priority 100 acllog-max-len 128 lazyfree-lazy-eviction no lazyfree-lazy-expire no lazyfree-lazy-server-del no replica-lazy-flush no lazyfree-lazy-user-del no lazyfree-lazy-user-flush no oom-score-adj no oom-score-adj-values 0 200 800 disable-thp yes appendonly no appendfilename "appendonly.aof" appendfsync everysec no-appendfsync-on-rewrite no auto-aof-rewrite-percentage 100 auto-aof-rewrite-min-size 64mb aof-load-truncated yes aof-use-rdb-preamble yes lua-time-limit 5000 slowlog-log-slower-than 10000 slowlog-max-len 128 latency-monitor-threshold 0 notify-keyspace-events Ex hash-max-ziplist-entries 512 hash-max-ziplist-value 64 list-max-ziplist-size -2 list-compress-depth 0 set-max-intset-entries 512 zset-max-ziplist-entries 128 zset-max-ziplist-value 64 hll-sparse-max-bytes 3000 stream-node-max-bytes 4kb stream-node-max-entries 100 activerehashing yes client-output-buffer-limit normal 0 0 0 client-output-buffer-limit replica 256mb 64mb 60 client-output-buffer-limit pubsub 32mb 8mb 60 hz 10 dynamic-hz yes aof-rewrite-incremental-fsync yes rdb-save-incremental-fsync yes jemalloc-bg-thread yes daemonize yes logfile "/var/log/6010-cluster.log" dir "/u01/redis-cluster/data/6010" cluster-enabled yes dbfilename "6010-dump.rdb" masterauth "11111111" requirepass "11111111" save 3600 1 save 300 100 save 60 10000 user default on #8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92 ~* &* +@all bind 192.168.0.104
标签:语句,0.104,no,max,管理,redis,192.168,yes From: https://www.cnblogs.com/mjxi/p/18552858