Username: Password:

Yum安装本地光盘软件
来源: ChinaUnix博客  作者: ChinaUnix博客   发布时间:2008-01-01 11:08:00

Yum安装光盘软件
其实使用本地的光盘做源是很简单的,呵呵,越来越喜欢CentOS 5了。
首先 要先挂载光盘,把光盘挂载到media/CentOS/,media/cdrom/,或media/cdrecorder/ 这样就不用修改配置文档了。假如想挂载到其他目录,只要修改下baseurl=file:///自己挂载的目录,就能够了。配置文档在 /etc/yum.repos.d/CentOS-Media.repo。
接着 把/etc/yum.repos.d/CentOS-Base.repo改下名,命令如下:
#mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
检查下配置文档的有没配置正确,命令如下:
#cat /etc/yum.repos.d/CentOS-Media.repo
# CentOS-Media.repo
#
# This repo is used to mount the default locations for a CDROM / DVD on
#  CentOS-5.  You can use this repo and yum to install items directly off the
#  DVD ISO that we release.
#
# To use this repo, put in your DVD and use it with the other repos too:
#  yum --enablerepo=c5-media [command]
#
# or for ONLY the media repo, do this:
#
#  yum --disablerepo=\* --enablerepo=c5-media [command]

[c5-media]
name=CentOS-$releasever - Media
baseurl=file:///media/CentOS/  
        file:///media/cdrom/
        file:///media/cdrecorder/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-beta
其实配置文档中已有教怎么做的了,我似乎是多此一举了,0_0。
最后 就是要安装软件咯,命令如下:
#yum --enablerepo=c5-media install gimp
安装您想要的软件。


本文来自ChinaUnix博客,假如查看原文请点:http://blog.chinaunix.net/u/20294/showart_465375.html

喜欢本文,那就收藏到:

    Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网
相关评论  我也要评论
还没有关于此文章的相关评论!
  • 昵称: (为空则显示guest)
  • 评论分数: ★ ★ ★★★ ★★★★ ★★★★★
  • 评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
  • 导航
    赞助商
    文章类别
    订阅