1, first to install the Nginx module's dependency package
Yum install gcc-c++ yum install pcre pcre-devel yum install zlib zlib-devel
2, check whether it has been installed with Nginx
3, if the system has installed Nginx, the first uninstall
Yum Remove Nginx
4. Enter the/usr/local directory
Cd/usr/local
5. Download the latest stable version of Nginx from official website
wget http://nginx.org/download/nginx-1.6.2.tar.gz
6. Decompression
TAR-ZXVF nginx-1.6.2.tar.gz
7. Enter the catalogue
CD nginx-1.6.2
8, next installation, use the--prefix parameter to specify the Nginx installation directory, configuration configure, compile make, installation make install
./configure $ default installation on/usr/local/nginx make
9, installation complete, view the installation directory
Whereis Nginx
10. Enter the installation directory
CD /usr/local/nginx/sbin./nginx-t
Effect:
11. Start Nginx
[Email protected] sbin]#./nginx
12. View port number
[Email protected] sbin]# NETSTAT-NTLP
13. Open Browser access (default port 80)
Linux installation Nginx