Redis Standalone Multi-entity installation and master-slave configuration

Source: Internet
Author: User
Tags redis

The previous article explained the Redis installation on CentOS.

Now let's take a look at the installation of Redis standalone Multi-instance

First turn off Redis

Based on the configuration file location of the previous Redis installation

First we copy the Redis configuration file

Cp/etc/redis/6379.conf/etc/redis/6380.conf

Then modify the information in the 6380.conf configuration file:

Port ports changed to 6380

Data storage directory dir change to/var/lib/redis/6380 and create the corresponding directory

Log storage location logfile change to/var/log/redis_6380.log

PID file name changed to/var/run/redis_6380.pid

Then we copy/etc/init.d/redis_6379, modify the redis_6380 script file, change the original 6379 to 6380

cp/etc/init.d/redis_6390/etc/init.d/redis_6380

At this point, single-machine multi-instance installation is complete

Next we can do the master-slave configuration

To modify the/etc/redis/6380.conf file:

Find slaveof, modify the configuration as follows, if it is configured on this machine, you can also write IP 127.0.0.1, when the primary server has a password do not forget to add a password in Masterauth

After the configuration is complete, restart from the database

Service redis_6380 Restart

Then view the master and slave configuration information

Primary server information:


From server information:

This is the master-slave configuration completed

Test it:






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.