RICH-ATONE

Nginx安装

步骤如下:

1、部署环境

yum -y install openssl openssl-devel pcre pcre-devel zlib zlib-devel gcc gcc-c++ libtool

2、编译

./configure --prefix=/home/pirate/opt/module/nginx
make && make install

 3、配置权重

在server外部配置反向代理
upstream www.logserver.com{
server hadoop102:8081 weight=1;
server hadoop103:8081 weight=2;
server hadoop104:8081 weight=3;
}

 

 

在server内部配置
location /applog{
proxy_pass http://www.logserver.com;
proxy_connect_timeout 10;
}

 


启动:
sbin/nginx

posted on 2022-01-28 17:29  RICH-ATONE  阅读(58)  评论(0编辑  收藏  举报

导航