Nginx is installed in linux and nginxlinux

Source: Internet
Author: User

Nginx is installed in linux and nginxlinux

Yum install pcre *

Yum install openssl *

Yum install zlib

Yum install zlib-devel

Yum install wget

Check whether rpm-qa | grep "View content" has been installed"

2. Start nginx Installation

Wget http://nginx.org/download/nginx-1.8.0.tar.gz

3. Extract

If you want to copy the installation package elsewhere, you can cp nginx-1.8.0.tar.gz path (for example/usr/local)

Tar-zxvf nginx-1.8.0.tar.gz

4. Unzip the package and start installation.

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. Here I installed it in opt/nginx

Cd/opt/nginx

./Nginx // If the port is occupied when this step is executed:

Nginx: [emerg] bind () to 0.0.0.0: 80 failed (98: Address already in use)
Nginx: [emerg] bind () to 0.0.0.0: 80 failed (98: Address already in use)
Nginx: [emerg] bind () to 0.0.0.0: 80 failed (98: Address already in use)
Nginx: [emerg] bind () to 0.0.0.0: 80 failed (98: Address already in use)
Nginx: [emerg] bind () to 0.0.0.0: 80 failed (98: Address already in use)
Nginx: [emerg] still cocould not bind ()

I am using port 80 to check which ports are occupying port 80.

Fuser-n tcp 80

The returned message is 80/tcp: 12965 12966.

Then delete the process through kill-9

Kill-9 12965

Kill-9 12966

Then start 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 is any error contact author

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.