Install nginx-1.10.2 under Linux (RHEL7.0)

Source: Internet
Author: User

See if the current system version supports

Currently, the Nginx release package supports the following Linux operating system versions:

Rhel/centos:

Version Supported platforms
5.x x86_64, i386
6.x x86_64, i386
9.6 x86_64, Ppc64le

Debian:

Version Codename Supported platforms
9.6 Wheezy x86_64, i386
8.x Jessie x86_64, i386

Ubuntu:

Version Codename Supported platforms
12.04 Precise x86_64, i386
14.04 Trusty x86_64, i386, aarch64/arm64
16.04 Xenial x86_64, i386, Ppc64el

Sles:

Version Supported platforms
12 x86_64

We can enter the command line "Cat/etc/os-release" to view the current operating system version as follows:

[Email protected] local]# cat/etc/os-release
Name= "Red Hat Enterprise Linux Server"
Version= "7.0 (Maipo)"
Id= "Rhel"
Id_like= "Fedora"
Version_id= "7.0"
Pretty_name= "Red Hat Enterprise Linux Server 7.0 (Maipo)"
Ansi_color= "0;31"
Cpe_name= "Cpe:/o:redhat:enterprise_linux:7.0:ga:server"
Home_url= "https://www.redhat.com/"
Bug_report_url= "https://bugzilla.redhat.com/"

redhat_bugzilla_product= "Red Hat Enterprise Linux 7"
redhat_bugzilla_product_version=7.0
redhat_support_product= "Red Hat Enterprise Linux"
redhat_support_product_version=7.0

Visible, operating system belongs to rhel7.x, meet the requirements.

Download

You can enter the wget http://nginx.org/download/nginx-1.10.2.tar.gz command to get the resource bundle directly from the Internet, or you can download it yourself.

I here directly from the official website download nginx-1.10.2.tar.gz package, and put in the/usr/local directory;

Enter TAR-ZXVF nginx-1.10.2.tar.gz command to unzip.

Configuration

Enter the extracted directory:

cd/usr/local/nginx-1.10. 2

Start configuration, you can configure a variety of parameters and whether to enable some modules, etc., detailed configuration parameters can refer to the official website, with detailed instructions,

Http://nginx.org/en/docs/configure.html

As below, is my configuration:

./configure--prefix=/usr/local/nginx-1.10. 2 --conf-path=/usr/local/nginx-1.10. 2/nginx.conf--with-http_ssl_module--with-http_stub_status_module--with-http_gzip_static_module-- With-mail--with-mail_ssl_module
Compile

Enter the following command:

 Make  Make Install
Start the service

Enter the Sbin directory, enter the Nginx command, another restart command is nginx-s reload

Verify that the service is started

To view the process, the following is my Nginx service process

Root 20646 1 0 11:04? 00:00:00 Nginx:master Process Nginx
Nobody 20647 20646 0 11:04? 00:00:00 Nginx:worker Process Problems encountered

1, "Conf/koi-win" and "/usr/local/nginx/conf/koi-win" for the same file "

Configuration, add the configuration of the--conf-path parameter.

2, Nginx: [Emerg] bind () to 0.0.0.0:80 failed (98:address already on use)

The port is occupied, modify the port number. I have a tomcat here. The port configuration is 80 and can be changed to other.

Install nginx-1.10.2 under Linux (RHEL7.0)

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.