免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1569 | 回复: 0
打印 上一主题 下一主题

CentOS5.3本地yum服务的配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-23 14:16 |只看该作者 |倒序浏览
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/
#        
file:///media/cdrom/
#        
file:///media/cdrecorder/
#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。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/323/showart_2035023.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP