1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| $ tar -zxvf tendisplus-2.6.0-rocksdb-v6.23.3.tgz $ cd tendisplus-2.6.0-rocksdb-v6.23.3
$ cp -r scripts scripts30000 $ cd scripts30000
$ vi tendisplus.conf bind 10.18.2.40 cluster-enabled yes port 30000 loglevel notice logdir ./home/log dumpdir ./home/dump dir ./home/db pidfile ./home/tendisplus.pid slowlog ./home/log/slowlog rocks.blockcachemb 4096 executorThreadNum 48
requirepass 123456 masterauth 123456 $ vi stop.sh ip=10.18.2.40 port=30000 echo shutdown |../bin/redis-cli -h ${ip} -p ${port} -a 123456
$ cp -r scripts30000 scripts30001 $ cp -r scripts30000 scripts30002 $ cp -r scripts30000 scripts30003 $ cp -r scripts30000 scripts30004 $ cp -r scripts30000 scripts30005
$ cd scripts30000 $ ./start.sh
$ cd bin
$ ./redis-cli -h 10.18.2.40 -p 30000 -a 123456 > cluster meet 10.18.2.40 30001 > cluster meet 10.18.2.40 30002 > cluster meet 10.18.2.40 30003 > cluster meet 10.18.2.40 30004 > cluster meet 10.18.2.40 30005 > quit
$ ./redis-cli -h 10.18.2.40 -p 30000 -a 123456 cluster addslots {0..5461} $ ./redis-cli -h 10.18.2.40 -p 30001 -a 123456 cluster addslots {5462..10922} $ ./redis-cli -h 10.18.2.40 -p 30002 -a 123456 cluster addslots {10923..16383}
$ ./redis-cli -h 10.18.2.40 -p 30000 -a 123456 > cluster nodes > quit
$ ./redis-cli -h 10.18.2.40 -p 30003 -a 123456 cluster replicate <30000_id> $ ./redis-cli -h 10.18.2.40 -p 30004 -a 123456 cluster replicate <30001_id> $ ./redis-cli -h 10.18.2.40 -p 30005 -a 123456 cluster replicate <30002_id>
$ ./redis-cli -h 10.18.2.40 -p 30000 -a 123456 > cluster nodes > quit
|