rhel6添加本地yum

来源:未知 责任编辑:责任编辑 发表时间:2013-12-06 08:45 点击:


#setenforce 0
 
#mkdir /yum
 
#mount -o loop /dev/cdrom  /mnt
 
#cp -ar /mnt/*  /yum

 
#vi /etc/yum.repos.d/local.repo
 
  [local]
  name=Red Hat Enterprise Linux update6
  baseurl=file:///yum/
  gpgcheck=0
  enabled=1
#mv /etc/yum.repos.d/packagekit-media.repo  /etc/yum.repos.d/packagekit-media.repo.bk 或者直接删除,否则yumlist会报错如下:
rhel6 Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again
#yum clean all
测试
[root@rhel6 ~]# yum repolist
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
repo id                 repo name                                         status
local                   Red Hat Enterprise Linux update6                  3,391
repolist: 3,391
 
 
本文出自 “学习linux” 博客

    发表评论
    请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
    用户名: 验证码:点击我更换图片
    最新评论 更多>>

    推荐热点

    • /etc/fstab 详解
    • nginx主主集群
    •  LVS-NAT和LVS-DR模式的实现详解
    •  RHCE考试之磁盘配额
    • 学习笔记:ACL详解
    • suse linux双网卡双网关配置
    •  LVM逻辑卷管理器
    •  Nginx主主负载均衡架构
    • ubuntu学习Mysql

    快速直达

    操作系统导航

    LinuxWindows虚拟机
    网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
    Copyright © 2008-2015 计算机技术学习交流网. 版权所有

    豫ICP备11007008号-1