one. Download Nginx
Download the latest version of Nginx from Nginx's official website (http://nginx.org/en/download.html), here i download nginx-1.9.12.
When the download is complete, get a compressed package as shown
Upload the Nginx tar package to the Linux server as shown in:
Two. Install Nginx2.1. Installation Prerequisites
Before installing Nginx, you need to make sure the system is installed with G++,GCC, Openssl-devel, Pcre-devel and Zlib-devel software.
1. Install the required software:yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
The installation process is as follows:
2.2. Install the Nginx dependency package:yum install GeoIP gd libXpm libxslt
The installation process is as follows:
2.2. Unzip the installation Nginx
Unzip the Nginx compression package into the directory where the Nginx installation package is located, as shown in:
Unzip complete, more than one nginx-1.9.12 directory, enter the nginx-1.9.12 directory to view the contents, as follows:
The installation of the source code generally consists of 3 steps: Configuration (Configure), compile (make), install (makes install)
1.执行./configure
./configure命令执行成功
2. Perform the make operation as shown in:
The make operation completes.
3. Perform the Make install command.
2.3. Verify that the installation Nginx is successful
1. View Nginx Installation path (Whereis nginx)
2. Start Nginx
In the browser input http://centos server IP access Nginx, such as my server IP address is: 115.159.95.35, input http://115.159.95.35/Access installed Nginx, access results as shown:
Can see the Nginx Welcome page normally, it means that Nginx has been installed successfully.
Centos installation Nginx