Redis cluster cluster setup steps and Considerations

Source: Internet
Author: User
Tags download redis redis cluster install redis

1, install Ubuntu, change the root password. sudo passwd (apt-get update System)

2. Install GCC and g++ sudo apt-get install build-essential3. Download RedisWget http://download.redis.io/releases/redis-3.2.3.tar.gz4, unzip tar-xvf redis-3.0.2.tar.gz5, enter redis-3.0.2, executeMake compile source codeEntersrcDirectoryMake Install installation(This may not be compiled later, you can not pay attention to) 6, enter USR below to establish a folder mkdir Redis (rm-r/tmp/test.txt Delete folder) CP Copy File 7, modify the redis.conf configuration file (daemonize if necessary in the background operation, change the item to Yes),(This node must be, in the virtual machine) bind address, it is best not to bind 127 seemingly clustered when the time is not possible, directly bound to the current IP address. Minimum configuration for Cluster
Port 6379
cluster-enabled Yes cluster-config-file nodes.conf cluster-node-timeout AppendOnly Yes Note: If a machine opens a few redis, such as: Open two Redis in 192.168.0.1, then create two redis.conf files and folders, redis1/redis.conf, redis2/redis.conf and when you start Redis, you must launch it in the Redis.conf folder (for example: Go to the Redis1 folder to start Redis, Enter the Redis2 folder to start Redis), or the cluster will not be used.  
8, the configuration of Ubuntu IP address needs to be configured, or Apt-get update can not be used (restart the network: sudo/etc/init.d/networking restart. To
    1. # The Primary network Interfacea
    2. Auto Eth0
    3. Iface eth0 inet Static
    4. Address 192.168.2.170
    5. Netmask 255.255.255.0
    6. Broadcast 192.168.2.255
    7. Gateway 192.168.2.1
    8. Dns-nameservers 192.168.2.1
9. Install all Ruby, ruby Apt-get install Ruby-full 10, Ruby Redis interface does not install sudo gem install Redis11,//must add./otherwise cannot find the method "do not use the 127 IP address, this will cause the address can not be found"method of Installation:./REDIS-TRIB.RBCreate--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
Here are some of the necessary configuration and possible commands to use:Ps-ef | grep redis view run statussudo netstat-tunpl | grep 6379 to see if the port number is occupiedsudo/etc/init.d/networking Restart the command to restart the NIC--Configure the network

Modify the local network: Virtual machine settings Network complete OK, start the virtual machine, open Network and Sharing Center-local connection-Properties-Internet Protocol IPV4,

Configure the virtual machine IP address (as shown in 4.4-3, typically the same as the host network segment) according to the local network IP rules.

Enclosed is a more detailed plan: http://greemranqq.iteye.com/blog/2229640

Redis cluster cluster setup steps and Considerations

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.