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"

你可能感兴趣的:(nginx)