1. Verify that the GCC g++ Development class Library is installed, by default.
The UBUBTU platform compilation environment can use the following directives
Apt-get Install Build-essential
Apt-get Install Libtool
The CentOS Platform compilation environment uses the following directives
Install Make:
Yum-y install gcc automake autoconf libtool make
2. Installation dependencies
One-click installation of four dependencies
Yum install gcc or yum install gcc gcc-c++
Yum Install Pcre-devel
Yum Install zlib Zlib-devel
Yum Install OpenSSL Openssl-devel
Yum-y install gcc zlib zlib-devel pcre-devel OpenSSL openssl-devel
3. Select the installation file directory
Can select any directory, this article select CD/USR/LOCAL/SRC
Cd/usr/local/src
4, install Pcre library ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Download the latest pcre source package, download the compile and install the Pcre package using the command below:
Cd/usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
TAR-ZXVF pcre-8.37.tar.gz
CD pcre-8.34
./configure
Make
Make install
5, install zlib library http://zlib.net/zlib-1.2.11.tar.gz Download the latest zlib source package, download the compile and install the zlib package using the command below:
Cd/usr/local/src
wget http://zlib.net/zlib-1.2.11.tar.gz
TAR-ZXVF zlib-1.2.11.tar.gz
CD zlib-1.2.11
./configure
Make
Make install
6. Installing OpenSSL
Cd/usr/local/src
wget https://www.openssl.org/source/openssl-1.0.1t.tar.gz
TAR-ZXVF openssl-1.0.1t.tar.gz
7. Installing Nginx
cd/usr/local/
mkdir Nginx
CD Nginx
wget http://nginx.org/download/nginx-1.13.7.tar.gz
TAR-ZXVF nginx-1.13.7.tar.gz
CD nginx-1.13.7
./configure
Make
Make install
Here to run may error, see the specific error installation dependent program can be
8. Start Nginx
Cd/usr/local/nginx/sbin
./nginx
9.nginx Restart, shutdown, start
Start/usr/local/nginx/sbin/nginx-c/usr/local/nginx/nginx-1.13.7/conf/nginx.conf
Stop it:
1. View the process
Ps-ef|grep Nginx
2. Kill the Process
Kill-quit Process Number
Kill-int Process Number
Force Stop pkill-9 Nginx
Restart:
10. Successful Access
Linux installation Nginx