下载安装包然后解压
wget http://download.redis.io/releases/redis-3.2.12.tar.gz
tar -zxvf redis-3.2.12.tar.gz
进入解压目录然后编译安装
cd redis-3.2.12
make
make install
修改配置文件redis.conf
允许远程访问
#bind 127.0.0.1
以后台方式启动
daemonize yes
设置登录密码
requirepass Password
设置日志文件
logfile "/var/log/redis.log"
启动
redis-server /opt/redis-3.2.12/redis.conf
连接
redis-cli -h 127.0.0.1 -a Password
谢谢阅读!