SUSE zypper 本地源配置


存放repo 文件目錄

cd /etc/zypp/repos.d

 

創建用來存放ISO文件的目錄: mkdir /opt/iso

 

掛載ISO文件:sudo mount -t iso9660 /scd/iso/SLES-12-SP3-DVD-x86_64-GM-DVD1.iso /opt/iso

配置本地repo(源): sudo zypper ar -f  /opt/iso iso

<或是 : zypper ar file:///opt/iso update>

查看系統中的源:

 # zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.

# | Alias | Name | Enabled | GPG Check | Refresh
--+-------+------+---------+-----------+--------
1 | iso | iso | Yes | ( p) Yes | Yes

 

 # zypper ls
# | Alias | Name | Enabled | GPG Check | Refresh | Type
--+-------+------+---------+-----------+---------+---------
1 | iso | iso | Yes | ( p) Yes | Yes | plaindir

 

#zypper refresh

Retrieving repository 'iso' metadata ............................................................................[done]

Building repository 'iso' cache .................................................................................[done]
All repositories have been refreshed.

清楚緩存
zypper clean

刷新安裝源
zypper ref

列出所有可用的模式
zypper pt

刪除源
zypper rr iso

zypper rs

 

 

-------2021/7/7更新--------------

Please see the above error message for a hint.
Warning: Skipping repository 'SLE-Module-Server-Applications15-SP2-Updates' because of the above error.
Retrieving repository 'iso' metadata ----------------------------------------------------------------------------------------------------------------------[\]
Warning: The gpg key signing file 'repomd.xml' has expired.
Repository: iso
Key Name: SuSE Package Signing Key <build@suse.de>
Key Fingerprint: FEAB5025 39D846DB 2C0961CA 70AF9E81 39DB7C82
Key Created: Wed Dec 7 18:57:35 2016
Key Expires: Sun Dec 6 18:57:35 2020 (EXPIRED)
Rpm Name: gpg-pubkey-39db7c82-5847eb1f
Retrieving repository 'iso' metadata ...................................................................................................................[done]
Building repository 'iso' cache ........................................................................................................................[done]

 

這個報錯見過嗎????


免責聲明!

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



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