Nginx installed under Linux

Source: Internet
Author: User

    1. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.