https://github.com/redisson/redisson
redisson:3.15.2
- doc包括redis多种模式的配置文件
docker run -d --name redis -p 6300:6379 redis:5.0 --requirepass "123456"
SkyRedisApplication,启动single环境
| 服务器IP | 端口 | 备注 |
|---|---|---|
| 172.100.0.11 | 6379 | 主 |
| 172.100.0.12 | 6379 | 从 |
| 172.100.0.13 | 6379 | 从 |
| 172.100.0.14 | 6379 | 从 |
- 在doc目录中1master3slave中修改磁盘路径
2.在1master3slave修改redis-s.conf中的slaveof 改成本地地址
3.然后在1master3slave中执行docker-compose
SkyRedisApplication,启动masterslave环境
| 服务器IP | 端口 | 备注 |
|---|---|---|
| 172.100.0.11 | 6379 | 主 |
| 172.100.0.12 | 6379 | 从 |
| 172.100.0.13 | 6379 | 从 |
| 172.100.0.14 | 6379 | 从 |
| 172.100.0.15 | 26379 | 哨兵 |
| 172.100.0.16 | 26379 | 哨兵 |
| 172.100.0.17 | 26379 | 哨兵 |
docker run -itd --name test1 --network 1master3slave3sentinal_extnetwork --ip 172.100.0.10 centos:7 /bin/bash
docker commit test1 centos-ssh:1
docker run -it --name centos7ssh --network 1master3slave3sentinal_extnetwork --ip 172.100.0.19 -p 6000:22 centos-ssh:1 /usr/sbin/sshd -D
docker run -it --name centos7sshc --network cluster_extnetwork --ip 172.100.0.09 -p 6000:22 centos-ssh:1 /usr/sbin/sshd -D
1:S 09 May 2021 09:56:47.658 * Master replied to PING, replication can continue...
1:S 09 May 2021 09:56:47.658 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
1:S 09 May 2021 09:56:47.658 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.
1:S 09 May 2021 09:56:47.658 * Partial resynchronization not possible (no cached master)
1:S 09 May 2021 09:56:47.658 # Unexpected reply to PSYNC from master: -NOAUTH Authentication required.
1:S 09 May 2021 09:56:47.658 * Retrying with SYNC...
1:S 09 May 2021 09:56:47.658 # MASTER aborted replication with an error: NOAUTH Authentication required.
1:S 09 May 2021 09:56:48.660 * Connecting to MASTER 172.100.0.12:6379
1:S 09 May 2021 09:56:48.660 * MASTER <-> REPLICA sync started
1:S 09 May 2021 09:56:48.660 * Non blocking connect for SYNC fired the event.
1:S 09 May 2021 09:56:48.660 * Master replied to PING, replication can continue...
1:S 09 May 2021 09:56:48.661 * (Non critical) Master does not understand REPLCONF listening-port: -NOAUTH Authentication required.
1:S 09 May 2021 09:56:48.661 * (Non critical) Master does not understand REPLCONF capa: -NOAUTH Authentication required.