Centeros insatall nginx
++
Install related dependent libraries:
++
Yum-y install GCC gcc-C ++ glibc-devel glib2 glib2-devel libxml2-devel Autoconf
Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
Tar zxvf pcre-8.30.tar.gz
CD pcre-8.30
./Configure
Make
Make install
Wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
Tar zxvf openssl-1.0.1c.tar.gz
CD openssl-1.0.1c
./Configure -- prefix =/usr/local/OpenSSL
Make depend
Make
Make install
++
Install nginx
++
Wget http://sysoev.ru/nginx/nginx-0.6.31.tar.gz
Tar zxvf nginx-0.6.31.tar.gz
CD nginx-0.6.31
./Configure -- with-http_stub_status_module -- with-http_ssl_module -- prefix =/usr/local/nginx/
Make
Make install
CD/usr/local/ngin/sbin/nginx-T
If error:
LDD $ (which/usr/local/nginx/sbin/nginx)
Export LIBRARY_PATH =/usr/local/lib/
Export LIBRARY_PATH =/usr/local/lib/root/pcre-8.30/. libs/
If 64bit system:
CD/lib64
Ln-S/usr/local/lib/libpcre. so.1.0.0 libpcre. so.1
Else:
CD/lib
Ln-S/usr/local/lib/libpcre. so.1.0.0 libpcre. so.1
++ ++
The nginx./configure options are as follows:
++ ++
-- Prefix = <path>-nginx installation path. If not specified, the default value is/usr/local/nginx.
-- Sbin-Path = <path>-nginx Executable File Installation path. It can only be specified during installation. If it is not specified, the default value is <prefix>/sbin/nginx
-- Conf-Path = <path>-the default nginx. conf path without the-C option. If not specified, the default value is <prefix>/CONF/nginx. conf.
-- PID-Path = <path>-if no PID command is specified in nginx. conf, the default nginx. PID path is used. If not specified, the default value is <prefix>/logs/nginx. PID.
-- Lock-Path = <path>-nginx. Lock file path
-- Error-log-Path = <path>-default error log path when no error_log command is specified in nginx. conf. If not specified, the default value is <prefix>/logs/error. log.
-- Http-log-Path = <path>-the default access log path when no access_log command is specified in nginx. conf. If not specified, the default value is <prefix>/logs/access. log.
-- User = <user>-the default nginx user if no USER command is specified in nginx. conf. If not specified, the default value is nobody.
-- Group = <group>-the default group used by nginx when no USER command is specified in nginx. conf. If not specified, the default value is nobody.
-- Builddir = Dir-specify the compiled directory
-- With-rtsig_module-enables the rtsig Module
-- With-select_module -- without-select_module-whether or not to enable the select module. this module is enabled by default if a more suitable method such as kqueue, epoll, rtsig or/dev/poll is not discovered by configure.
// Select mode is allowed or not allowed. If configure does not find a more suitable mode, such as kqueue (Sun OS), epoll (Linux kenel 2.6 +), rtsig (real-time signal) or/dev/poll (a select-like mode, the underlying implementation is basically the same as the select, all adopt the Round Training Method) select mode will be the default installation mode
-- With-poll_module -- without-poll_module-whether or not to enable the poll module. this module is enabled by default if a more suitable method such as kqueue, epoll, rtsig or/dev/poll is not discovered by configure.
-- With-http_ssl_module-enable ngx_http_ssl_module. enables SSL support and the ability to handle HTTPS requests. Requires OpenSSL. On Debian, this is libssl-Dev.
// Enable the http ssl module so that nginx can support HTTPS requests. OpenSSL must be installed in this module, which is libssl On Debian.
-- With-http_realip_module-enable ngx_http_realip_module
-- With-http_addition_module-enable ngx_http_addition_module
-- With-http_sub_module-enable ngx_http_sub_module
-- With-http_dav_module-enable ngx_http_dav_module
-- With-http_flv_module-enable ngx_http_flv_module
-- With-http_stub_status_module-enable the "server status" Page
-- Without-http_charset_module-Disable ngx_http_charset_module
-- Without-http_gzip_module-Disable ngx_http_gzip_module. If enabled, zlib is required
-- Without-http_ssi_module-Disable ngx_http_ssi_module
-- Without-http_userid_module-Disable ngx_http_userid_module
-- Without-http_access_module-Disable ngx_http_access_module
-- Without-http_auth_basic_module-Disable ngx_http_auth_basic_module
-- Without-http_autoindex_module-Disable ngx_http_autoindex_module
-- Without-http_geo_module-Disable ngx_http_geo_module
-- Without-http_map_module-Disable ngx_http_map_module
-- Without-http_referer_module-Disable ngx_http_referer_module
-- Without-http_rewrite_module-Disable ngx_http_rewrite_module. PCRE required if enabled
-- Without-http_proxy_module-Disable ngx_http_proxy_module
-- Without-http_fastcgi_module-Disable ngx_http_fastcgi_module
-- Without-http_memcached_module-Disable ngx_http_memcached_module
-- Without-http_limit_zone_module-Disable ngx_http_limit_zone_module
-- Without-http_empty_gif_module-Disable ngx_http_empty_gif_module
-- Without-http_browser_module-Disable ngx_http_browser_module
-- Without-http_upstream_ip_hash_module-Disable ngx_http_upstream_ip_hash_module
-- With-http_perl_module-enable ngx_http_perl_module
-- With-perl_modules_path = path-specifies the path to the Perl Module
-- With-perl = path-specifies the path of the Perl execution File
-- Http-log-Path = path-set path to the HTTP access log
-- Http-client-body-temp-Path = path-set path to the HTTP client request body temporary files
-- Http-proxy-temp-Path = path-set path to the HTTP Proxy temporary files
-- Http-FastCGI-temp-Path = path-set path to the HTTP FastCGI temporary files
-- Without-http-Disable HTTP Server
-- With-mail-enable IMAP4/POP3/SMTP proxy Module
-- With-mail_ssl_module-enable ngx_mail_ssl_module
-- With-CC = path-specifies the C compiler path
-- With-CPP = path-specifies the path of the C Preprocessor
-- With-CC-opt = options-additional parameters which will be added to the variable cflags. with the use of the system library PCRE in FreeBSD, it is necessary to indicate -- With-CC-opt = "-I/usr/local/include ". if we are using select () and it is necessary to increase the number of file descriptors, then this also can be assigned here: -- With-CC-opt = "-D fd_setsize = 2048 ".
-- With-LD-opt = options-additional parameters passed to the linker. with the use of the system library PCRE in FreeBSD, it is necessary to indicate -- With-LD-opt = "-l/usr/local/lib ".
-- With-CPU-opt = CPU-for specific CPU compilation, valid values include: Pentium, pentiumpro, pentium3, pentium4, athlon, opteron, amd64, sparc32, sparc64, ppc64
-- Without-PCRE-Disable the use of the PCRE Library. The HTTP rewrite module is also disabled. The regular expression in the "location" configuration command also needs PCRE
-- With-PCRE = Dir-specifies Source code Path
-- With-PCRE-opt = options-set additional options for PCRE Building
-- With-md5 = Dir-set path to MD5 library sources
-- With-md5-opt = options-set additional options for MD5 Building
-- With-md5-asm-use MD5 receiver sources
-- With-sha1 = Dir-set path to sha1 library sources
-- With-sha1-opt = options-set additional options for sha1 Building
-- With-sha1-asm-use sha1 extends er sources
-- With-zlib = Dir-set path to zlib library sources
-- With-zlib-opt = options-set additional options for zlib Building
-- With-zlib-ASM = CPU-use zlib Using ER sources optimized for specified CPU, valid values are: Pentium, pentiumpro
-- With-OpenSSL = Dir-set path to OpenSSL library sources
-- With-OpenSSL-opt = options-set additional options for OpenSSL Building
-- With-debug-enable debugging logs
-- Add-module = path-add in a third-party module found in directory path
Good luck ~~~~~~