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