Install nginx source code
Last Update:2014-05-15
Source: Internet
Author: User
Install and install nginx source code in the following Environment: Operating system: Ubuntu12.04Nginx: V1.4.2PCRE: V8.33zlib: V1.2.8... install and install nginx source code environment: Ubuntu 12.04 Nginx: V1.4.2 PCRE: V8.33 zlib: V1.2.8 download the above source package to the current user's home directory (local:/home/tdtc100 ). 1. install zlib (1) decompress [plain] tdtc100 @ ubuntu :~ $ Tar zxvf zlib-1.2.8.tar.gz (2) install [plain] tdtc100 @ ubuntu :~ $ Cd zlib-1.2.8 tdtc100 @ ubuntu :~ /Zlib-1.2.8 $./configure tdtc100 @ ubuntu :~ /Zlib-1.2.8 $ make tdtc100 @ ubuntu :~ Zlib-1.2.8 $ sudo make install 2. install PCRE (1) install the dependency package c ++ [plain] sudo apt-get install build-essential note: if not installed, when (3), the following error occurs: [plain] configure: error: You need a C ++ compiler for C ++ support. (2) decompress [plain] tdtc100 @ ubuntu :~ Install [plain] tdtc100 @ ubuntu :~ $ Cd pcre-8.33 tdtc100 @ ubuntu :~ /Pcre-8.33 $./configure tdtc100 @ ubuntu :~ /Pcre-8.33 $ make tdtc100 @ ubuntu :~ Pcre-8.33 $ sudo make install 3. install nginx (1) install the dependency package open-ssl library [plain] sudo apt-get install libcurl4-openssl-dev note: if not installed, when (3) is performed, the following occurs: [plain]. /configure: error: SSL modules require the OpenSSL library. you can either do not enable the modules, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using -- with-openssl = Option. (2) decompress [plain] tdtc100 @ ubuntu :~ $ Tar zxvf nginx-1.4.2.tar.gz (3) installation reference official documentation [plain] tdtc100 @ ubuntu :~ $ Cd nginx-1.4.2 tdtc100 @ ubuntu :~ Nginx-1.4.2 $. /configure \> -- sbin-path =/usr/local/nginx \> -- conf-path =/usr/local/nginx. conf \> -- pid-path =/usr/local/nginx. pid \> -- with-http_ssl_module \> -- with-pcre = .. /pcre-8.33 \> -- with-zlib = .. /zlib-1.1.3 tdtc100 @ ubuntu :~ /Nginx-1.4.2 $ make tdtc100 @ ubuntu :~ /Nginx-1.4.2 $ sudo make install --------------------------- installation completed --------------------- xiaobin_hlj80 running: [plain] tdtc100 @ ubuntu:/usr/local/nginx $ sudo./nginx running effect: