1. 程式人生 > >nginx 1.10.2 編譯安裝

nginx 1.10.2 編譯安裝

yum  -y install lua-devel GeoIP GeoIP-devel GeoIP-data  perl-devel perl-ExtUtils-Embed  gd-devel libxslt-devel libxml2 libxml2-dev  zlib-devel  gcc-c++ autoconf automake pcre pcre-devel 

useradd nginx -u 1001

mkdir /var/cache/nginx
chown nginx:nginx /var/cache/nginx/ -R


cd LuaJIT-2.0.3/
make install

cd GeoIP
-1.4.8/ make install ./configure --group=nginx --prefix=/usr/local/nginx --add-module=../nginx-accesskey-2.0.3/ --add-module=../ngx_devel_kit-0.2.19/ --add-module=../lua-nginx-module-0.10.9rc5/ --with-http_secure_link_module --with-http_random_index_module --with-http_ssl_module --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-pcre=../pcre-8.35
--error-log-path=/usr/local/nginx/log/error.log --http-log-path=/usr/local/nginx/log/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var
/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail_ssl_module --with-file-aio --with-ipv6 --add-module=../ngx_cache_purge-master --with-http_geoip_module --with-stream --with-zlib=../zlib-1.2.8/ --with-openssl=../openssl-1.0.2k/ make make install