redis集群如何重启
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 ⑼ 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]#
本文来源:https://www.yuntue.com/post/57877.html | 云服务器网,转载请注明出处!