https://redis.io/
tar -xzf redis-5.0.3.tar.gz
cd redis-5.0.3
make
mkdir -p /usr/local/redis/redis_1
mkdir -p /usr/local/redis/redis_2
mkdir -p /usr/local/redis/redis_3
mkdir -p /usr/local/redis/redis_4
mkdir -p /usr/local/redis/redis_5
mkdir -p /usr/local/redis/redis_6
vim /usr/local/redis/redis_1/redis.conf
port 7001
bind 172.20.10.12
requirepass 123456
daemonize yes
pidfile /var/run/redis_1.pid
cluster-enabled yes
cluster-config-file nodes_1.conf
cluster-node-timeout 10100
appendonly no
src/redis-server /usr/local/redis/redis_1/redis.conf
src/redis-server /usr/local/redis/redis_2/redis.conf
src/redis-server /usr/local/redis/redis_3/redis.conf
src/redis-server /usr/local/redis/redis_4/redis.conf
src/redis-server /usr/local/redis/redis_5/redis.conf
src/redis-server /usr/local/redis/redis_6/redis.conf
src/redis-cli --cluster create 172.20.10.12:7001 172.20.10.12:7002 172.20.10.12:7003 172.20.10.12:7004 172.20.10.12:7005 172.20.10.12:7006 -a 123456 --cluster-replicas 1
src/redis-cli --cluster check 172.20.10.12:7001 -a 123456
src/redis-cli -c -h 172.20.10.12 -p 7001 -a 123456
pkill redis
原文地址:http://blog.51cto.com/12173069/2339318
时间: 2024-10-09 21:28:27