- Before installing, verify that the compilation package and some dependent packages are installed if they are not installed:
Yum Install pcre*
Yum Install openssl*
Yum Install zlib
Yum Install Zlib-devel
Yum Install wget
See if RPM-QA is already installed | grep "What to see"
2. Start installing Nginx
wget http://nginx.org/download/nginx-1.8.0.tar.gz
3. Unzip
If you want to copy the installation package elsewhere you can CP nginx-1.8.0.tar.gz path (e.g./usr/local)
TAR-ZXVF nginx-1.8.0.tar.gz
4. Start installation after decompression
CD nginx-1.8.0
./configure--prefix=/opt/nginx--with-http_stub_status_module//--prefix=/opt/nginx This is the specified installation path
5. Start Nginx I installed it in the Opt/nginx.
Cd/opt/nginx
./nginx//If a port is occupied when performing this step:
Nginx: [Emerg] bind () to 0.0.0.0:80 failed (98:address already on use)
Nginx: [Emerg] bind () to 0.0.0.0:80 failed (98:address already on use)
Nginx: [Emerg] bind () to 0.0.0.0:80 failed (98:address already on use)
Nginx: [Emerg] bind () to 0.0.0.0:80 failed (98:address already on use)
Nginx: [Emerg] bind () to 0.0.0.0:80 failed (98:address already on use)
Nginx: [Emerg] still could not bind ()
I'm here 80 ports are occupied see which takes up 80 ports
Fuser-n TCP 80
The return message is 80/tcp:12965 12966
Then delete the process through kill-9
Kill-9 12965
Kill-9 12966
And then start the Nginx.
./nginx
This article is a comprehensive http://happyqing.iteye.com/blog/1806561 http://jingyan.baidu.com/article/1974b2898f5eadf4b1f774de.html Http://www.laozuo.org/3510.html practice summed up if there's anything wrong contact the author
Nginx installed under Linux