使用的是openEuler 22.03 (LTS-SP2)系统
yum源选择清华大学的源
https://mirrors.tuna.tsinghua.edu.cn/openeuler/
查看各个版本yum源中的需要软件的版本,如下,https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS-SP2/everything/x86_64/Packages/软件包中查看得知nginx版本为1.21.5,
由于nginx1.21.5版本及之前存在漏洞,继续查看其它,发现https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/everything/x86_64/Packages/中nginx版本较高,满足需求,因此改成此版本的yum源
切换到yum目录
[root@localhost nginx]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# cat openEuler.repo
#generic-repos is licensed under the Mulan PSL v2.
#You can use this software according to the terms and conditions of the Mulan PSL v2.
#You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v2 for more details.
[OS]
name=OS
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
[everything]
name=everything
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/everything/$basearch/RPM-GPG-KEY-openEuler
[EPOL]
name=EPOL
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/EPOL/main/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
[debuginfo]
name=debuginfo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/debuginfo/$basearch/RPM-GPG-KEY-openEuler
[source]
name=source
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/source/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/source/RPM-GPG-KEY-openEuler
[update]
name=update
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/update/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-22.03-LTS/OS/$basearch/RPM-GPG-KEY-openEuler
将openEuler-22.03-LTS全都改成openEuler-23.03
#generic-repos is licensed under the Mulan PSL v2.
#You can use this software according to the terms and conditions of the Mulan PSL v2.
#You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v2 for more details.
[OS]
name=OS
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/OS/$basearch/RPM-GPG-KEY-openEuler
[everything]
name=everything
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/everything/$basearch/RPM-GPG-KEY-openEuler
[EPOL]
name=EPOL
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/EPOL/main/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/OS/$basearch/RPM-GPG-KEY-openEuler
[debuginfo]
name=debuginfo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/debuginfo/$basearch/RPM-GPG-KEY-openEuler
[source]
name=source
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/source/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/source/RPM-GPG-KEY-openEuler
[update]
name=update
baseurl=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/update/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-23.03/OS/$basearch/RPM-GPG-KEY-openEuler
清楚yum缓存后重新加载,nginx版本变成1.23.2
[root@localhost yum.repos.d]# yum clean all
[root@localhost yum.repos.d]# yum list
[root@localhost yum.repos.d]# yum makecache
[root@localhost yum.repos.d]# yum info nginx
Last metadata expiration check: 0:21:11 ago on Fri 01 Sep 2023 10:29:45 AM CST.
Installed Packages
Name : nginx
Epoch : 1
Version : 1.23.2
Release : 2.oe2303
Architecture : x86_64
Size : 1.4 M
Source : nginx-1.23.2-2.oe2303.src.rpm
Repository : @System
From repo : everything
Summary : A HTTP server, reverse proxy and mail proxy server
URL : http://nginx.org/
License : BSD
Description : NGINX is a free, open-source, high-performance HTTP server and reverse proxy,
: as well as an IMAP/POP3 proxy server.
标签:cn,mirrors,--,nginx,yum,tsinghua,https,edu,openEuler
From: https://www.cnblogs.com/wangyuanguang/p/17671314.html