Centos7安装Redis

/ linux / 没有评论 / 2870浏览
$ wget http://download.redis.io/releases/redis-4.0.8.tar.gz
$ tar xzf redis-4.0.8.tar.gz
$ cd redis-4.0.8
$ make

编译完成后是在src目录下,为避免出现一些稀奇古怪的问题,先修改redis.conf配置文件 注释掉 bind 127.0.0.1 把protected-mode 改为 protected-mode no 关闭保护模式 把daemonize no 改为 daemonize yes 使应用在后台运行 把requirepass 取消注释,后面加上你的密码 再启动使用以下命令,指定配置文件运行就好了

./redis-server ../redis.conf