Installation source packet nginx 1

nginx source package download site http://nginx.org

To check and uninstall before installing HTTPD service to prevent port conflicts

HTTPD check whether the installation rpm -q httpd

Uninstall yum -y remove httpd

Installation support software as follows

pcre-devel zlib-devel openssl-devel.x86_64 gcc gcc-c ++ make (you can view it with rpm -q whether to install software)

1 users build nginx 

useradd -M -s / sbin / nologin nginx (-M -s does not create the user's home directory to change the login shell)

2 extract the source package

tar -xf nginx-1.16.1.tar.gz -C /usr/src

3 into the source package

cd /usr/src/nginx-1.16.1/

4 compile and install ngix

./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_stub_status_module && make && make install

(--With-http_stub_status_module for the log statistics module)

5 establish flexible connections

ln -s /usr/local/nginx/sbin/nginx /usr/local/sbin/

5 Check flexible connections

ll /usr/local/sbin/nginx

 

ngin compiler parameters

--prefix = points to the installation directory
--sbin-path points (execution) program file (nginx)
--conf-path = pointing profile (nginx.conf)
--error-log-path = directory pointing to the error log
--pid-path = pid file points (nginx.pid)
--lock-path = points to lock files (nginx.lock) (installation file locking to prevent the installation file is used by others, or your own misuse.)
--user = non-privileged user to specify the program is running
--group = non-privileged user group to specify when the program runs
--builddir = points to the build directory
--with-rtsig_module enable rtsig module support (real-time signal)
--with-select_module enable select the module support (a kind of polling mode is not recommended for use in high load environments) Disable: - without-select_module
--with-poll_module enable poll module supports (select the same function, and select the same characteristics as a polling mode, not recommended for use in a high load environment)
--with-file-aio-enabled file aio support (a kind of APL file transfer format)
--with-ipv6 enable ipv6 support
--with-http_ssl_module enabled ngx_http_ssl_module support (the support https requests need to have installed openssl)
--with-http_realip_module enabled ngx_http_realip_module support (This module allows to change the value of the client IP address from the request header is off by default)
--with-http_addition_module enabled ngx_http_addition_module support (as an output filter, the buffer is not completely supported, in portions response request)
--with-http_xslt_module enabled ngx_http_xslt_module support (filter converts the XML request)
--with-http_image_filter_module enabled ngx_http_image_filter_module support (a filter transfer JPEG / GIF / PNG images) (not enabled by default .gd library to use)
--with-http_geoip_module enabled ngx_http_geoip_module support (the module created based on customer and MaxMind GeoIP binary file to match the client IP address ngx_http_geoip_module variable)
--with-http_sub_module enabled ngx_http_sub_module support (allows text to replace some other text nginx response)
--with-http_dav_module enabled ngx_http_dav_module support (increase PUT, DELETE, MKCOL: create a collection, COPY and MOVE methods) is off by default, you need to compile open
--with-http_flv_module enabled ngx_http_flv_module support (seeking to provide memory-based file offset time)
--with-http_gzip_static_module enabled ngx_http_gzip_static_module support (online real-time compression output data stream)
--with-http_random_index_module enabled ngx_http_random_index_module support (randomly selected from a directory index directory)
--with-http_secure_link_module enabled ngx_http_secure_link_module support (computing and inspection requirements needed to secure the link URL)
--with-http_degradation_module enabled ngx_http_degradation_module support (allowed to return to 204 or 444 yards in low memory situations)
--with-http_stub_status_module enabled ngx_http_stub_status_module support (get working condition since the nginx since the last start)
--without-http_charset_module disabled ngx_http_charset_module support (re-encoded web page, but only in one direction - from server to client, and only one byte code can be re-encoded)
--without-http_gzip_module disabled ngx_http_gzip_module support (as with the module -with-http_gzip_static_module function)
--without-http_ssi_module disabled ngx_http_ssi_module support (the processing module provides a file server comprising (SSI) of the filter at the input, the SSI command list is incomplete currently supported)
--without-http_userid_module disabled ngx_http_userid_module support (the processing module is used to determine the subsequent request client cookies)
--without-http_access_module disabled ngx_http_access_module support (This module provides a simple host-based access control. allow / deny ip address based)
--without-http_auth_basic_module disabled ngx_http_auth_basic_module (This module is a user name and password http basic authentication method to protect your site or parts of it)
--without-http_autoindex_module disable disable ngx_http_autoindex_module support (This module is used to automatically generate directory listings, requesting only when ngx_http_index_module module index file is not found.)
--without-http_geo_module disabled ngx_http_geo_module support (create some variable whose value depends on the IP address of the client)
--without-http_map_module disabled ngx_http_map_module support (using an arbitrary key / value pairs Configuration Variable)
--without-http_split_clients_module disabled ngx_http_split_clients_module support (the dividing module is used based on some criteria such as user criteria:. ip address, header, cookies, etc.)
--without-http_referer_module disable disable ngx_http_referer_module support (module is used to filter the request, and reject Referer header value is not correct request)
--without-http_rewrite_module disabled ngx_http_rewrite_module support (This module allows the use of regular expressions to change the URI, and select the configuration according to the steering and variable. If this option is set at the server level, then they will come into force before the location. If there are more location further rewrite rules, location rules section will still be executed. If the URI rewrite rules location because part of the cause, then the location will be executed as part of the new URI again. this loop will execute 10 times, then Nginx It will return a 500 error.)
--without-http_proxy_module disabled ngx_http_proxy_module support (about the proxy server)
--without-http_fastcgi_module disabled ngx_http_fastcgi_module support (This module allows interaction with Nginx FastCGI process, and to control the FastCGI process works by passing parameters.) FastCGI a permanent type of Common Gateway Interface.
--without-http_uwsgi_module disabled ngx_http_uwsgi_module support (uwsgi medical protocol for the module, uWSGI server-related)
--without-http_scgi_module disabled ngx_http_scgi_module support (the module is used to enable SCGI protocol support, SCGI protocol is an alternative to CGI protocol. It is an application with HTTP service interface standard. It is somewhat like FastCGI but his design is easier to achieve. )
HTTP_---without memcache d_module ngx_http_memcached_module support disabled (the cache module for providing a simple, in order to improve system efficiency)
-without-http_limit_zone_module disabled ngx_http_limit_zone_module support (for the module may condition, the number of concurrent sessions under connection control)
--without-http_limit_req_module disabled ngx_http_limit_req_module support (This module allows you to limit the number of requests for an address with a given session or a specific event)
--without-http_empty_gif_module disabled ngx_http_empty_gif_module support (the module resident transparent GIF image a 1 * 1 in memory, can be very fast call)
. --Without-http_browser_module disabled ngx_http_browser_module support (module is used to create the value depends on the request header if the browser modern, the instruction dispatch modern_browser_value $ modern_browser equal value; if the browser is old, equal to the $ ancient_browser instruction dispatch ancient_browser_value value; if the browser is any version of MSIE, the $ msie equal to 1)
--without-http_upstream_ip_hash_module disabled ngx_http_upstream_ip_hash_module support (the module for simple load balancing)
HTTP_---with perl _Module enabled ngx_http_perl_module support (nginx can use the module to make calls perl perl directly or through ssi)
--with-perl_modules_path = path setting module perl
--with-perl = perl library file path setting
--http-log-path = path setting access log
--http-client-body-temp-path = http client request to set temporary file path
--http-proxy-temp-path = http proxy setting temporary file path
--http-fastcgi-temp-path = http fastcgi set temporary file path
--http-uwsgi-temp-path = http uwsgi set temporary file path
--http-scgi-temp-path = http scgi set temporary file path
-without-http disable the http server function
--without-http-cache disable http cache function
--with-mail-enabled POP3 / IMAP4 / SMTP proxy module support
--with-mail_ssl_module support enabled ngx_mail_ssl_module
--without-mail_pop3_module disabled pop3 protocol (POP3 ie Post Office Protocol version 3, which is how the provisions of the personal computer to connect to the mail server on the Internet to send and receive e-mail protocol. The first is a standard Internet e-mail off-line protocol, POP3 protocol allows users to store the mail from the server to the local host, deleted or stored on the mail server based on the client's operating .POP3 mail protocol is TCP / IP protocol suite one, mainly used to support the use of client remote management on the server e-mail)
--without-mail_imap_module disabled imap protocol (a kind of mail acquisition agreement. Its main role is to mail client can get a message through this agreement from the mail server information, download mail .IMAP protocol running over TCP / IP Agreement on the use port 143. it is the main difference with the POP3 protocol is that you can not put all the mail all the download, you can mail on the server operate directly by the client.)
--without-mail_smtp_module disabled smtp Protocol (SMTP Simple Mail Transfer Protocol, which is a set of rules for transmitting from the source address to the destination address of the message, the relay method .SMTP protocol letters belonging to it to control TCP / IP protocol suite. it helps each computer to find the next destination or transit when sending mail.)
--with-google_perftools_module enabled ngx_google_perftools_module support (for debugging, analysis of performance bottlenecks)
--with-cpp_test_module support enabled ngx_cpp_test_module
--add-module = enable external module support
--with-cc = C compiler directed path
--with-cpp = path point C Pretreatment
--with-cc-opt = C compiler parameter set (the PCRE library, specify -with-cc-opt = "- I / usr / local / include", if the use of select () function of the need to increase the file descriptor number, can -with-cc- opt = "- D FD_SETSIZE = 2048" designation).
--with-ld-opt = Connected file parameters. (The PCRE library, specify -with-ld-opt = "- L / usr / local / lib".)
--with-cpu-opt = compiled designated CPU, the available values: pentium, pentiumpro, pentium3, pentium4, athlon, opteron, amd64, sparc32, sparc64, ppc64
--without-pcre disable the pcre library
--with-pcre pcre library enabled
--with-pcre = point pcre library directory
--with-pcre-opt = pcre library to set additional parameters at compile time
--with-md5 = md5 point to library files directory (message digest algorithm fifth edition, provides protection for the integrity of the message)
--with-md5-opt = provided additional parameters at compile time library md5
--with-md5-asm assembler source using md5
--with-sha1 = point sha1 library catalog (Digital Signature Algorithm, mainly used for digital signatures)
--with-sha1-opt = additional parameters to set the library at compile time sha1
--with-sha1-asm assembler source using sha1
--with-zlib = point zlib library catalog
--with-zlib-opt = additional parameters to set at compile time zlib
--with-zlib-asm = CPU zlib using specified optimization assembler source, CPU type of pentium, pentiumpro
--with-libatomic provide a framework for the realization of the memory updating operation atoms
--with-libatomic = point libatomic_ops installation directory
--with-openssl = openssl installation directory point
--with-openssl-opt additional parameters to set at compile time openssl
--with-debug Enable debug log

Guess you like

Origin www.cnblogs.com/shinian12138/p/11481567.html