nginx安装

Nginx配置与模块编译
#!/bin/sh
main=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/nginx-1.0.5.tar.gz
pcre=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/pcre-8.10.tar.gz
passport=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/nginx-passport.tar.gz
hash=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/Nginx_upstream_hash-0.3.1.tar.gz
keepalive=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/ngx_http_upstream_keepalive-f3b50effc1d4.tar.gz
consistent=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/nginx-upstream-consistent.tar.gz
consistentpatch=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/NginxMemcached/ngx_http_upstream_consistent_module.patch
rsa1024=http://wiki.mtpc.<替换公司>.com/raw-attachment/wiki/platform/cmt_nginx_upstream_keepalive_consistent/rsa1024.pub

rm -fr ./workdir
mkdir ./workdir
cd ./workdir
for url in $main $pcre $passport $hash $consistent $keepalive $consistentpatch $rsa1024
do
wget $url -q
done

find ./ -type f -name '*.tar.gz' -exec tar -zxf {} \;

cd ./nginx-upstream-consistent
patch -p1 < ../ngx_http_upstream_consistent_module.patch
cd ../nginx-1.0.5
patch -p0 < ../nginx_upstream_hash-0.3.1/nginx.patch
echo "configure .."
./configure --add-module=../nginx-passport --with-pcre=../pcre-8.10 --with-http_stub_status_module --with-http_realip_module --add-module=../nginx_upstream_hash-0.3.1/ --add-module=../ngx_http_upstream_keepalive-f3b50effc1d4/ --add-module=../nginx-upstream-consistent/ | awk '/was configured/{print $0}'
echo "make .."
make > /dev/null
cp objs/nginx ../../
cp ../rsa1024.pub ../../
echo "done"
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值