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