The first step:
Download the latest nginx, address Nginx official website http://nginx.org/, select the latest
Download Save
Step Two:
In the CentOS Terminal download folder to find the downloaded file, perform the decompression name ning command TAR-ZXVF Nginx.tar, after the successful decompression into the extracted Nginx file to run./configure command, wait for the program to run, There are generally three errors:
The first run./configure command will burst ERROR:C compiler cc is not found, this is a hint of missing C or C + + files, Workaround: Run command yum-y install gcc gcc-c++ autoconf au Tomake command can be installed online, waiting to complete.
The second run./configure command will burst error:the HTTP rewrite module requires the PCRE Library, Workaround: Run command yum-y install PCRE pcre-devel command to To be installed online, waiting to be completed.
The third run./configure command will burst error:the HTTP gzip module requires the Zlib library, Workaround: Run command yum-y install zlib zlib-devel command to be online installed, waiting to complete.
Run again at this time./configure command to detect success below make and then install input make install to complete the installation.
Step Three:
Enter the/usr/local/directory to see if there is an Nginx folder, which means the installation was successful.