Redis Cluster builds Ubuntu

Source: Internet
Author: User
Tags redis port number redis cluster install redis
Next, easy to build Redis. First, install your Ruby environment under Linux. Create a cluster folder. Mkdir-p rediscluster/7000/copy redis/redis.conf and redis/src/redis-server to 7000 directory to modify redis.conf configuration
Daemonize    Yes                          //redis background run
pidfile  /var/run/redis_7000.pid    //pidfile file corresponds to 7000
port  7000                                  //Port 7000
cluster-enabled  Yes                    //Open cluster  Note # remove
cluster-config-file  nodes.conf      //Cluster configuration profile for the  first time start auto
generate  cluster-node-timeout      //Request Timeout  setting 5 seconds enough
appendonly  Yes                        //aof log  on when needed to open, it will log each write operation logs

I am going to build 8 Services 4 Master 4 from. Copy 7000, to 7001.. 7007. and modify whether the port test is valid. CD 7000 Redis-server redis.conf ps-ef | grep Redis If there is an interface stating that your configuration is successful if the discovery service is turned on correctly. Next you can build a clustered environment. Turn on the remaining six 7001--7007 services. Make sure all is on. The cluster will not be enabled until the service is turned on. Run the following command (switch to your own IP and port number)
(in the redis/src/directory)
. /REDIS.TRIB.RB Create--Replicas 1  192.168.xxx.130:7000 192.168.xxx.130:7001 192.168.xxx.130:7002 192.168. xxx.130:7003 192.168.xxx.130:7004 192.168.xxx.130:7005 192.168.xxx.130:7006 192.168.xxx.130:7007
If reported: <span style= "font-family: ' Times New Roman '; font-size:14px; line-height:26px; Background-color:rgb (255, 255, 255); " >/usr/bin/env:ruby:no such file or directory  to indicate that your server lacks a ruby environment, install Apt-get installed ruby     and install  Apt-get Inst All rubygems-integration  last gem install redis</span>
<span style= "font-family: ' Times New Roman '; font-size:14px; line-height:26px; Background-color: RGB (255, 255, 255); " > re-execute 12th order. </SPAN> 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.