集群配置需要的文件

配置机器1

在演示中,172.16.179.130为当前ubuntu机器的ip
在172.16.179.130上进⼊Desktop⽬录,创建conf⽬录

在conf⽬录下创建⽂件7000.conf,编辑内容如下

port 7000
bind 172.16.179.130
daemonize yes
pidfile 7000.pid
cluster-enabled yes
cluster-config-file 7000_node.conf
cluster-node-timeout 15000
appendonly yes

在conf⽬录下创建⽂件7001.conf,编辑内容如下

port 7001
bind 172.16.179.130
daemonize yes
pidfile 7001.pid
cluster-enabled yes
cluster-config-file 7001_node.conf
cluster-node-timeout 15000
appendonly yes

在conf⽬录下创建⽂件7002.conf,编辑内容如下

port 7002
bind 172.16.179.130
daemonize yes
pidfile 7002.pid
cluster-enabled yes
cluster-config-file 7002_node.conf
cluster-node-timeout 15000
appendonly yes

总结:三个⽂件的配置区别在port、pidfile、cluster-config-file三项

使⽤配置⽂件启动redis服务

redis-server 7000.conf
redis-server 7001.conf
redis-server 7002.conf

配置机器2

在演示中,172.16.179.131为当前ubuntu机器的ip
在172.16.179.131上进⼊Desktop⽬录,创建conf⽬录

在conf⽬录下创建⽂件7003.conf,编辑内容如下

port 7003
bind 172.16.179.131
daemonize yes
pidfile 7003.pid
cluster-enabled yes
cluster-config-file 7003_node.conf
cluster-node-timeout 15000
appendonly yes

在conf⽬录下创建⽂件7004.conf,编辑内容如下

port 7004
bind 172.16.179.131
daemonize yes
pidfile 7004.pid
cluster-enabled yes
cluster-config-file 7004_node.conf
cluster-node-timeout 15000
appendonly yes

在conf⽬录下创建⽂件7005.conf,编辑内容如下

port 7005
bind 172.16.179.131
daemonize yes
pidfile 7005.pid
cluster-enabled yes
cluster-config-file 7005_node.conf
cluster-node-timeout 15000
appendonly yes

总结:三个⽂件的配置区别在port、pidfile、cluster-config-file三项

使⽤配置⽂件启动redis服务

redis-server 7003.conf
redis-server 7004.conf
redis-server 7005.conf
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值