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