linux centos7.3如何安装redis

2018-03-05  本文已影响0人  webjiacheng
//下载redis安装包 http://www.redis.cn/download.html ,本人安装压缩包放在 /usr/local 目录下
//1.安装编译环境
yum install gcc
yum install gcc-c++ libstdc++-devel
yum install zlib-devel
//2.解压redis压缩包
tar zxvf redis-3.2.9.tar.gz
//3.进入redis-3.2.9目录,执行编译安装
cd redis-3.2.9
make
make install   // 进入src目录进行安装
//4.修改redis.conf中的daemonize为yes,完成后台运行设置
vim redis.conf
//5 . 启动 redis 服务
cd /usr/local/bin
./redis-server /usr/local/redis-3.2.9/redis.conf
//6.关闭redis服务
pkill redis-server
//7.查询进程
ps -aux | grep redis

错误点:

强制关闭Redis快照导致不能持久化。
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
解决方案:
root@ubuntu:/usr/local/redis/bin# ./redis-cli
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK
上一篇下一篇

猜你喜欢

热点阅读