REDIS3 logging of local installation clusters

Source: Internet
Author: User

Cite csdn articles

Environmental centos6.7
Target Redis Three-master three-slave cluster


Step 1 compilation, if an error occurs, install dependencies according to the prompts
TAR-ZXVF redis-3.0.0.tar.gz
MV redis-3.0.0 redis3.0
cd/usr/local/redis3.0
Make & make Install
Make Test as prompted
may need to install other dependencies to execute again, I encountered diskless yes at the time of execution error,
After lookup, use Task-c 2 make test to resolve, that is, the location of the CPU is specified
Step 2
To copy the configuration file to six folders, now do three master three from the configuration.
Cd/usr/local/cluster/7000/
Redis-server./redis.conf
cd/usr/local/cluster/7001/
Redis-server./redis.conf
cd/usr/local/cluster/7002/
Redis-server./redis.conf
cd/usr/local/cluster/7003/
Redis-server./redis.conf
cd/usr/local/cluster/7004/
Redis-server./redis.conf
cd/usr/local/cluster/7005/
Redis-server./redis.conf

# #修改配置文件中的下面选项
Port 7000
Daemonize Yes
cluster-enabled Yes
Cluster-config-file nodes.conf
Cluster-node-timeout 5000
AppendOnly Yes

dependencies required to create a cluster after installation

Yum Install Ruby
Yum Install RubyGems
Gem Install Redis

./redis-trib.rb Create--replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005

Connection test:

./redis-cli–c–p 7000 Set foo bar

When you do not specify the-c parameter, the request may fail, the request is not automatically transferred, and an error (move) occurs.

REDIS3 logging of local installation clusters

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.