下载包
$ wget http://download.redis.io/releases/redis-3.2.3.tar.gz
解压
$ tar xzf redis-3.2.3.tar.gz
进入目录,编译安装
$ cd redis-3.2.3
$ make
$ make install
修改配置 redis.conf
# 注释掉bind 127.0.0.1
#bind 127.0.0.1
# 更改protected-mode yes为
protected-mode no
# 更改daemonize no为
daemonize yes
# 设置密码
requirepass 要很长的密码
启动
src/redis-server redis.conf &
测试
$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"
另附:腾讯云服务器Linux系统--安装redis
https://cloud.tencent.com/developer/article/1532497