Linux installation configuration Redis and Redis cluster

Source: Internet
Author: User
Tags redis cluster

First, you need to install GCC before installing Redis:Yum Install GCC-c++. 1, download the Redis source package2, upload the source package to the Linux server3, unzip the source package:Tar-ZVXF redis-3.0.0-Tar. GZ4, Make5, Makeinstallprefix=/usr/local/Redis: Specify the installation directory so you can. Next, Redis starts up in two categories:1, front-end startup mode/usr/local/redis/bin/redis-servce default is front-end boot, port is6379 2, the back-end boot mode copies redis.conf from the Redis source directory to the Redis installation directory to modify the configuration file to Yes boot./redis-The server redis.conf uses the command:./redis-The CLI starts using Redis to build a Redis cluster: because there is no condition, it is built on a server. Cluster has three nodes in the cluster, each node has a set of one standby, requires 6 virtual machines. Build a pseudo-distributed cluster, using 6 Redis instances to simulate. The environment required to build a cluster: Building a cluster requires the use of an official Ruby script. environments where Ruby needs to be installed: a)Yum InstallRuby: Installing RUBYB)Yum InstallRubyGems: Install the Package Manager to Redis source package and Ruby package-3.0.0. Gem uploads to a Linux server and installs Ruby's package: GemInstallredis-3.0.0. Gem Cluster Build: First step: Create 6 Redis instances, port number from 7001-7006Second part: Modify redis.conf, each instance will be modified redis.conf step three: Cluster-enabled Yes opens, previously commented. Fourth step: Start 6 Redis Instances and write a script file to start and close 6 Redis instances. Fifth step: Create a cluster:/REDIS-TRIB.RB Create--replicas1 192.168.127.128:7001 192.168.127.128:7002 192.168.127.128:7003 192.168.127.128:7004 192.168.127.128:7005  192.168.127.128:7006Sixth step: Test the cluster. Using the command redis01/redis-cli-h192.168.127.128-P7002-C operation of the Redis cluster.

http://blog.csdn.net/tomoto_zh/article/details/52820119

Linux installation configuration Redis and Redis cluster

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.