Last active
November 17, 2016 10:47
-
-
Save wangtubs/47da38a62cf124da459decb3d3fb45a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment