码迷,mamicode.com
首页 > 其他好文 > 详细

redhat 搭建本地yum源

时间:2014-12-09 19:49:11      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:yum本地源

redhat 搭建本地yum源

挂载光盘

# mkdir /home/yum

# cp -rv /media/RHEL_6.5\ x86_64\ Disc\ 1/Packages /home/yum/

# rpm -i /home/yum/deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

# rpm -i /home/yum/python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

# rpm -i /home/yum/createrepo-0.9.9-18.el6.noarch.rpm

# createrepo -d /home/yum/

# cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/rhel-source.repo.bak

# vi /etc/yum.repos.d/rhel-source.repo

按a或i进入编辑模式

[rhel-source-beta]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=file:///home/yum/  (默认为baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/)
enabled=1  (默认为0)
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

按Esc键退出编辑模式

:wq (保存并退出)

# yum update

# yum install minicom   (测试)

本文出自 “linux” 博客,谢绝转载!

redhat 搭建本地yum源

标签:yum本地源

原文地址:http://yangzhiming.blog.51cto.com/4849999/1588045

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!