redis集群与哨兵模式安装
只少准备三台主机,进入第一台主机(一主二从)
cd /data/mxw/tools/redis_sentinel
tar xvf redis-3.2.8.tar.gz
mv redis-3.2.8 redis01
cd redis01
建立文件夹:
mkdir {db,logs,conf,bin,redis_sentinel}
编译:
make
复制文件:
cd src
for i in {redis-sentinel,redis-server,redis-cli};do cp -ap $i /data/mxw/tools/redis_sentinel/redis01/bin/;done
安装redis:
make
安装sentinel
cd ../utils/install_server.sh
安装配置:
Config file : /data/mxw/tools/redis_sentinel/redis01/conf/6389.conf
Log file : /data/mxw/tools/redis_sentinel/redis01/logs/6389.log
Data dir : /data/mxw/tools/redis_sentinel/redis01/db/6389
Executable : /data/mxw/tools/redis_sentinel/redis01/bin/redis-server
Cli Executable : /data/mxw/tools/redis