释放双眼,带上耳机,听听看~!
redis版本:redis-5.0.0
Centos: centos 7 64位
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 1#!/bin/bash
2redis_path="/usr/local/cluster/"
3cluster_num=`ps aux | grep redis | wc -l`
4if [ "${cluster_num}" -le 0 ]
5then
6 echo -e "===== Success: Has killed all cluster progress."
7else
8 pkill -9 redis
9fi
10
11cd ${redis_path}
12rm -rf ${redis_path}700*/appendonly.aof
13rm -rf ${redis_path}700*/dump.rdb
14rm -rf ${redis_path}700*/nodes*
15rm -rf ${redis_path}nodes*
16rm -rf ${redis_path}appendonly.aof
17cd /usr/local/cluster/7000/
18redis-server /usr/local/cluster/7000/redis.conf
19cd /usr/local/cluster/7001/
20redis-server /usr/local/cluster/7001/redis.conf
21cd /usr/local/cluster/7002/
22redis-server /usr/local/cluster/7002/redis.conf
23cd /usr/local/cluster/7003/
24redis-server /usr/local/cluster/7003/redis.conf
25cd /usr/local/cluster/7004/
26redis-server /usr/local/cluster/7004/redis.conf
27cd /usr/local/cluster/7005/
28redis-server /usr/local/cluster/7005/redis.conf
29
30
31