Linux 6.2配置yum本地
yum
1、挂在iso文件
[root@localhostmedia]# mount /dev/cdrom /media
2、安装createrepo
createrepo是配置YUM源的配置工具,检查当前是否已经安装createrepo包的安装情况:
[root@localhostPackages]# 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
[root@localhostPackages]# 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%]
[root@localhostPackages]# 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%]
[root@localhostPackages]# 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%]
[root@localhost 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、创建本地yum客户端的repo文件
[root@localhost 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
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。