国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

【華為云】如何在華為云歐拉系統(tǒng) ECS 實(shí)例新建私有 REPO 源并制作安全 RPM 包

這篇具有很好參考價(jià)值的文章主要介紹了【華為云】如何在華為云歐拉系統(tǒng) ECS 實(shí)例新建私有 REPO 源并制作安全 RPM 包。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

寫(xiě)在前面


  • 工作中遇到,簡(jiǎn)單整理
  • 博文內(nèi)容為 華為云開(kāi)發(fā)者認(rèn)證 實(shí)驗(yàn)筆記
  • https://edu.huaweicloud.com/certificationindex/developer/9bf91efb086a448ab4331a2f53a4d3a1
  • 理解不足小伙伴幫忙指正

對(duì)每個(gè)人而言,真正的職責(zé)只有一個(gè):找到自我。然后在心中堅(jiān)守其一生,全心全意,永不停息。所有其它的路都是不完整的,是人的逃避方式,是對(duì)大眾理想的懦弱回歸,是隨波逐流,是對(duì)內(nèi)心的恐懼 ——赫爾曼·黑塞《德米安》


在某些情況下,我們可能需要在華為云歐拉系統(tǒng)ECS實(shí)例上新建私有REPO源:

通過(guò)創(chuàng)建私有REPO源,您可以在本地維護(hù)和管理自己的軟件包,而無(wú)需依賴(lài)公共的軟件源。這對(duì)于需要在內(nèi)部網(wǎng)絡(luò)環(huán)境中部署應(yīng)用程序或提供特定軟件包的組織非常有用。私有REPO源還可以提供更好的訪問(wèn)速度和安全性。

同時(shí)可以控制軟件包的分發(fā)方式。您可以選擇將軟件包限制為特定的用戶(hù)或組織,并根據(jù)需要進(jìn)行訪問(wèn)控制。這樣可以確保只有授權(quán)的人員可以訪問(wèn)和使用您的軟件包。

通過(guò)在華為云歐拉系統(tǒng)ECS實(shí)例上新建私有REPO源并制作安全的RPM包,您可以更好地管理和控制軟件包的分發(fā)過(guò)程,并確保軟件包的安全性和完整性。

今天和小伙伴們分享如何在華為云歐拉系統(tǒng)ECS 新建私有 REPO 源 并制作安全 RPM 包

安裝 rpm-build

rpm-build 是一個(gè)用于構(gòu)建 RPM 軟件包的工具集合。RPM(Red Hat Package Manager)是一種在 Linux 發(fā)行版中使用的軟件包管理系統(tǒng),如Red Hat Enterprise Linux(RHEL),CentOS和Fedora。它允許您創(chuàng)建、安裝、升級(jí)和管理系統(tǒng)上的軟件包。

rpm-build 軟件包提供了從源代碼構(gòu)建RPM軟件包所需的工具和實(shí)用程序,其中包括規(guī)范文件(spec file)。規(guī)范文件包含有關(guān)軟件包的信息以及構(gòu)建和安裝軟件包的指令。

以下是rpm-build軟件包提供的一些關(guān)鍵組件和實(shí)用程序:

rpmbuild:這是主要的命令行工具,用于構(gòu)建RPM軟件包。它接受一個(gè)規(guī)范文件作為輸入,并執(zhí)行構(gòu)建軟件包的必要步驟,包括編譯源代碼、創(chuàng)建軟件包結(jié)構(gòu)和生成RPM軟件包文件。

rpmspec:此實(shí)用程序用于驗(yàn)證和解析規(guī)范文件??梢允褂盟跇?gòu)建軟件包之前檢查規(guī)范文件的語(yǔ)法和正確性。

rpmdevtools:這是一組工具,簡(jiǎn)化了構(gòu)建RPM軟件包的過(guò)程。它提供了諸如

  • rpmdev-setuptree(設(shè)置構(gòu)建軟件包的目錄結(jié)構(gòu))
  • rpmdev-newspec(生成規(guī)范文件模板)
  • rpmdev-bumpspec(更新規(guī)范文件的版本信息)等實(shí)用程序。

rpm-build-libs:此軟件包包含構(gòu)建RPM軟件包所需的庫(kù)和頭文件。它為具有對(duì) RPM 庫(kù)的依賴(lài)關(guān)系的軟件包提供必要的開(kāi)發(fā)文件。

[root@ecs-hce ~]# yum -y  install rpm-build >> /dev/null 
retrieving repo key for base unencrypted from http://repo.huaweicloud.com/hce/2.0/os/RPM-GPG-KEY-HCE-2
Importing GPG key 0xA8DEF926:
 Userid     : "HCE <support@huaweicloud.com>"
 Fingerprint: C1BA 9CD4 9D03 A206 E241 F176 28DA 5B77 A8DE F926
 From       : http://repo.huaweicloud.com/hce/2.0/os/RPM-GPG-KEY-HCE-2
[root@ecs-hce ~]# yum -y  install rpm-devel rpmdevtools  >> /dev/null 

生成 rpm 開(kāi)發(fā)目錄

rpmdev-setuptreerpmdevtools 軟件包中的一個(gè)實(shí)用程序,用于設(shè)置 RPM 軟件包構(gòu)建的目錄結(jié)構(gòu)。它創(chuàng)建了一個(gè)標(biāo)準(zhǔn)的 RPM 構(gòu)建環(huán)境,包括各種必要的目錄和文件。

[root@ecs-hce ~]# rpmdev-setuptree 
[root@ecs-hce ~]# ls
rpmbuild

使用 rpmdev-setuptree 命令可以在當(dāng)前用戶(hù)的主目錄下創(chuàng)建以下目錄:

  • ~/rpmbuild/SOURCES:用于存放源代碼文件、補(bǔ)丁文件和其他構(gòu)建所需的資源文件。
  • ~/rpmbuild/SPECS:用于存放RPM軟件包的規(guī)范文件(spec file)。
  • ~/rpmbuild/BUILD:用于構(gòu)建RPM軟件包時(shí)的臨時(shí)構(gòu)建目錄。
  • ~/rpmbuild/RPMS:用于存放構(gòu)建完成的RPM軟件包文件。
  • ~/rpmbuild/SRPMS:用于存放構(gòu)建完成的源碼RPM軟件包文件。

創(chuàng)建源碼路徑,創(chuàng)建源碼文件并修改權(quán)限,源碼文件中寫(xiě)入代碼

[root@ecs-hce ~]# cd /root/rpmbuild/SOURCES/
[root@ecs-hce SOURCES]# mkdir hce2-helloworld-1.0.0
[root@ecs-hce SOURCES]# touch hce2-helloworld-1.0.0/hce2-helloworld
[root@ecs-hce SOURCES]# chmod 755 hce2-helloworld-1.0.0/hce2-helloworld
[root@ecs-hce SOURCES]# vim hce2-helloworld-1.0.0/hce2-helloworld
[root@ecs-hce SOURCES]# cat hce2-helloworld-1.0.0/hce2-helloworld
!/bin/sh 
echo Hello World!

壓縮源碼

[root@ecs-hce SOURCES]# tar zcvf hce2-helloworld-1.0.0.tar.gz hce2-helloworld-1.0.0/
hce2-helloworld-1.0.0/
hce2-helloworld-1.0.0/hce2-helloworld

生成規(guī)范文件位置

進(jìn)入/root/rpmbuild/SPECS 路徑生成.spec文件,需要輸入y 確認(rèn)

rpmdev-newspec 是 rpmdevtools 軟件包中的一個(gè)實(shí)用程序,用于生成一個(gè)新的RPM 軟件包規(guī)范文件(spec file)的模板。規(guī)范文件是描述 RPM 軟件包的元數(shù)據(jù)和構(gòu)建指令的文本文件。

[root@ecs-hce SOURCES]# cd /root/rpmbuild/SPECS/
[root@ecs-hce SPECS]# yum install -y git >> /dev/nul
[root@ecs-hce SPECS]# rpmdev-newspec hce2-helloworld.spec
hce2-helloworld.spec created; type minimal, rpm version >= 4.17.
[root@ecs-hce SPECS]# ls
hce2-helloworld.spec

使用 rpmdev-newspec 命令可以方便地生成一個(gè)空白的規(guī)范文件模板,可以在此基礎(chǔ)上填充具體的軟件包信息和構(gòu)建指令。

[root@ecs-hce SPECS]# vim hce2-helloworld.spec
[root@ecs-hce SPECS]# cp hce2-helloworld.spec hce2-helloworld.spec.back
[root@ecs-hce SPECS]# !vi
vim hce2-helloworld.spec

編寫(xiě)軟件包信息和構(gòu)建指令


```bash
Name: hce2-helloworld
Version: 1.0.0
Release: 1%{?dist}
Summary: hce2-helloworld

Group: Development/Tools
License: GPL
#URL:
Source0: %{name}-%{version}.tar.gz

#BuildRequires:
#Requires:

%description

%prep
%setup -q

%build

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
cp $RPM_BUILD_DIR/%{name}-%{version}/hce2-helloworld $RPM_BUILD_ROOT/usr/bin/

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc
/usr/bin/hce2-helloworld

%changelog

執(zhí)行編譯命令,生成 rpm

rpmbuild 是一個(gè)用于構(gòu)建 RPM 軟件包的命令行工具。它接受一個(gè) RPM 軟件包規(guī)范文件(spec file)作為輸入,并根據(jù)規(guī)范文件中定義的指令執(zhí)行構(gòu)建過(guò)程,生成最終的 RPM 軟件包文件。

[root@ecs-hce SPECS]# rpmbuild --nodebuginfo -ba hce2-helloworld.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.fTh7oO
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf hce2-helloworld-1.0.0
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/hce2-helloworld-1.0.0.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hce2-helloworld-1.0.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.G258Wy
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd hce2-helloworld-1.0.0
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.dvzv3Y
+ umask 022
+ cd /root/rpmbuild/BUILD
+ '[' /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64
++ dirname /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64
+ cd hce2-helloworld-1.0.0
+ mkdir -p /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64/usr/bin
+ cp /root/rpmbuild/BUILD/hce2-helloworld-1.0.0/hce2-helloworld /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64/usr/bin/
+ '[' '%{buildarch}' = noarch ']'
+ QA_CHECK_RPATHS=1
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 1
+ /usr/lib/rpm/brp-python-hardlink
Processing files: hce2-helloworld-1.0.0-1.x86_64
__brp_dim_baseline not set, ignore dim baseline generating
Provides: hce2-helloworld = 1.0.0-1 hce2-helloworld(x86-64) = 1.0.0-1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64
Wrote: /root/rpmbuild/SRPMS/hce2-helloworld-1.0.0-1.src.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/hce2-helloworld-1.0.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.QbHsJi
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd hce2-helloworld-1.0.0
+ rm -rf /root/rpmbuild/BUILDROOT/hce2-helloworld-1.0.0-1.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0
[root@ecs-hce SPECS]# 

查看生成路徑

[root@ecs-hce SPECS]# ls /root/rpmbuild/RPMS/x86_64/hce2-helloworld-1.0.0-1.x86_64.rpm
/root/rpmbuild/RPMS/x86_64/hce2-helloworld-1.0.0-1.x86_64.rpm

創(chuàng)建私有的 repo 源

選擇一個(gè)本地私有REPO源的文件目錄

選擇用/home/private/目錄(手動(dòng)創(chuàng)建一個(gè)目錄) 將步驟10中的rpm包,拷貝到該目錄下

[root@ecs-hce SPECS]# mkdir /home/private
[root@ecs-hce SPECS]# cp /root/rpmbuild/RPMS/x86_64/hce2-helloworld-1.0.0-1.x86_64.rpm /home/private/

安裝createrepo工具,使用 createrepo 命令來(lái)創(chuàng)建 RPM 軟件包倉(cāng)庫(kù)。使用方法如下:

[root@ecs-hce SPECS]# yum install -y  createrepo >> /dev/null
[root@ecs-hce SPECS]# cd /home/private
[root@ecs-hce private]# createrepo .
Directory walk started
Directory walk done - 1 packages
Temporary output repo path: ./.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Pool finished 

編輯 repo 配置文件, repo 配置文件中增加 repo 源

[root@ecs-hce private]# vi /etc/yum.repos.d/hce.repo
[root@ecs-hce private]# cat /etc/yum.repos.d/hce.repo
.......
.......
[hce2-test]
name=hce2-test
baseurl=file:///home/private/
enabled=1
gpgcheck=0

生效repo源

yum makecache 是一個(gè) yum 命令的選項(xiàng),用于創(chuàng)建或更新 yum 軟件包管理器的本地軟件包緩存。

當(dāng)執(zhí)行 yum makecache 命令時(shí),yum 會(huì)檢查配置文件中定義的軟件包倉(cāng)庫(kù),并下載或更新倉(cāng)庫(kù)中的元數(shù)據(jù)信息。這些元數(shù)據(jù)包括軟件包列表、版本信息、依賴(lài)關(guān)系等,用于加快后續(xù)的軟件包搜索和安裝過(guò)程。

[root@ecs-hce private]# yum makecache
HCE 2.0 base                                                                                                                             70 kB/s | 3.0 kB     00:00    
HCE 2.0 updates                                                                                                                         151 kB/s | 3.5 kB     00:00    
hce2-test                                                                                                                               2.9 MB/s | 3.0 kB     00:00    
Metadata cache created.

安裝 hce2-helloworld-1.0.0.rpm

[root@ecs-hce private]# yum install hce2-helloworld
Last metadata expiration check: 0:00:11 ago on Fri 08 Dec 2023 10:21:38 PM CST.
Dependencies resolved.
========================================================================================================================================================================
 Package                                       Architecture                         Version                               Repository                               Size
========================================================================================================================================================================
Installing:
 hce2-helloworld                               x86_64                               1.0.0-1                               hce2-test                               6.4 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total size: 6.4 k
Installed size: 28  
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                1/1 
  Installing       : hce2-helloworld-1.0.0-1.x86_64                                                                                                                 1/1 
  Verifying        : hce2-helloworld-1.0.0-1.x86_64                                                                                                                 1/1 

Installed:
  hce2-helloworld-1.0.0-1.x86_64                                                                                                                                        

Complete!

制作安全補(bǔ)丁 rpm ,拷貝生成新的源碼包,升級(jí)版本

[root@ecs-hce private]# cd /root/rpmbuild/SOURCES/
[root@ecs-hce SOURCES]# cp -r hce2-helloworld-1.0.0 hce2-helloworld-1.1.0
[root@ecs-hce SOURCES]# tar zcvf hce2-helloworld-1.1.0.tar.gz hce2-helloworld-1.1.0/
hce2-helloworld-1.1.0/
hce2-helloworld-1.1.0/hce2-helloworld
[root@ecs-hce SOURCES]# cd ../SPECS/

修改hce2-helloworld.spec版本號(hào),將Version:1.0.0修改為1.1.0。其他內(nèi)容保持不變。

[root@ecs-hce SPECS]# vim hce2-helloworld.spec

編譯生成新的RPM包,并拷貝到/home/private/目錄下

[root@ecs-hce SPECS]# rpmbuild --nodebuginfo -ba hce2-helloworld.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.37tfGQ
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf hce2-helloworld-1.1.0
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/hce2-helloworld-1.1.0.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd hce2-helloworld-1.1.0
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.hmcjbb
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd hce2-helloworld-1.1.0
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.CvqayW
+ umask 022
+ cd /root/rpmbuild/BUILD
+ '[' /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64
++ dirname /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64
+ cd hce2-helloworld-1.1.0
+ mkdir -p /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64/usr/bin
+ cp /root/rpmbuild/BUILD/hce2-helloworld-1.1.0/hce2-helloworld /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64/usr/bin/
+ '[' '%{buildarch}' = noarch ']'
+ QA_CHECK_RPATHS=1
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip
+ /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 1
+ /usr/lib/rpm/brp-python-hardlink
Processing files: hce2-helloworld-1.1.0-1.x86_64
__brp_dim_baseline not set, ignore dim baseline generating
Provides: hce2-helloworld = 1.1.0-1 hce2-helloworld(x86-64) = 1.1.0-1
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64
Wrote: /root/rpmbuild/SRPMS/hce2-helloworld-1.1.0-1.src.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/hce2-helloworld-1.1.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.eFBaP4
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd hce2-helloworld-1.1.0
+ rm -rf /root/rpmbuild/BUILDROOT/hce2-helloworld-1.1.0-1.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0
[root@ecs-hce SPECS]# cd /home/private

創(chuàng)建了一個(gè)名為 updateinfo.xml 的文件

該文件包含一個(gè) XML 結(jié)構(gòu),描述了一個(gè)安全更新的詳細(xì)信息。它提供了有關(guān)更新的作者、來(lái)源、狀態(tài)、版本、嚴(yán)重程度、摘要、描述、引用和軟件包列表的信息。

[root@ecs-hce private]# touch updateinfo.xml
[root@ecs-hce private]# vim updateinfo.xml
[root@ecs-hce private]# cat updateinfo.xml
<?xml version="1.0" encoding="UTF-8"?>
<updates>
<update author="Huawei Cloud EulerOS" from="Huawei Cloud EulerOS" status="stable" type="security" version="1.0">
  <id>HCE2-SA-2022:0001</id>
  <title>HCE2-SA-2022:0001: hce2-helloworld security update (Important)</title>
  <issued date="2022-04-09"/>
  <updated date="2022-04-09" timestamp="1612697870"/>
  <rights>Copyright (C) 2020-2021 Huawei Cloud EulerOS</rights>
  <release>Huawei Cloud EulerOS 2</release>
  <severity>Important</severity>
  <summary>hce2-helloworld security update</summary>
  <description>Package updates are available for Huawei Cloud EulerOS 2 that fix the following vulnerabilities:
CVE-2021-21261: Just for test
  </description>
  <references>
    <reference href="" id="HCE2-SA-2022:0001" type="HCE2-SA"/>
    <reference href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21261" cvss3="8.8/CVSS:3.1/AV:L/AC:L/PR:L/UI:N/
S:C/C:H/I:H/A:H" id="CVE-2021-21261" type="cve"/>
  </references>
  <pkglist>
    <collection short="hce2">
    <name>Huawei Cloud EulerOS 2</name>
      <package arch="x86_64" epoch="" name="hce2-helloworld" version="1.3.0" release="1.3.0" src="">
        <filename>hce2-helloworld-1.3.0-1.x86_64.rpm</filename>
      </package>
    </collection>
  </pkglist>
</update>
<updates>

更新repo源,modifyrepo 是一個(gè)用于修改軟件包倉(cāng)庫(kù)元數(shù)據(jù)的工具。

[root@ecs-hce private]# modifyrepo updateinfo.xml repodata/
[root@ecs-hce private]# yum makecache
HCE 2.0 base                                                                                                                             38 kB/s | 3.0 kB     00:00    
HCE 2.0 updates                                                                                                                         162 kB/s | 3.5 kB     00:00    
hce2-test                                                                                                                               3.4 MB/s | 3.4 kB     00:00    
hce2-test                                                                                                                               219 kB/s | 1.4 kB     00:00    
Metadata cache created.

檢查更新信息可以看到有新的更新提示

[root@ecs-hce private]# yum updateinfo
Last metadata expiration check: 0:00:04 ago on Fri 08 Dec 2023 10:24:14 PM CST.
Updates Information Summary: available
    48 Security notice(s)
         7 Critical Security notice(s)
        20 Important Security notice(s)
        19 Moderate Security notice(s)
         2 Low Security notice(s)
[root@ecs-hce private]# 

根據(jù)輸出,yum updateinfo 命令顯示了可用的更新信息摘要。

根據(jù)輸出,有 48 條安全通知可用,其中包括不同級(jí)別的通知:7 條關(guān)鍵安全通知、20 條重要安全通知、19 條中等安全通知和 2 條低級(jí)安全通知。

該命令的輸出提示您有可用的安全更新,建議您及時(shí)執(zhí)行更新操作,以確保系統(tǒng)的安全性和穩(wěn)定性。您可以使用 yum update 命令來(lái)執(zhí)行更新操作。

博文部分內(nèi)容參考

? 文中涉及參考鏈接內(nèi)容版權(quán)歸原作者所有,如有侵權(quán)請(qǐng)告知,這是一個(gè)開(kāi)源項(xiàng)目,如果你認(rèn)可它,不要吝嗇星星哦 ??


https://edu.huaweicloud.com/certificationindex/developer/9bf91efb086a448ab4331a2f53a4d3a1


? 2018-2023 liruilonger@gmail.com, All rights reserved. 保持署名-非商用-相同方式共享(CC BY-NC-SA 4.0)文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-831043.html

到了這里,關(guān)于【華為云】如何在華為云歐拉系統(tǒng) ECS 實(shí)例新建私有 REPO 源并制作安全 RPM 包的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • [Linux]華為的系統(tǒng) 歐拉 鴻蒙 openEuler HarmonyOS OpenHarmony

    之前整理過(guò)《華為機(jī)器運(yùn)行什么桌面系統(tǒng)?EulerOS openEuler LiteOS 鴻蒙 深度 UOS》,但差不多快兩年了,今天再梳理下華為目前提供的主要系統(tǒng): openEuler | open歐拉 定位是服務(wù)器操作系統(tǒng) 是基于CentOS的 Linux 發(fā)行版,開(kāi)源、免費(fèi) 其商業(yè)發(fā)行版由麒麟軟件、統(tǒng)信軟件等提供(如:統(tǒng)

    2024年02月09日
    瀏覽(47)
  • 華為云歐拉操作系統(tǒng)(OpenEuler)部署K8S集群

    華為云歐拉操作系統(tǒng)(OpenEuler)部署K8S集群

    需要提前準(zhǔn)備好OpenEular操作系統(tǒng)虛擬機(jī)3臺(tái),本文使用模板機(jī)創(chuàng)建。 序號(hào) 操作系統(tǒng)及版本 備注 1 openEuler-22.03-LTS-SP1 下載鏈接:https://repo.openeuler.org/openEuler-22.03-LTS-SP1/ISO/x86_64/openEuler-22.03-LTS-SP1-x86_64-dvd.iso 需求 CPU 內(nèi)存 硬盤(pán) 角色 主機(jī)名 值 4C 4G 1TB master k8s-master01 值 4C 4G 1TB wor

    2024年02月08日
    瀏覽(18)
  • 華為歐拉操作系統(tǒng)結(jié)合內(nèi)網(wǎng)穿透實(shí)現(xiàn)固定公網(wǎng)地址SSH遠(yuǎn)程連接

    華為歐拉操作系統(tǒng)結(jié)合內(nèi)網(wǎng)穿透實(shí)現(xiàn)固定公網(wǎng)地址SSH遠(yuǎn)程連接

    歐拉操作系統(tǒng)(openEuler, 簡(jiǎn)稱(chēng)“歐拉”)是面向數(shù)字基礎(chǔ)設(shè)施的操作系統(tǒng),支持服務(wù)器、云計(jì)算、邊緣openEuler是面向數(shù)字基礎(chǔ)設(shè)施的操作系統(tǒng),支持服務(wù)器、 云計(jì)算、邊緣計(jì)算、嵌入式等應(yīng)用場(chǎng)景,支持多樣性計(jì)算,致力于提供安全、穩(wěn)定、易用的操作系統(tǒng) Cpolar是一種安全的內(nèi)網(wǎng)

    2024年01月23日
    瀏覽(31)
  • 阿里云國(guó)際版查看云服務(wù)器ecs實(shí)例系統(tǒng)日志和截圖-Unirech

    阿里云國(guó)際版查看云服務(wù)器ecs實(shí)例系統(tǒng)日志和截圖-Unirech

    阿里云國(guó)際版云服務(wù)器ecs是一個(gè)基于云的虛擬化服務(wù),無(wú)法接入顯示設(shè)備或手動(dòng)截屏,但是云服務(wù)器ecs緩存了最后一次啟動(dòng)、重啟或關(guān)閉時(shí)的系統(tǒng)日志,并支持實(shí)時(shí)捕獲實(shí)例屏幕截圖。用戶(hù)則可以使用這些功能來(lái)分析和排除實(shí)例故障,例如診斷無(wú)響應(yīng)的操作系統(tǒng)、異常重啟或

    2024年02月09日
    瀏覽(20)
  • 【華為云】基于華為云歐拉操作系統(tǒng)(HCE OS)容器化部署傳統(tǒng)應(yīng)用(Redis+Postgresql+Git+SpringBoot+Nginx)

    【華為云】基于華為云歐拉操作系統(tǒng)(HCE OS)容器化部署傳統(tǒng)應(yīng)用(Redis+Postgresql+Git+SpringBoot+Nginx)

    博文內(nèi)容為 華為云歐拉操作系統(tǒng)入門(mén)級(jí)開(kāi)發(fā)者認(rèn)證(HCCDA – Huawei Cloud EulerOS) 實(shí)驗(yàn)筆記整理 認(rèn)證地址:https://edu.huaweicloud.com/certificationindex/developer/9bf91efb086a448ab4331a2f53a4d3a1 博文內(nèi)容涉及一個(gè)傳統(tǒng) Springboot 應(yīng)用HCE部署, 以及相關(guān)數(shù)據(jù)庫(kù) Redis、Postgresql、Nginx 的容器化部署 理解不

    2024年02月22日
    瀏覽(25)
  • 華為歐拉系統(tǒng)(EulerOS)安裝圖形化界面,和設(shè)置開(kāi)機(jī)啟動(dòng)為圖形化界面,還是命令行界面,兩種界面相互轉(zhuǎn)化

    華為歐拉系統(tǒng)(EulerOS)安裝圖形化界面,和設(shè)置開(kāi)機(jī)啟動(dòng)為圖形化界面,還是命令行界面,兩種界面相互轉(zhuǎn)化

    1.安裝圖形化界面 先測(cè)試網(wǎng)絡(luò) ping baidu.com 使用快捷鍵Ctrl+c sudo yum -y install dde sudo systemctl set-default graphical.target 完成后,重啟電腦,使用sudo reboot命令。等待系統(tǒng)啟動(dòng)進(jìn)入到圖形界面。 2.設(shè)置開(kāi)機(jī)默認(rèn)啟動(dòng)命令行界面 用systemctl set-default multi-user.target 然后重啟生效 3.圖形化界面

    2024年02月01日
    瀏覽(44)
  • 華為歐拉EulerOS修改網(wǎng)卡名字

    華為歐拉EulerOS修改網(wǎng)卡名字

    1.備份并之前網(wǎng)卡配置文件 2.修改系統(tǒng)啟動(dòng)文件 找到對(duì)應(yīng)的網(wǎng)卡,把網(wǎng)卡名字字符改了,記錄下mac地址。 3.修改網(wǎng)卡配置重啟 修改ifcfg-eth0,將里面device和name都改成eth0,并且把mac地址加上:HWADDR= ? ?

    2024年02月12日
    瀏覽(18)
  • 阿里云ECS U實(shí)例評(píng)測(cè)

    阿里云ECS U實(shí)例評(píng)測(cè)

    參與ECSU實(shí)例評(píng)測(cè),申請(qǐng)免費(fèi)體驗(yàn)機(jī)會(huì):https://developer.aliyun.com/mission/review/ecsu u1實(shí)例是什么? u1實(shí)例本質(zhì)上還是ecs服務(wù)器,但是是阿里云推出的一種新型實(shí)例規(guī)格族 阿里云根據(jù)使用場(chǎng)景和業(yè)務(wù)場(chǎng)景將ecs劃分為不同的實(shí)例規(guī)格,方便針對(duì)場(chǎng)景選購(gòu)。 u1是u系列(通用算力型)的第

    2024年02月11日
    瀏覽(22)
  • 多圖預(yù)警~ 華為 ECS 與 阿里云 ECS 對(duì)比實(shí)戰(zhàn)

    多圖預(yù)警~ 華為 ECS 與 阿里云 ECS 對(duì)比實(shí)戰(zhàn)

    本篇博客將從功能點(diǎn)的角度對(duì)比華為云 ECS 和阿里云 ECS,力爭(zhēng)將常用功能進(jìn)行清晰的對(duì)比。 阿里云 ECS 大家參看我的截圖即可,這一點(diǎn)給華為云點(diǎn)贊,免費(fèi)提供了可快速上手的實(shí)驗(yàn)環(huán)境。 實(shí)驗(yàn)環(huán)境申請(qǐng)之后,貼心的準(zhǔn)備了 Windows 和 Linux 雙系統(tǒng)。 篇幅原因,僅對(duì)比 Linux。 看實(shí)

    2023年04月08日
    瀏覽(29)
  • 華為云云服務(wù)器云耀L實(shí)例評(píng)測(cè) | 在華為云耀L實(shí)例上搭建電商店鋪管理系統(tǒng):一次場(chǎng)景體驗(yàn)

    華為云云服務(wù)器云耀L實(shí)例評(píng)測(cè) | 在華為云耀L實(shí)例上搭建電商店鋪管理系統(tǒng):一次場(chǎng)景體驗(yàn)

    ???? 博主貓頭虎(????)帶您 Go to New World??? ?? 博客首頁(yè) ——????貓頭虎的博客?? ?? 《面試題大全專(zhuān)欄》 ?? 文章圖文并茂??生動(dòng)形象??簡(jiǎn)單易學(xué)!歡迎大家來(lái)踩踩~?? ?? 《IDEA開(kāi)發(fā)秘籍專(zhuān)欄》 ?? 學(xué)會(huì)IDEA常用操作,工作效率翻倍~?? ?? 《100天精通Golang(基礎(chǔ)

    2024年02月09日
    瀏覽(84)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包