您的位置:首页 > 理论基础 > 计算机网络

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

2014-03-28 16:36 351 查看
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/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: