Author Ayou: http: sudone.com: when compiling nginx, you must first install external support programs such as pcre and zlib, and then specify the location of these external support programs when compiling and installing nginx, in this way, nginx will dynamically load these items each time it is started. The following describes another method to compile these programs into nginx.
Author Ayou: http ://SuDone.com
During nginx compilation, you must first install external support programs such as pcre and zlib, and then specify the location of these external support programs during nginx compilation and installation. This way, nginx is started every time, these things will be loaded dynamically.
Next we will introduce another way to compile these programs into nginx, so that nginx will not load them dynamically at startup. It can be learned from the ancient spectrum that this method is more efficient than dynamic loading.
Download:
1. wget http://www.openssl.org/source/openssl-0.9.8l.tar.gz
2. wgetFtp: // Ftp. csx. cam. ac. uk/pub/software/programming/pcre/pcre-8.00.tar.bz2
3. wget http://www.zlib.net/zlib-1.2.3.tar.bz2
4. wget http://nginx.org/download/nginx-0.8.30.tar.gz
Solve all these thingsCompressionThen there will be:
1. openssl-0.9.8l
2. pcre-8.00
3. zlib-1.2.3
4. nginx-0.8.30
I put these directories in/data/download/. In the original method, we need to compile and install them in the openssl, pcre, and zlib directories, directly go to the nginx directory.
1.CdNginx-0.8.30
2./configure -- prefix =/data/nginx -- with-http_realip_moDuLe -- with-http_sub_module -- with-http_flv_module -- with-http_dav_module -- with-http_gZip_StatIc_module -- with-http_stub_status_module -- with-http_aDdItion_module -- with-pcre =/data/download/pcre-8.00 -- with-openssl =/data/download/openssl-0.9.8l -- with-http_ssl_module -- with-zlib =/data/download/zlib-1.2.3
3. make
4. make install
The installation can be completed. It takes a long time to install this method, because you need to compile the external program first. It is worth noting that the-j multi-process method cannot be added to make, only single-process make can be used, otherwise it will fail. If your application does not require openssl, you do not need to download openssl and remove it in configure. In addition, nginx's google_perftooLs_ Module cannot be compiled in this way, so you must install google_perftools externally.