創建CentOS 8 AppStream&PowerTools本地源用於yum安裝module_el8.0.0+類型的rpm包


AppStream/PowerTools源,ARM上名字形如*module_el8.0.0+*的軟件無法直接通過yum安裝,需要手動下載到本地建立local repo。

參考華為的配置方法

https://support.huaweicloud.com/dpmg-kunpengcpfs/kunpengovirt_04_0005.html

 

創建目錄
mkdir -p /opt/ovirt/centos/8-stream/
cd /opt/ovirt/centos/8-stream/
mkdir -p AppStream/kickstart/
mkdir -p AppStream/os/
mkdir -p PowerTools/kickstart/
mkdir -p PowerTools/os/

下載AppStream
cd /opt/ovirt/centos/8-stream/AppStream/os/
wget https://mirrors.huaweicloud.com/centos/8-stream/AppStream/aarch64/os/Packages/
cat index.html | grep href | awk -F"\"" '{print $4}' | grep module_el8 | xargs -I {} wget https://mirrors.huaweicloud.com/centos/8-stream/AppStream/aarch64/os/Packages/{}
createrepo_c .
repo2module  -s stable  . modules.yaml
modifyrepo_c --mdtype=modules modules.yaml repodata/

下載PowerTools
cd /opt/ovirt/centos/8-stream/PowerTools/os/
wget https://mirrors.huaweicloud.com/centos/8-stream/PowerTools/aarch64/os/Packages/
cat index.html | grep href | awk -F"\"" '{print $4}' | grep module_el8 | xargs -I {} wget https://mirrors.huaweicloud.com/centos/8-stream/PowerTools/aarch64/os/Packages/{}
createrepo_c .
repo2module  -s stable  . modules.yaml
modifyrepo_c --mdtype=modules modules.yaml repodata/

創建CentOS-AppStream-PowerTools-local.repo
touch /etc/yum.repos.d/CentOS-AppStream-PowerTools-local.repo

編輯CentOS-AppStream-PowerTools-local.repo
[Centos8-AppStream-local1]
name=Centos8-AppStream-local1
baseurl=file:///opt/ovirt/centos/8-stream/AppStream/os/
enabled=1
gpgcheck=0
priority=2

[Centos8-PowerTool-local1]
name=Centos8-PowerTool-local1
baseurl=file:///opt/ovirt/centos/8-stream/PowerTools/os/
enabled=1
gpgcheck=0
priority=2

有區別的地方:

1、repo2module 在modulemd-tools包中,需要先安裝modulemd-tools

2、repo2module -s stable -d . modules.yaml這個命令有點問題,repo2module 沒有-d參數,去掉。實際的應該是repo2module -s stable . modules.yaml

3、文章中是8.1.1911的配置路徑(http://mirrors.huaweicloud.com/centos-vault/8.1.1911/AppStream/aarch64/os/Packages/),其他的版本的話自己換成其他地址,比如CentOS 8-stream PowerTools的地址https://mirrors.huaweicloud.com/centos/8-stream/PowerTools/aarch64/os/Packages/。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM