CentOS/Linux Redis cluster installation, centosredis

Source: Internet
Author: User
Tags redis cluster install redis

CentOS/Linux Redis cluster installation, centosredis

In this article, only the installation steps of the redis cluster are described. For detailed procedures, see the following articles:

Redis cluster _ 1. Install redis

Redis cluster _ 2. redis master-slave Configuration

Redis cluster _ 3. redis master-slave automatic 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 related dependency packages
# Yum-y install gcc make


2: Install redis (three nodes)
Upload software to the/main directory
# Cd/main/
# Tar zxvf redis-2.8.19.tar.gz
# Music redis-2.8.19/redis/
# Cd redis/
# Make & make install


3: modify the configuration file (three nodes)
# Mkdir/main/redis/logs
# Vi/main/redis. conf
Daemonize yes
Logfile "/main/redis/logs/redis. log"


4: Specify the Slave (configured on the Slave node)
# Vi/main/redis. conf
Slaveof 192.168.100.211 6379


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


6: Listener 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 MySQL master 30000
Sentinel parallel-syncs mymaster 1
Sentinel failover-timeout MySQL master 900000
Logfile "/main/redis/logs/sentinel. log"


7. Start sentinel (three nodes ):
#/Main/redis/src/redis-sentinel/main/redis/sentinel. conf


8: Disable the firewall (three nodes)
# Service iptables stop
# Chkconfig iptables off


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


Note: The Master must be started first when it is started for the first time.


The redis installation is complete.


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.