Redis群集

本文档介绍了如何使用两台服务器模拟6台服务器来搭建Redis集群,详细步骤包括安装Redis、修改配置文件、安装rvm和Ruby控制软件、添加网卡、创建集群以及验证读写操作。
摘要由CSDN通过智能技术生成

Redis群集的搭建

实验环境

用两台服务器模拟6台服务器(添加网卡)

主服务器M1 192.168.13.128
主服务器M2 192.168.13.135
主服务器M3 192.168.13.136
从服务器S1 192.168.13.129
从服务器S2 192.168.13.137
从服务器S3 192.168.13.138

软件版本:redis-5.0.7

1、在两台服务器上都安装Redis

[root@localhost ~]# yum install gcc gcc-c++ make -y  ##安装环境组件
[root@localhost ~]# mount.cifs //192.168.100.3/LNMP-C7 /mnt/  ##挂载
Password for root@//192.168.100.3/LNMP-C7:  
[root@localhost ~]# cd /mnt/
[root@localhost mnt]# tar zxvf redis-5.0.7.tar.gz -C /opt/  ##解压
[root@localhost mnt]# cd /opt/redis-5.0.7/
[root@localhost redis-5.0.7]# make  ##编译
[root@localhost redis-5.0.7]# make PREFIX=/usr/local/redis/ install  ##安装
[root@localhost redis-5.0.7]# cd utils/
[root@localhost utils]# ./install_server.sh    ##执行脚本进行配置
Welcome to the redis service installer
This script will help you easily set up a running redis server

Please select the redis port for this instance: [6379]   ##默认端口
Selecting default: 6379
Please select the redis config file name [/etc/redis/6379.conf]   #配置文件
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log]   #日志文件
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值