博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS 7 单机安装Redis Cluster(3主3从)
阅读量:2490 次
发布时间:2019-05-11

本文共 724 字,大约阅读时间需要 2 分钟。

 

为了节省机器,我们直接把6个Redis实例安装在同一台机器上(3主3从),只是使用不同的端口号。

机器IP 192.168.8.207

更新:新版的cluster已经不需要通过ruby脚本创建,删掉了ruby相关依赖的安装

cd /usr/local/soft/redis-5.0.5mkdir redis-clustercd redis-clustermkdir 7291 7292 7293 7294 7295 7296

复制redis配置文件到7291目录

cp /usr/local/soft/redis-5.0.5/redis.conf /usr/local/soft/redis-5.0.5/redis-cluster/7291

修改7291的redis.conf配置文件,内容:

cd /usr/local/soft/redis-5.0.5/redis-cluster/7291>redis.confvim redis.conf
port 7291daemonize yesprotected-mode nodir /usr/local/soft/redis-5.0.5/redis-cluster/7291/cluster-enabled yescluster-config-file nodes-7291.confcluster-node-timeout 5000appendonly yespidfile /var/run/redis_7291.pid

注意,外网集群要添加这个配置:

# 实际给各节点网卡分配的IP(公网IP)cluster-announce-ip 47.xx.xx.xx# 节点映射端口cluster-ann

转载地址:http://hflrb.baihongyu.com/

你可能感兴趣的文章
main函数带参数
查看>>
PCB布线技巧
查看>>
关于PCB设计中过孔能否打在焊盘上的两种观点
查看>>
PCB反推理念
查看>>
京东技术架构(一)构建亿级前端读服务
查看>>
php 解决json_encode中文UNICODE转码问题
查看>>
LNMP 安装 thinkcmf提示404not found
查看>>
PHP empty、isset、innull的区别
查看>>
apache+nginx 实现动静分离
查看>>
通过Navicat远程连接MySQL配置
查看>>
phpstorm开发工具的设置用法
查看>>
Linux 系统挂载数据盘
查看>>
Git基础(三)--常见错误及解决方案
查看>>
Git(四) - 分支管理
查看>>
PHP Curl发送数据
查看>>
HTTP协议
查看>>
HTTPS
查看>>
git add . git add -u git add -A区别
查看>>
apache下虚拟域名配置
查看>>
session和cookie区别与联系
查看>>