Skip to content

Commit

Permalink
redis_cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
opcache committed Mar 21, 2020
1 parent 242e925 commit 21adff9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions redis/redis_cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
```
bash redis.sh install
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster1.png)
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster2.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster1.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster2.png)

- 初始化配置
```
Expand All @@ -16,7 +16,7 @@ bash redis.sh init 30021 30026 192.168.56.101
或者
curl -s https://gitee.com/aqztcom/kjyw/raw/master/redis/redis_cluster/redis.sh | sh -s init
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster3.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster3.png)

- 启动redis进程
```
Expand All @@ -25,32 +25,32 @@ bash redis.sh start 30021 30026 192.168.56.101
或者
curl -s https://gitee.com/aqztcom/kjyw/raw/master/redis/redis_cluster/redis.sh | sh -s start
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster4.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster4.png)

- 创建redis cluster集群
```
/opt/redis/bin/redis-trib.rb create --replicas 1 192.168.56.101:30021 192.168.56.101:30022 192.168.56.101:30023 192.168.56.101:30024 192.168.56.101:30025 192.168.56.101:30026
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster5.png)
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster6.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster5.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster6.png)

- 检查redis cluster集群状态
```
/opt/redis/bin/redis-cli -c -h 192.168.56.101 -p 30021 -a test20200316 cluster nodes
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster7.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster7.png)

- 停止redis集群
```
bash redis.sh stop 30021 30026 192.168.56.101
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster8.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster8.png)

- 卸载redis集群配置
```
bash redis.sh uninstall
```
![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/redis_cluster9.png)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/redis_cluster9.png)



Expand All @@ -62,7 +62,7 @@ bash redis.sh uninstall

## 微信关注

![image](https://raw.githubusercontent.com/aqzt/kjyw/master/images/aqzt.jpg)
![image](https://gitee.com/aqztcom/kjyw/raw/master/images/aqzt.jpg)

- 运维就是踩坑,踩坑的最高境界就是:踩遍所有的坑,让别人无坑可踩!
- 做事的宗旨是:一条命令的事,一个脚本的事!
Expand Down

0 comments on commit 21adff9

Please sign in to comment.