opencloudos install nginx new version

Opencloudos is basically fully compatible with the operation of centos, and the source management method is also applicable to yum.

After installing an opencloudos, I want to install nginx.

By default it is installed using:

yum install nginx

However, version 1.14 is installed by default. This version has several http vulnerabilities. After using it for a while, you will receive a text message from Tencent Cloud. Since you have been reminded, let’s fix it. After all, there are loopholes or risks. . . Received a cve-2019-9511 vulnerability notification

I tried the way of setting nginx source and it seems that it is not very easy to use. It is better to install the nginx installation package directly.

The installation package of nginx is as follows:

Uninstall the currently installed nginx

Save the configuration under nginx.conf and configured conf.d folders.

nginx -s stop
yum remove nginx

Download the installation package

First look at what the current system architecture is

arch
# ==> x86_64 之类的

Next, go to the official website to find the corresponding installation package. The official website address https://nginx.org/packages/centos/8 , you can browse to find it. nginx-1.24.0-1.el8.ngx.x86_64.rpm from https://nginx.org/packages/centos/8/x86_64/RPMS/ used in this example .

Please add image description here

Next install the download package.

rpm -Uvh nginx-1.24.0-1.el8.ngx.x86_64.rpm

view version

nginx -V
# nginx version: nginx/1.24.0

Copy the configuration you just saved to the current address, and you're done.

Then press the start button~

nginx

Guess you like

Origin blog.csdn.net/xo19882011/article/details/131320617