使用rhel5的DVD光盘作为本地yum源

本文介绍了如何在Red Hat系统中配置YUM源,通过挂载安装盘并编辑配置文件来实现本地YUM源的设置,进而可以方便地进行软件包的更新与安装。
1.首先挂载光盘,我把光盘挂载到/media/cd下。
在/media 下新建文件夹 /rhel :mkdir /media/cd
然后挂载5.4的dvd安装盘: mount /dev/cdrom /media/cd
2.确保系统中已经安装了如下软件包(您的版本号可能有所不同),如果缺少,请自行安装(这些包在安装红帽子的时候基本都默认安装了。)
# rpm -qa |grep yum
yum-3.2.19-18.el5
yum-security-1.1.16-13.el5
yum-updatesd-0.9-2.el5
yum-rhn-plugin-0.5.3-30.el5
yum-metadata-parser-1.1.2-2.el5
3.编辑/etc/yum.repos.d/rhel-debuginfo.repo,添加如下内容
baseurl=file:///media/cd/Server
enabled=1
4.执行yum update命令
[root@node1 yum]# yum update
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
rhel-debuginfo                                                                         | 1.3 kB     00:00    
rhel-debuginfo/primary                                                                 | 732 kB     00:00    
rhel-debuginfo                                                                                      2292/2292
Skipping security plugin, no data
Setting up Update Process
No Packages marked for Update
5.至此就可以使用yum安装rpm包了
例如:yum install fonts-chinese -y

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值