集群版本和环境
redis下载地址
https://redis.io/
Redis集群要求至少3个主节点3个从节点,共计6个节点。
操作系统 CentOS 7.4
Redis版本 6.0.5
主节点
192.168.239.143 7000
192.168.239.147 7000
192.168.239.149 7000
从节点
192.168.239.143 7001
192.168.239.147 7001
192.168.239.149 7001
修改系统配置
关闭NetworkManager
[root@localhost ~]# systemctl disable NetworkManager --关闭自启动
[root@localhost ~]# systemctl stop NetworkManager
[root@localhost ~]# systemctl status NetworkManager
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service --关闭自启动
firewall-cmd --state
vi /etc/selinux/config
SELINUX=disabled
安装依赖包
安装gcc套装
yum install -y cpp binutils glibc glibc-kernheaders glibc-common glibc-devel gcc make
升级gcc
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoo