环境:Centos7
项目描述:已安装nginx-1.12.2版本,在原有服务的基础上打个补丁upstream_check_module,
步骤
1、在github上下载与已有环境相匹配的zip包,我下载在root下(https://github.com/achuDk/nginx_upstream_check_module)
2、在 nginx-1.12.0 文件夹下
patch -p1 < /root/nginx_upstream_check_module-master/check_1.12.1+.patch
3、编译,还是在 nginx-1.12.0 文件夹下
./configure --add-module=/root/nginx_upstream_check_module-master
make && make install
4、修改配置文件
vim /usr/local/nginx/conf/nginx.conf
upstream backend {
server 192.168.4.2:8080;
server 192.168.4.3:8080;
check interval=3000 rise=2 fall=5 timeout=1000 type=http;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
# root html;
# index index.html inde

本文介绍了在Centos7系统中,如何为已安装的nginx-1.12.2版本添加upstream_check_module补丁。详细步骤包括:从GitHub下载补丁文件,使用patch命令应用补丁,重新编译并安装nginx,修改配置文件启用健康检查模块,最后通过重新加载配置和客户端访问验证节点状态。
5811

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



