浅醉 JAVA Redis 安装 集群及测试
38175:C 14 Jan 2019 19:39:10.214 # Configuration loaded
[root@localhost src]# ./redis-server /usr/local/redis_cluster/7600/redis.conf
38180:C 14 Jan 2019 19:39:14.144 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
38180:C 14 Jan 2019 19:39:14.144 # Redis version=5.0.0, bits=64, commit=00000000, modified=0, pid=38180, just started
38180:C 14 Jan 2019 19:39:14.144 # Configuration loaded
3.5 查看服务 ps -ef | grep redis
[root@localhost src]# ps -ef | grep redis
root 3469 1 0 11:42 ? 00:00:00 /usr/redis2/redis-5.0.0/src/redis-server *:7100 [cluster]
root 3484 1 0 11:42 ? 00:00:00 /usr/redis2/redis-5.0.0/src/redis-server *:7200 [cluster]
root 3489 1 0 11:42 ? 00:00:00 /usr/redis2/redis-5.0.0/src/redis-server *:7300 [cluster]
root 3494 1 0 11:42 ? 00:00:00 /usr/redis2/redis-5.0.0/src/redis-server *:7400 [cluster]
root 3499 1 0 11:42 ? 00:00:00 /usr/redis2/redis-5.0.0/src/redis-server *:7500 [cluster]
root 3504 1 0 11:42 ? 00:00:00 /usr/redis2/redis-5.0.0/src/redis-server *:7600 [cluster]
root 4076 2186 0 12:00 pts/0 00:00:00 grep --color=auto redis
3.6 使用 redis-cli -h ip 地址 -p 端口 -a 密码,通过客户端登陆,执行 info replication,可以查看到主从信息。
4 创建集群
redis5.0 开始不再使用 ruby 搭建集群