1.redis官网下载最新稳定版(stable),解压后在终端进入文件夹目录
2.运行make命令
3.
sudo make install
4.
redis-server
执行redis-server启动redis
如果遇到Connection refused
Could not connect to Redis at 127.0.0.1:6379: Connection refused not connected>
cp redis.conf /etc
cd /etc
vi redis.conf
-
进入etc,找到redis.conf 并修改
daemonize no(第25几行,ESC + :set nu开启行号显示) 为daemonize yes,这样就可以默认启动就后台运行 -
如果遇到提示说文件为只读文件不能修改 "redis.conf" E212: Can't open file for writing,需要修改文件权限
sudo chmod 777 redis.conf -
redis-server /etc/redis.conf启动redis服务
5.
redis-cli
6. 验证是否安装成功
set a 123
get a /// 123
获取到阿德值为123即安装成功

本文详细介绍了如何从官网下载Redis稳定版,配置daemonize参数,解决权限问题,并验证安装。步骤包括make、make install、redis-server启动及连接测试。
1万+

被折叠的 条评论
为什么被折叠?



