Nginx Installation
? 1. Installation Dependent environment
–yum-y install gcc automake autoconf libtool make
–yum-y install gcc gcc-c++ pcre-devel OpenSSL openssl-devel
? 2, install Pcre, Zlib, the former in order to rewrite rewrite, the latter in order to gzip compression.
Install Pcre (Apache has downloaded and installed can skip)
[Email protected] ~]# wget Https://netix. dl. SourceForge net/project/pcre/pcre/8.40/pcre-8.41 . Tar. GZ
[Email protected] ~]# TAR-ZXVF pcre-8.41.tar.gz
Installing zlib
[Email protected] ~]# wget http://www.zlib.net/zlib-1.2.8.tar.gz
[Email protected] zlib-1.2.8]# CD zlib-1.2.8
[Email protected] zlib-1.2.8]#/configure--prefix=/usr/local/zlib
[[email protected] zlib-1.2.8]# make && make install
Nginx Installation
? 3. Installing OpenSSL
[Email protected] ~]# wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
[Email protected] ~]# TAR-ZXVF openssl-1.0.1t.tar.gz
? 4, Nginx Installation
: http://nginx.org/en/download.html
[Email protected] ~]# TAR-XVF Nginx-1.13.8.tar
[Email protected] nginx-1.13.8]#./configure--sbin-path=/usr/local/nginx/nginx--
conf-path=/usr/local/nginx/nginx.conf--pid-path=/usr/local/nginx/nginx.pid--with-
Http_ssl_module--with-pcre=/root/pcre-8.41--with-zlib=/usr/local/zlib--with-
Openssl=/root/openssl
[[email protected] nginx-1.13.8] #make && make install
Installation of Linux Nginx