“Redis6 cluster”的版本间的差异

来自linux中国网wiki
跳到导航 跳到搜索
第56行: 第56行:
 
=References=
 
=References=
 
[https://juejin.cn/post/6923005017846710285  redis6.09 集群安装(docker-compose) ]
 
[https://juejin.cn/post/6923005017846710285  redis6.09 集群安装(docker-compose) ]
 +
 +
 +
[https://www.jianshu.com/p/9b0fcd2c4759 redis6.09 集群安装(docker-compose)]
  
 
[[category:ops]] [[category:redis]]
 
[[category:ops]] [[category:redis]]

2021年9月29日 (三) 07:12的版本

单机版本

# tree .
.
├── co
├── conf
│   └── redis-6379.conf
├── data
├── docker-compose.yml
├── docker-compose.ymlbak
└── log


 cat docker-compose.yml
version: "3"
services: 
    redis-cluster-6379:
        image: ccr.ccs.tencentyun.com/evan/devops:redis-alpine-v6.2.5
        container_name: node-6379
        ports:
            - "6379:6379"
        restart: always
        #network_mode: host
        #network_mode: host
        environment:
          # 设置环境变量 时区上海 编码UTF-8
          TZ: Asia/Shanghai
          LANG: en_US.UTF-8
        volumes:
            - ./conf/redis-6379.conf:/usr/local/etc/redis/redis.conf
            - ./log:/var/log/redis
            - ./data:/data/redis
        command: sh -c "redis-server /usr/local/etc/redis/redis.conf"


# cat conf/redis-6379.conf 
port 6379
bind 0.0.0.0
#bind 192.168.10.120 127.0.0.1
#cluster-enabled yes
appendfilename "appendonly-6379.aof"
#cluster-node-timeout 15000
appendonly yes
appendfsync everysec
#daemonize yes
dbfilename dump_6379.rdb
requirepass "evandfsaffmhw3xd34"

conf  data log 目录要自己创建 

See also

Redis5 cluster

References

redis6.09 集群安装(docker-compose)


redis6.09 集群安装(docker-compose)