首页 > 代码库 > nginx安装并支持upstream和tcp代理模块
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/
本文出自 “梦想照进现实” 博客,请务必保留此出处http://lookingdream.blog.51cto.com/5177800/1850765
nginx安装并支持upstream和tcp代理模块