Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Nginx by Using the Yum Source Obtained from a Mirror Site

The following describes how to install Nginx 1.14.2 on CentOS 7.6 using the Yum command of the mirror site. You can also refer to this section to install Nginx 1.19.3.

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

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.
  1. Run the curl command to access any website. If the website information is displayed, the proxy is successfully configured and the Internet is connected.
  2. Configure the network source.
    1. Go to the /etc/yum.repos.d directory.
      1
      cd /etc/yum.repos.d
      
    2. Create a file named rpm.repo.
      vi rpm.repo
    3. Press i to enter the insert mode and add the following content to the file:
      [rpm]
      name=rpm
      baseurl=https://mirrors.huaweicloud.com/kunpeng/yum/el/7/aarch64/
      gpgcheck=0
      enabled=1

      Set baseurl to the address of the mirror site.

    4. Press Esc, type :wq!, and press Enter to save the file and exit.
  3. Make the network source take effect.
    1
    2
    3
    yum clean all
    yum makecache
    yum list
    
  4. Install Nginx.
    1
    yum -y install nginx-1.14.2-1.el7_4.aarch64 --enablerepo=rpm
    
  5. View the Nginx installation directory.
    ls /usr/local/nginx

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