mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-23 14:32:27 +08:00
优化集群创建脚本
This commit is contained in:
11
docker/3rd/redis/redis_cluster/conf/update_config.sh
Executable file
11
docker/3rd/redis/redis_cluster/conf/update_config.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
IP=$1
|
||||
echo "update redis config, host ip: ${IP}"
|
||||
|
||||
sed -i s/192.168.199.233/"${IP}"/ ./redis1/redis.conf
|
||||
sed -i s/192.168.199.233/"${IP}"/ ./redis2/redis.conf
|
||||
sed -i s/192.168.199.233/"${IP}"/ ./redis3/redis.conf
|
||||
sed -i s/192.168.199.233/"${IP}"/ ./redis4/redis.conf
|
||||
sed -i s/192.168.199.233/"${IP}"/ ./redis5/redis.conf
|
||||
sed -i s/192.168.199.233/"${IP}"/ ./redis6/redis.conf
|
||||
@@ -1,10 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
IP=$1
|
||||
echo "create redis cluster, host ip: ${IP}"
|
||||
|
||||
redis-cli -a 123456 --cluster create \
|
||||
192.168.199.233:6371 \
|
||||
192.168.199.233:6372 \
|
||||
192.168.199.233:6373 \
|
||||
192.168.199.233:6374 \
|
||||
192.168.199.233:6375 \
|
||||
192.168.199.233:6376 \
|
||||
"${IP}":6371 \
|
||||
"${IP}":6372 \
|
||||
"${IP}":6373 \
|
||||
"${IP}":6374 \
|
||||
"${IP}":6375 \
|
||||
"${IP}":6376 \
|
||||
--cluster-replicas 1
|
||||
|
||||
Reference in New Issue
Block a user