yum install epel-release
安装过程中会有让你确认的,输入y按回车就可以了
2.安装Redis
yum install redis
安装过程中会有让你确认的,输入y按回车就可以了
3.启动Redis
service redis start
4.修改端口号/密码等配置
vim /etc/redis.conf
5.注释掉ip绑定(这个只允许本地调试,不注释掉这个,你远程这个redis的时候会提示:
redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused: connect
)
6:关闭保护模式(不关闭的话远程这个redis会提示:
redis.clients.jedis.exceptions.JedisDataException: DENIED Redis is running in protected mode
)
下面关于Redis的文章您也可能喜欢,不妨参考下: