Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Nginx Using the Mirror Site RPM Package

The following describes how to install Nginx 1.14.2 on CentOS 7.6 using the RPM package of the mirror site. You can also refer to this section to install Nginx of other versions.

Table 1 lists the Nginx version and OS version that can be installed using the mirror site RPM package.

Table 1 Applicable Nginx versions and OS versions

Software Version

Whether to Support CentOS 7.6

Whether to Support CentOS 8.1

Whether to Support openEuler 20.03 (LTS-SP1)

Nginx 1.14.2

Yes

Yes

No

Nginx 1.19.3

Yes

No

No

  • The binary packages available at the Kunpeng mirror site are compiled and packaged based on the open source code, and do not involve vulnerability or bug fixes.
  • When using open source software, comply with the applicable license agreements.

In the following commands, 1.14.2 indicates the Nginx version. When installing another version, replace 1.14.2 with the actual version.

  1. Obtain the Nginx RPM package.
    1. Download the RPM package using a local browser.

      Download addresses:

    2. Copy the RPM package to the /home directory on the server.
      If the server is connected to the Internet, you can run the wget command on the server to download the RPM package. The following describes how to download the RPM package of Nginx 1.14.2 by using the wget command on CentOS 7.6. When the RPM package of other Nginx versions is downloaded, replace the download link of the Nginx RPM package.
      1
      2
      cd /home
      wget https://mirrors.huaweicloud.com/kunpeng/yum/el/7/aarch64/Packages/web/nginx-1.14.2-1.el7_4.aarch64.rpm --no-check-certificate
      
  2. Install Nginx.
    1
    rpm -ivh nginx-1.14.2-1.el7_4.aarch64.rpm
    
  3. View the Nginx installation directory.
    1
    ls /usr/local/nginx
    

    If you install Nginx 1.14.2 or Nginx 1.19.3 using the mirror site RPM on CentOS 7.6 or CentOS 8.1, the default Nginx installation directory is /etc/nginx.

  4. View the Nginx version.
    1
    /usr/local/nginx/sbin/nginx -v