#!/bin/bash apt-get -y remove apache2 apt-get -y remove apache2.2-common apt-get -y autoremove apache2 apt-get update -y apt-get install -y git curl wget tmux unzip python python-dev python-distribute python-pip libcurl4-openssl-dev libxml2-dev libxslt1-dev python-lxml git libssl-dev redis-server libpcre3 libpcre3-dev zlib1g-dev build-essential tcl8.5 #安装pre库 wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz tar -zxvf pcre-8.38.tar.gz cd pcre-8.38 ./configure make make install cd /root #wget http://labs.frickle.com/files/ngx_cache_purge-1.5.tar.gz #下载Nginx wget -c https://nginx.org/download/nginx-1.10.2.tar.gz useradd www #下载substitutions # svn checkout http://substitutions4nginx.googlecode.com/svn/trunk/ substitutions4nginx-read-only git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git #编译软件 tar zxf nginx-1.10.2.tar.gz cd nginx-1.10.2 ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --add-module=/root/ngx_http_substitutions_filter_module make make install cd /root wget https://raw.githubusercontent.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx sudo chmod +x /etc/init.d/nginx service nginx restart cd /usr/local/nginx/conf rm -rf nginx.conf wget https://www.dropbox.com/s/yl3vjlzc7k4hcvy/nginx.conf?dl=0 mv nginx.conf?dl=0 nginx.conf mkdir super service nginx restart