#### 安装 > $ wget http://download.redis.io/releases/redis-5.0.3.tar.gz<br> > $ tar xzf redis-5.0.3.tar.gz<br> > $ cd redis-5.0.3<br> > $ make #### 启动 > $ src/redis-server redis.conf > 后面要跟着 redis.conf #### 关闭 > $ src/redis-cli -h 127.0.0.1 -p 6379 shutdown #### 测试 > $ src/redis-cli redis> set foo bar OK redis> get foo "bar" #### 关闭防火墙 > 启动: systemctl start firewalld <br> 关闭: systemctl stop firewalld <br> 查看状态: systemctl status firewalld <br> 开机禁用 : systemctl disable firewalld <br> 开机启用 : systemctl enable firewalld <br> #### 远程无法连接问题 > 1. 注销 bind 127.0.0.1 > 2. 设置密码 requirepass mypassword > 3. protected-mode no > 4. 启动命令必须是 $ src/redis-server redis.conf 带 redis.conf > 5. 打开防火墙端口 > 6. Redis (error) NOAUTH Authentication required.解决方法 auth "yourpassword"