首页 > 代码库 > redhat 搭建本地yum源

redhat 搭建本地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源