下载
http://download.redis.io/releases/redis-4.0.2.tar.gz
解压,编译
cd /usr/local
tar -zxvf redis-4.0.2.tar.gz
cd redis-4.0.2
#编译
yum install tcl
yum install cpp
make distclean
make
make install
#转换目录
cd utils/
#使用脚本安装服务
./install_server.sh
#一路enter
#启动服务
systemctl start redis_6379
systemctl status redis_6379
修改配置文件
vim /etc/redis/6379.conf
bind=192.168.11.149 #允许远程登录
requirepass 123456 设置密码
客户端连接
redis-cli -h localhost -p 6379 -a 123456