Redis Cluster builds Ubuntu

Source: Internet
Author: User
Tags redis port number redis cluster install redis
After a, simple to build Redis. First, install your Ruby environment under Linux. Create a clustered folder. Mkdir-p rediscluster/7000/replication 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  take note # to remove
cluster-config-file  nodes.conf      //Cluster configuration Profile  first start automatic generation
cluster-node-timeout  5000      //Request Timeout  set 5 seconds.
appendonly  Yes                        //aof log open  if necessary, it will record a log every time the write operation

I'm going to build 8 Services 4 main 4 from. Copy 7000, to 7001. 7007. and modify 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 properly, then you can build the cluster environment. Open the remaining six services in 7001--7007. Make sure all is turned on. Because the service can be clustered after it is opened. Run the following command (replace your own IP and port number)
(under 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 the newspaper: <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  indicates that your server lacks a ruby environment, install Apt-get install ruby     also installs  Apt-get Inst All rubygems-integration the  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 the 12th command. </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.