LINUX下安装redis 4.0.8

1,下载redis https://redis.io/download(当前最新版4.0.8)

2,放入到 /usr/local/redis目录下(没有则自行创建)

3,解压 tar xzf redis-4.0.8.tar.gz(tar.gz版本的,所以用tar)

4,cd redis-4.0.8

5,make

6,cd src

7,make install

8,需要在后台运行则 修改 src/redis.conf 文件 daemonize no 改为 yes

9,启动./redis-server /usr/local/redis/redis-4.0.8/redis.conf

10,查看是否启动 ps axu | grep redis

11,启动客户端 redis-cli

12,ping

出现 PONG 就是好了

错误处理

Redis之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.


只需要在

/etc/sysctl.conf 里面加上 vm.overcommit_memory = 1 并重启服务器

如果帮助到了您,请留言点或个赞谢谢


猜你喜欢

转载自blog.csdn.net/qq_36103520/article/details/79554630
今日推荐