1. First install centos6.3, 32-bit, minimal installation
Create an nginx user group, user
Useradd-s/sbin/nologin-g nginx-r
Useradd-s/sbin/nologin-g nginx-r nginx
2. yum-y install gcc-c ++ autoconf automake necessary compilation software
3. yum-y install zlib-devel openssl-devel pcre-devel in this step, openssl and pcre may not be correctly installed. Please refer to step 2.
4. Install the pcre Library
4.1 mkdir/usr/local/atfire-p; cd/usr/local/atfire
4.2 get software wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ address may change, can download to the official website
4.3 decompression, configuration, installation, one-stop
Tar-zxvf pcre-8.3.3.tar.gz
./Configure
Make
Make install
5. Install openssl
5.1 cd/usr/local/atfire; enter the Directory
5.2 wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
5.3 tar-zxvf openssl-1.0.1c.tar.gz
5.4 is over. That's right. You're not mistaken. You don't have to install it. You just need to have this source package.
6. Install nginx
6.1 enter the directory cd/usr/local/atfire;
6.2 download nginx.org/download/nginx-1.4.4.tar.gz
6.3 unzip tar-zxvf nginx-1.4.4.tar.gz
6.4 go to directory cd nginx-1.4.4
6.5 Configuration
. /Configure -- prefix =/usr -- sbin-path =/usr/sbin/nginx -- conf-path =/etc/nginx. conf -- error-log-path =/var/log/nginx/error. log -- pid-path =/var/run/nginx. pid -- lock-path =/var/lock/nginx. lock -- user = nginx -- group = nginx -- with-openssl =/usr/local/src/openssl-1.0.1c -- with-pcre =/usr/local/src/pcre-8.33 -- with-http_ssl_module -- with-http_flv_module -- with-http_gzip_static_module -- http-log-path =/var/log/nginx/access. log -- http-client-body-temp-path =/var/temp/nginx/client -- http-proxy-temp-path =/var/tmp/nginx/proxy -- http- fastcgi-temp-path =/var/tmp/nginx/fcgi -- with-http_stub_status_module 6.6 make & make install
7. Start 1. /usr/sbin/nginx-c/etc/nginx. conf 2. the error mkdir () "/var/tmp/nginx/client ".................. Yes. A temporary directory is specified during configuration, but the directory is not created. create a temporary directory mkdir/var/tmp/nginx/client-pv and run/usr/sbin/nginx-c/etc/nginx again. conf 8. check whether to start 1 first view the process ps aux | grep nginx 2. check whether netstat-tulnp is monitored | grep 80