Centos/linux Redis cluster installation

Source: Internet
Author: User
Tags redis cluster

In this article, only the installation steps of the Redis cluster are described, and if you want to know the detailed procedure, see the following articles:

Redis Cluster _1.redis Installation

Redis cluster _2.redis master-slave configuration

Redis cluster _3.redis master-slave auto-Switch Sentinel

Redis Cluster _4.redis startup script


System environment: CentOS 6.5 Mini

Software version: redis-2.8.19

IP Address:
Node 1:192.168.100.211
Node 2:192.168.100.212
Node 3:192.168.100.213


Redis installation (three nodes)
1: Install dependent packages
# yum-y Install gcc make


2: Installation of Redis (three nodes)
Software uploaded to the/main directory
# cd/main/
# tar ZXVF redis-2.8.19.tar.gz
# MV Redis-2.8.19/redis/
# CD redis/
# make && make install


3: Modify configuration file (three nodes)
# Mkdir/main/redis/logs
# vi/main/redis/redis.conf
Daemonize Yes
LogFile "/main/redis/logs/redis.log"


4: Specify Slave (on slave node configuration)
# vi/main/redis/redis.conf
Slaveof 192.168.100.211 6379


5: Start Redis (three nodes)
#/main/redis/src/redis-server/main/redis/redis.conf


6: Specify listening Master (three nodes)
# vi/main/redis/sentinel.conf
Port 26379
Daemonize Yes
Sentinel Monitor MyMaster 192.168.100.211 6379 2
Sentinel Down-after-milliseconds MyMaster 30000
Sentinel Parallel-syncs MyMaster 1
Sentinel Failover-timeout MyMaster 900000
LogFile "/main/redis/logs/sentinel.log"


7: Launch Sentinel (three nodes):
#/main/redis/src/redis-sentinel/main/redis/sentinel.conf


8: Turn off Firewall (three nodes)
# service Iptables stop
# chkconfig iptables off


9: Set boot boot (three nodes)
# echo "/main/redis/src/redis-server/main/redis/redis.conf" >>/etc/rc.local
# echo "/main/redis/src/redis-sentinel/main/redis/sentinel.conf" >>/etc/rc.local


Note: On first boot, you must first start the master


To this Redis installation is complete


Centos/linux Redis cluster installation

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.