iocafe87
9/17/2015 - 9:09 AM

ConfigurationNginxOnLinux

#!/bin/sh

## pcre
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
tar -zxvf pcre-8.37.tar.gz
cd pcre-8.37
./configure
make
make install

## zlib
wget http://zlib.net/zlib-1.2.8.tar.gz
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure
make
make install

## openssl
wget http://www.openssl.org/source/openssl-1.0.2d.tar.gz
tar -zxvf openssl-1.0.2d.tar.gz

## Nginx
wget http://nginx.org/download/nginx-1.8.0.tar.gz

./configure --sbin-path=/usr/local/nginx/nginx \
--conf-path=/usr/local/nginx/conf/nginx.conf \
--pid-path=/var/run/nginx.pid 
--with-http_ssl_module \
--with-http_stub_status_module \
--with-pcre=/usr/local/src/pcre-8.37 \
--with-zlib=/usr/local/src/zlib-1.2.8 \
--with-openssl=/usr/local/src/openssl-1.0.2d \
--user=www \
--group=www

make
make install