(Redis 5分钟部署教程:包含Linux、Windows两个版本) 安装以及配置详解(附一键启动脚本)

​​​​redis3.2.1安装包下载:链接:https://pan.baidu.com/s/1iHraShg3Q5tsqLp2mlDNQw 
提取码:a8x0 

下面的步骤,是启动主redis以及哨兵sentinel

也可以启动多个哨兵,一般起两个,应用连接redis哨兵时,也应连两个,提高redis可靠性

(1)打开redis-3.2.1_linux,修改配置文件redis.conf

 (2)修改配置文件sentinel-1.conf

(3)将redis-3.2.1_linux上传到linux服务器,并开始安装

(4) 在redis-3.2.1目录下执行make命令

如果报/bin/sh: cc: command not found  则说明未安装gcc,使用命令安装gcc:yum install gcc

如果报zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory 则将make改为make MALLOC=libc

如果报No rule to make target ‘release.h’, needed by ‘release.o’. Stop  进入src  chmod 777 *

(5) 进入src下执行make install   命令

(6) 在src下执行nohup ./redis-server ../redis-1.conf >> ./redis-1.log 2>&1 &

用ps -ef|grep redis查看redis是否启动

(7)在redis-3.2.1目录下执行redis-sentinel sentinel-1.conf命令启动sentinel

 

Windows 版本部署以及启动

Windows 版本​​​​redis包下载,无需安装,直接启动

下载资源连接:https://download.csdn.net/download/fengj20015/11783102

注:上述均为原著。如有不对的地方,望不吝赐教。

猜你喜欢

转载自blog.csdn.net/fengj20015/article/details/99293479