两个节点
192.168.1.177 节点一
192.168.1.180 节点二
系统版本:
centos7
资源下载:
下载
http://download.redis.io/releases/redis-4.0.11.tar.gz
https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz
https://rubygems.org/rubygems/rubygems-2.7.7.tgz
https://rubygems.org/downloads/redis-4.0.1.gem
1、两节点解压,编译安装
# tar -zxf redis-4.0.11.tar.gz
# cd redis-4.0.11/
# make
Hint: It's a good idea to run 'make test' ;)
# cd src
测试编译报错
# make test
CC Makefile.dep
You need tcl 8.5 or newer in order to run the Redis test
make: *** [test] Error 1
缺少依赖,进行安装
# yum install tcl
再次测试编译ok
# make test
\o/ All tests passed without errors!
Cleanup: may take some time... OK
安装
# make PREFIX=/usr/local/redis-4.0.11 install
Hint: It's a good idea to run 'make test' ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
配置环境变量
# vi /etc/profile
export PATH=/usr/local/edis-4.0.11/bin:$PATH
# source /etc/profile
2、配置节点创建
节点一创建配置节点
# mkdir -p /usr/local/redis-4.0.11/cluster/7000
# mkdir /usr/local/redis-4.0.11/cluster/7001
# mkdir /usr/local/redis-4.0.11/cluster/7002
# cp /data/opt/redis-4.0.11/redis.conf /usr/local/redis-4.0.11/cluster/7000
# cp /data/opt/redis-4.0.11/redis.conf /usr/local/redis-4.0.11/cluster/7001
# cp /data/opt/redis-4.0.11/redis.conf /usr/local/redis-4.0.11/cluster/7002
节点二创建配置节点
#