Skip to content

Instantly share code, notes, and snippets.

@hongry18
Last active April 25, 2018 02:11
Show Gist options
  • Save hongry18/273496dc991d6584774bd23a6b79244a to your computer and use it in GitHub Desktop.
Save hongry18/273496dc991d6584774bd23a6b79244a to your computer and use it in GitHub Desktop.
install nginx

nginx

dependencies

yum -y install gcc gcc-c++ geoip geoip-devel

downloads & unArchive

tar zxf nginx-*.tar.gz
tar zxf pcre-*.tar.gz
tar zxf zlib-*.tar.gz
tar zxf openssl-*.tar.gz

configure & install

./configure --prefix=/home/www-user/nginx \
--sbin-path=/home/www-user/nginx/nginx \
--modules-path=/home/www-user/nginx/modules \
--conf-path=/home/www-user/nginx/nginx.conf \
--error-log-path=/home/www-user/nginx/logs/error.log \
--http-log-path=/home/www-user/nginx/logs/http.log \
--pid-path=/home/www-user/nginx/run/nginx.pid \
--lock-path=/home/www-user/nginx/run/nginx.lock \
--user=www-user \
--group=www-user \
--with-zlib=/zlib-path \
--with-pcre=/pcre-path \
--with-openssl=/openssl-path \
--with-http_ssl_module \
--with-http_geoip_module \
--with-stream \
--with-stream_ssl_module \
--http-client-body-temp-path=/home/www-user/nginx/temp/client_body_temp \
--http-proxy-temp-path=/home/www-user/nginx/temp/proxy_temp \
--http-fastcgi-temp-path=/home/www-user/nginx/temp/fastcgi_temp \
--http-uwsgi-temp-path=/home/www-user/nginx/temp/uwsgi_temp \
--http-scgi-temp-path=/home/www-user/nginx/temp/scgi_temp

make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment