redis_home=/usr/local/redis
rm -rf ${redis_home}
mkdir ${redis_home}
cp ./redis-4.0.14.tar.gz ${redis_home}
read -p "Is master redis?<y/n> :" master
if [ $master = 'y' ] || [ $master = 'Y' ]; then
echo 'you choose the yes!'
cp ./redis-master.conf ${redis_home}
else
cp ./redis-slave.conf ${redis_home}
cp -r ./{sentinel-7010,sentinel-7011,sentinel-7012} ${redis_home}
echo 'you choose the no!'
fi
cd ${redis_home}
mkdir logs
tar -zxvf redis-4.0.14.tar.gz
cd redis-4.0.14
echo '==================start install redis'
make && make install
cd ..
echo '==================redis install complete!'
cp /usr/local/bin/{redis-cli,redis-server} /usr/local/redis/
echo '==================all installed'
echo '==================start redis'
if [ $master = 'y' ] || [ $master = 'Y' ]; then
echo 'is master'
./redis-server redis-master.conf
else
./redis-server redis-slave.conf
echo '==================config sentinel'
cp /usr/local/bin/redis-sentinel ${redis_home}/sentinel-7010
cp /usr/local/bin/redis-sentinel ${redis_home}/sentinel-7011
cp /usr/local/bin/redis-sentinel ${redis_home}/sentinel-7012
echo '==================sentinel installed'
echo '==================start sentinel'
cd ${redis_home}/sentinel-7010
./redis-sentinel sentinel.conf
cd ${redis_home}/sentinel-7011
./redis-sentinel sentinel.conf
cd ${redis_home}/sentinel-7012
./redis-sentinel sentinel.conf
fi
echo '================success!'
离线脚本部署redis主从+哨兵(一主一从三哨兵)
需积分: 47 160 浏览量
2019-05-22
15:23:18
上传
评论 1
收藏 1.68MB ZIP 举报
一碗豆腐丶
- 粉丝: 10
- 资源: 1
最新资源
- 基于paddle搭建神经网络实现水果识别分类python源码+数据集(高分项目).zip
- 三菱plc编程口通信学习笔记.doc
- 与HIS接口解决方案...doc
- 专利技术交底书-案例模板-软件类-样板示例.doc
- C# 超简单的人脸识别库 .zip
- 实现人脸识别资源代码.zip
- 东北大学-微机原理实验报告及答案-8255并行接口.doc
- 实现人脸检测,人脸识别,人脸标记68个坐标点 人脸对齐 人脸特征测试等 同时可以自行训练人脸识别库.zip
- 基于中科视拓 seetaface6基础源码和JNI源码编译而来的项目.zip
- Python基于opencv人脸识别的考勤系统源码+代码说明(毕业设计).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈