Redis集群启动脚本

释放双眼,带上耳机,听听看~!

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

Redis集群启动脚本

如果在window下编写,建议使用Notepad++保存为UNIX格式

给TA打赏
共{{data.count}}人
人已打赏
安全运维

OpenSSH-8.7p1离线升级修复安全漏洞

2021-10-23 10:13:25

安全运维

设计模式的设计原则

2021-12-12 17:36:11

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索