1. Install the basic environment package
Yum-y install GCC gcc-C ++ OpenSSL *
Yum-y install libjpeg-devel libpng-devel FreeType-devel
Yum-y install libxml2 libxml2-devel zlib-devel ncurses-devvel curl-devel
Yum-y install GD GD2 Gd-devel gd2-devel
Ii. Install PCRE
1. Download
Wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz
2. Decompress
Tar zxvf pcre-8.35.tar.gz
3. Installation
CD pcre-8.35
./Configure
Make & make install
3. Install nginx
1. Download nginx
Wget http://nginx.org/download/nginx-1.7.3.tar.gz
2. Decompress
Tar zxvf nginx-1.7.3.tar.gz
3. Installation
CD nginx-1.7.3
./Configure -- prefix =/opt/nginx -- with-http_ssl_module -- with-http_stub_status_module
Make & make install
Note: -- prefix =/opt/nginx, nging installation directory; -- with-http_ssl_module, enable the http ssl module so that nginx can support HTTPS requests. This module needs to be installed with OpenSSL; -- with-http_stub_status_module, enable nginx nginxstatus function, to monitor the current state of nginx.
4. Start nginx
Echo "/usr/local/lib">/etc/lD. So. conf
Tail-1/etc/lD. So. conf
Ldconfig
/Opt/nginx/sbin/nginx
Lsof-I: 80