Redis Cluster setup in Linux

Source: Internet
Author: User
Tags redis cluster

Look at more books, if not practice once, I feel that the effect is not good, only after the full of their own to do!

So today is going to build a redis cluster to practice practiced hand ~!

1.Linux CentOS, redis-3.2.4 version

2. Configure the environment for Linux virtual Machines 2 units,

3. Each Linux system is configured with 3 nodes, 3 master 3 from

    

OK, start building, concrete steps I will, finish the whole process to write down all the steps!

1. Create a folder to hold the downloaded Redis installation package

   

2. Go to the file to download

   

3. Download the package for decompression

TAR-ZXVF redis-3.2.4

4. Because the installation of Redis requires GCC. My virtual machine is newly installed, all to install the GCC environment first, you can use the following command to see if you need to install GCC

   

5. Start installing GCC

Yum Install GCC

   

6. Enter the redis-3.2.4 directory to compile

Make && make install

   

Compilation succeeded

7. Copy the REDIS-TRIB.RB to the/usr/local/bin directory

  

8. Create the cluster node directory under the redis3.2.4 directory cluster and then create 3 nodes inside the directory 7003 7004 7005

8. Copy the redis.conf to these three directories

  

9. Start modifying the redis.conf configuration file

Vim 7003/redis.conf (the bottom of the picture is someone else's blog, the younger brother borrowed it)

Modify the following properties to

10. Modification Complete Start

 

11. See if the startup is successful

Ps-ef|grep Redis

 

Netstat-tnle|grep Redis

12. Create a cluster

Redis officially provides the REDIS-TRIB.RB tool, which is in the SRC directory of the extracted directory, which we have already copied to the/usr/local/bin directory and can be used directly on the command line. Use the following command to complete the installation.

Something went wrong. Because of the lack of ruby tools, you need to install Ruby to run the following command

    yum -y  install ruby ruby-devel rubygems rpm-build

    gem installredis

Failed to create the cluster again after installing Ruby, and cannot connect to another one. The guess should be that the port is restricted by the firewall. All direct Open ports try it (don't do it in the formal environment)

  

13. Open Firewall 7003.7004.7005

  

14. Create the cluster again

  

15.

Redis Cluster setup in Linux

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.