#docker-compose配置redis集群搭建(三主三从分槽模式)
##$ 前言
- docker-compose配置redis集群.三主三从分槽模式
1.0 下载redis配置
链接:https://pan.baidu.com/s/1BFUDaI1JgENUB1NoqQbtPQ
提取码:wad1
1.1配置内容 redis.conf
port 7001
pidfile /var/run/redis.pid
timeout 60
rdbchecksum no
rdbcompression yes
loglevel notice
appendonly yes
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
maxclients 50000
maxmemory 10gb
maxmemory-policy volatile-lru
slowlog-log-slower-than 10000
slowlog-max-len 1024
hz 50
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-announce-ip 172.169.7.101
cluster-announce-port 7001
cluster-announce-bus-port 17001
2.0将压缩包内所有的配置文件放到/var/lib/docker/volumes/下
[root@xxx]# ll -h /var/lib/docker/volumes/| grep service_redis-700
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7001-conf
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7001-data
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7002-conf
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7002-data
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7003-conf
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7003-data
drwxr-xr-x 3 root root 4.0K Jul 1 2019 service_redis-7004-conf
drwxr-xr-x 3