redis的集群搭建
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
創(chuàng)建7000 7001 7002 7003 7004 7005六個(gè)節(jié)點(diǎn)文件夾
創(chuàng)建redis.conf文件內(nèi)容如下
port 7000 不同文件夾改成對應(yīng)的端口
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
daemonize yee? ? ?
./redis.server redis.conf 啟動(dòng)6個(gè)節(jié)點(diǎn)
下載安裝ruby
tar? -zxvf? ..ruby-2.4.2.tar.gz?
?./configure? --prefix=/usr/local/ruby?
make&&make? install? ?
cp? ruby? /usr/bin??
下載安裝rubygems
?yum install rubygems
?gem install redis
啟動(dòng)節(jié)點(diǎn),創(chuàng)建集群
./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 ?127.0.0.1:7004 127.0.0.1:7005
查看節(jié)點(diǎn)狀態(tài)
redis-cli -p 7000 cluster nodes
?
?
轉(zhuǎn)載于:https://my.oschina.net/u/136848/blog/1588614
總結(jié)
以上是生活随笔為你收集整理的redis的集群搭建的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android之LinearLayout
- 下一篇: PostgreSQL索引页