Redis集群搭建
1、版本
5.0.5
2、配置文件
提前创建好需要的目录
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
bind 127.0.0.1
port 6399
requirepass ""
daemonize yes
pidfile /data/redis/redis-5.0.8/log/redis_6399.pid
cluster-enabled yes
cluster-node-timeout 15000
loglevel notice
logfile /data/redis/redis-5.0.8/log/redis_6399.log
save 900 1
save 300 10
save 60 10000
dbfilename dump_6399.rdb
dir /data/redis/redis-5.0.8/dbfile/
cluster-config-file /data/redis/redis-5.0.8/conf/nodes-6399.conf
cluster-slave-validity-factor 10
cluster-migration-barrier 1
cluster-require-full-coverage no
3、复制六份端口号不同
启动:
./redis-server ../****.conf
4、集群搭建
./redis-cli --cluster create 127.0.0.1:6399 127.0.0.1:6400 127.0.0.1:6401 127.0.0.1:6402 127.0.0.1:6403 127.0.0.1:6404 --cluster-replicas 1
文章目录
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。