Skip to content
/ NginX Public

How to compile and install Nginx from the source (Sample of nginx.conf)

Notifications You must be signed in to change notification settings

rcicm/NginX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to compile and install Nginx from the source on Linux (With a sample of nginx.conf)

Reference: http://wiki.nginx.org/Main

Downloading Packages:

NginX – http://wiki.nginx.org/Install
Zlib – http://zlib.net/ (Allow to use gzip to compress content before delivery to clients with gzip-enable)
PCREhttp://www.pcre.org/ (Allow to use Regular expressions in rewrite configuration)

Addons (Third party modules used by my own test – Not necessary in a basic instalation):
Http Healthcheck – http://wiki.nginx.org/HttpHealthcheckModule
Headers More – http://wiki.nginx.org/HttpHeadersMoreModule
Log RequestSpeed – http://wiki.nginx.org/HttpLogRequestSpeed

Unpacking:


$ tar -xzvf nginx-1.1.17.tar.gz
$ tar -xzvf pcre-8.30.tar.gz
$ tar -xzvf zlib-1.2.6.tar.gz

Configuring:


# Entering in the nginx directory
$ cd nginx-1.1.17/

# Run the configure setting the PCRE and ZLIB unpackeged paths (You can ignore the "--ad-module" if dont want
# use any of these modules)
$ ./configure --prefix=/opt/nginx --with-pcre=/[PATH_UNPACKING]/pcre-8.30/ --with-zlib=/[PATH_UNPACKING]/zlib-1.2.6 \
--with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module \
--add-module=/[PATH_UNPACKING]/http_healthcheck/ --add-module=/[PATH_UNPACKING]/headers_more \
--add-module=/[PATH_UNPACKING]/ngx_http_log_request_speed/

$ make

$ make install 


Author:

Rafael Inocencio <[email protected]>
https://github.com/rcicm

About

How to compile and install Nginx from the source (Sample of nginx.conf)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published