redis集群重啟的示例:
1.查看所有redis進程:
[root@i-netlrktd ~]# ps -ef|grep redis
root 1477 1 0 Aug09 ? 00:02:06 redis-server *:6371 [cluster]
root 1481 1 0 Aug09 ? 00:02:05 redis-server *:6372 [cluster]
root 1489 1 0 Aug09 ? 00:02:03 redis-server *:6373 [cluster]
root 1493 1 0 Aug09 ? 00:01:56 redis-server *:6374 [cluster]
root 1497 1 0 Aug09 ? 00:01:54 redis-server *:6375 [cluster]
root 1505 1 0 Aug09 ? 00:01:54 redis-server *:6376 [cluster]
root 25131 25105 0 09:37 pts/0 00:00:00 grep redis
[root@i-netlrktd ~]#
2.關閉redis進程:
kill 掉所有redis進程 kill -9 1477
3.重啟redis節點,逐個啟動:
[root@i-netlrktd cluster]# redis-server 01/redis.conf
[root@i-netlrktd cluster]# redis-server 02/redis.conf
[root@i-netlrktd cluster]# redis-server 03/redis.conf
[root@i-netlrktd cluster]# redis-server 04/redis.conf
[root@i-netlrktd cluster]# redis-server 05/redis.conf
[root@i-netlrktd cluster]# redis-server 06/redis.conf
[root@i-netlrktd cluster]#
[root@i-netlrktd cluster]#
[root@i-netlrktd cluster]# ps -ef|grep redis
root 25254 1 0 09:42 ? 00:00:00 redis-server *:6371 [cluster]
root 25262 1 0 09:42 ? 00:00:00 redis-server *:6372 [cluster]
root 25266 1 0 09:43 ? 00:00:00 redis-server *:6373 [cluster]
root 25274 1 0 09:43 ? 00:00:00 redis-server *:6374 [cluster]
root 25278 1 0 09:43 ? 00:00:00 redis-server *:6375 [cluster]
root 25282 1 0 09:43 ? 00:00:00 redis-server *:6376 [cluster]
root 25294 25105 0 09:43 pts/0 00:00:00 grep redis
[root@i-netlrktd cluster]#