Nginx安裝tcp代理
阿新 • • 發佈:2019-02-18
wgethttp://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
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/