Summary of problems encountered in building Redis master-slave replication

Source: Internet
Author: User

1. First install each Redis

--Decompression TAR-ZXVF redis.gz

--Compile:

Make commands for Redis

If there is a missing gcc, run yum install-y gcc g++ gcc-c++ make

If jemalloc/jemalloc.h appears: there is no file or directory, run make MALLOC=LIBC

If a need TCL 8.5 or newer in order to run the Redis test appears, run

wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gztar xzvf tcl8.6.1-src.tar.gz  -C/USR/LOCAL/CD  

--Finally, execute make install

2. Building the master-slave process problems

--I chose two virtual machines, all of which shut down the Firewall service iptables stop,redis.conf is configured with AppendOnly no

--Parameter bind 127.0.0.1 remove

--Parameter Protected-mode change to No

--Parameter slaveof IP address port number to fill (only on the configuration from the top, the host is configured)

--Parameters Masterauth <master-password> and Requirepass foobared can set the password, can not set

Which, using Jedis in connection with the master Redis, otherwise error READONLY you can ' t write against a read only slave.

Summary of problems encountered in building Redis master-slave replication

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.