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.
|
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.
- Obtain the Nginx RPM package.
- Download the RPM package using a local browser.
- Nginx 1.14.2 (CentOS 7.6):
https://mirrors.huaweicloud.com/kunpeng/yum/el/7/aarch64/Packages/web/nginx-1.14.2-1.el7_4.aarch64.rpm
- Nginx 1.14.2 (CentOS 8.1): https://repo.huaweicloud.com/kunpeng/yum/el/8/aarch64/Packages/web/nginx-1.14.2-1.el8.ngx.aarch64.rpm
- Nginx 1.19.3 (CentOS 7.6):
https://repo.huaweicloud.com/kunpeng/yum/el/7/aarch64/Packages/web/nginx-1.19.3-1.el7.ngx.aarch64.rpm
- Nginx 1.14.2 (CentOS 7.6):
- 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
- Download the RPM package using a local browser.
- Install Nginx.
1rpm -ivh nginx-1.14.2-1.el7_4.aarch64.rpm
- View the Nginx installation directory.
1ls /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.
- View the Nginx version.
1/usr/local/nginx/sbin/nginx -v