nginx.sh
apt-get install -y build-essential gcc g++ make m4 libpcre3 libpcre3-dev libcurl4-gnutls-dev libjpeg62-dev libpng12-dev libmemcached-dev && rm -rf /usr/local/pcre /usr/local/pcre /usr/local/openssl /usr/local/zlib /usr/local/nginx && cd /usr/local/src && mkdir /usr/local/pcre && tar zxvf pcre-8.35.tar.gz && cd pcre-8.35 && ./configure --prefix=/usr/local/pcre && make && make install && cd /usr/local/src && tar zxvf openssl-1.0.1h.tar.gz && cd openssl-1.0.1h && ./config --prefix=/usr/local/openssl && make && make install && echo export PATH=$PATH:/usr/local/openssl/bin >> /etc/profile && . /etc/profile && cd /usr/local/src && mkdir /usr/local/zlib && tar zxvf zlib-1.2.8.tar.gz && cd zlib-1.2.8 && ./configure --prefix=/usr/local/zlib && make && make install && groupadd www && useradd -g www www -M -s /sbin/nologin && cd /usr/local/src && tar zxvf nginx-1.6.0.tar.gz && cd nginx-1.6.0 && ./configure --prefix=/usr/local/nginx --without-http_memcached_module --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-openssl=/usr/local/src/openssl-1.0.1h --with-zlib=/usr/local/src/zlib-1.2.8 --with-pcre=/usr/local/src/pcre-8.35 && make && make install && /usr/local/nginx/sbin/nginx
还需要修改自启动的问题