欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

nginx安装并支持upstream和tcp代理模块

发布时间:2025/5/22 编程问答 39 豆豆
生活随笔 收集整理的这篇文章主要介绍了 nginx安装并支持upstream和tcp代理模块 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

wget http://nginx.org/download/nginx-1.4.5.tar.gz

tar zxvf nginx-1.4.5.tar.gz

cd nginx-1.4.5

Git clone https://github.com/yaoweibin/nginx_upstream_check_module.git //upstream模块

git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git //tcp代理模块

yum install patch

patch -p1 <nginx_upstream_check_module/check_1.2.6+.patch

patch -p1 <nginx_tcp_proxy_module/tcp.patch

yum groupinstall "Development tools"

yum -y install pcre-devel openssl openssl-devel

./configure --add-module=nginx_upstream_check_module --add-module=nginx_tcp_proxy_module

make

make install

cp /data/q/sh/conf/nginx /etc/rc.d/init.d/nginx //加入快速启动, nginx脚本在附件

chmod 755 /etc/rc.d/init.d/nginx

cp /data/q/sh/conf/nginx.conf /usr/local/nginx/conf/ //修改nginx的配置, nginx.conf在附件

service nginx start

nginx 配置可参考 https://github.com/yaoweibin/


转载于:https://blog.51cto.com/lookingdream/1850765

总结

以上是生活随笔为你收集整理的nginx安装并支持upstream和tcp代理模块的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。