Chinaunix首页 | 论坛 | 博客
  • 博客访问: 213582
  • 博文数量: 489
  • 博客积分: 410
  • 博客等级: 下士
  • 技术积分: 2590
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-01 22:50
文章分类

全部博文(489)

文章存档

2011年(489)

我的朋友

分类:

2011-09-03 23:59:03

1、挂载光驱,放入centos5.3安装碟。
2、配置 /etc/yum.repos.detc/CentOS-Media.repo 文件
 
[root@CentOS5 yum.repos.d]# vi CentOS-Media.repo
 
 
E325: ATTENTION
Found a swap file by the name ".CentOS-Media.repo.swp"
          owned by: root   dated: Sun Aug 23 12:00:42 2009
         file name: /etc/yum.repos.d/CentOS-Media.repo
          modified: YES
         user name: root   host name: CentOS5
        process ID: 4338
While opening file "CentOS-Media.repo"
             dated: Sun Aug 23 13:31:06 2009
      NEWER than swap file!
(1) Another program may be editing the same file.
    If this is the case, be careful not to end up with two
    different instances of the same file when making changes.
    Quit, or continue with caution.
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r CentOS-Media.repo"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file ".CentOS-Media.repo.swp"
    to avoid this message.
"CentOS-Media.repo" 27L, 697C
Press ENTER or type command to continue
# 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/
#       
#       
#gpgcheck=1
#enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
===============================以上是系统本身带有的,我把它们注销掉。当然也可以把它们删了
 
[cdrom]
name=myyum    
baseurl=file:///cdrom 
gpgcheck=0
enabled=1
 
 
其中:

name:指定软件库名称

baseurl:指定本仓库的URL,可以是以下的3种类型,如http,ftp,file

enable:指定是否使用本仓库,默认值为1,即可用。

gpgcheck:指定是否检查软件包的GPG签名。

gpgkey:指定GPG签名文件的URL


阅读(167) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~