Linux 6.2配置yum本地
Posted jzssuanfa
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux 6.2配置yum本地相关的知识,希望对你有一定的参考价值。
yum
1、挂在iso文件
[[email protected]]# mount /dev/cdrom /media
2、安装createrepo
createrepo是配置YUM源的配置工具,检查当前是否已经安装createrepo包的安装情况:
[[email protected]]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
warning:createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key IDec551f03: NOKEY
error: Faileddependencies:
deltarpm is needed by createrepo-0.9.8-4.el6.noarch
python-deltarpm is needed by createrepo-0.9.8-4.el6.noarch
[[email protected]]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning:deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature,key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:deltarpm ########################################### [100%]
[[email protected]]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning:python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256Signature, key ID ec551f03: NOKEY
Preparing... ########################################### [100%]
1:python-deltarpm ########################################### [100%]
[[email protected]]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
warning:createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key IDec551f03: NOKEY
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
[[email protected] yum]#cp -r /media/* /mnt
3、创建yumrepository的xml-rpm-metadata
createrepo -g /mnt/Server/repodata/repomd.xml /mnt/Server/
createrepo -g /mnt/HighAvailability/repodata/repomd.xml /mnt/HighAvailability/
createrepo -g /mnt/LoadBalancer/repodata/repomd.xml /mnt/LoadBalancer/
createrepo -g /mnt/ResilientStorage/repodata/repomd.xml /mnt/ResilientStorage/
4、创建本地yumclient的repo文件
[[email protected] mnt]#cd /etc/yum.repos.d/
[[email protected]]# ll
total 0
[[email protected]]# vi local.repo
[HighAvailability]
name=HighAvailability
baseurl=file:/mnt/HighAvailability
enabled=1
gpgcheck=0
gpgkey=file:/mnt/RPM-GPG-KEY-oracle
[LoadBalancer]
name= LoadBalance
baseurl=file:/mnt/LoadBalancer
enabled=1
gpgcheck=0
gpgkey=file:/mnt/RPM-GPG-KEY-oracle
[ResilientStorage]
name=ResilientStorage
baseurl=file:/mnt/ResilientStorage
enabled=1
gpgcheck=0
gpgkey=file:/mnt/RPM-GPG-KEY-oracle
[Server]
name=Server
baseurl=file:/mnt/Server
gpgcheck=0
enabled=1
gpgkey=file:/mnt/RPM-GPG-KEY-oracle
保存后yum本地酒配置完毕。能够用yum install gcc測试
Didn‘t install anykeys
以上是关于Linux 6.2配置yum本地的主要内容,如果未能解决你的问题,请参考以下文章