下载: wget http://download.redis.io/releases/redis-4.0.0.tar.gz
解压并安装:
tar xzf redis-4.0.0.tar.gz
cd redis-4.0.0
make
make install
编辑/src/redis.conf 文件
1.第88行将 protected-mode 改为no(默认yes)关闭保护模式
2.第136行将daemonize 改为yes 开启后台启动模式
3.第500行 requirepass 设置密码
4.第69行将 bind 127.0.0.1 用#注释
启动redis :
[root@localhost redis-4.0.0]# src/redis-server redis.conf &
启动连接客户端:
[root@localhost redis-4.0.0]# src/redis-cli
说明已安装成功。