Version
redis 6.0.6
Shell script
cd /redis-6.0.6/utils/create-cluster
vi create-cluster
#!/bin/bash
# Settings
BIN_PATH="../../src/"
#CLUSTER_HOST=127.0.0.1
CLUSTER_HOST=YOUR_REMOTE_IP
PORT=30000
TIMEOUT=2000
NODES=6
REPLICAS=1
#PROTECTED_MODE=yes
PROTECTED_MODE=no
#ADDITIONAL_OPTIONS=""
ADDITIONAL_OPTIONS="--requirepass YOUR_PASSWORD --masterauth YOUR_PASSWORD --cluster-announce-ip YOUR_REMOTE_IP"
PASSWORD=YOUR_PASSWORD
#MASTERAUTH=YOUR_PASSWORD
# 云服务器上部署需指定公网ip
#cluster-announce-ip YOUR_REMOTE_IP
# You may want to put the above config parameters into config.sh in order to
# override the defaults without modifying this script.
if [ -a config.sh ]
then
source "config.sh"
fi
# Computed vars
ENDPORT=$((PORT+NODES))
if [ "$1" == "start" ]
then
while [ $((PORT < ENDPORT)) != "0" ];