技术交流QQ群:①185473046   ②190706903   ③203744115   网站地图
登录

下次自动登录
现在的位置: 首页RHEL>正文
RHEL 6.2配置本地yum源
2012年02月13日 RHEL 评论数 11 ⁄ 被围观 43,970次+


一、挂载本地光盘到系统:把rhel6.2安装光盘放入光驱,在终端命令行下操作

      mkdir /media/rhel   #新建挂载目录
      mount /dev/cdrom  /media/rhel  #挂载光盘到/media/rhel目录下
      cd  /media/rhel  #进入挂载目录
      ls   #查看挂载目录,光盘挂载成功

系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接


二、配置本地yum源
      cd /etc/yum.repos.d/   #进入yum配置目录
      touch  rhel-media.repo   #建立yum配置文件
      vi  rhel-media.repo   #编辑配置文件,添加以下内容  

    [rhel-media]
    name=Red Hat Enterprise Linux 6.2   #自定义名称
    baseurl=file:///media/rhel #本地光盘挂载路径
    enabled=1   #启用yum源,0为不启用,1为启用
    gpgcheck=1  #检查GPG-KEY,0为不检查,1为检查
    gpgkey=file:///media/rhel/RPM-GPG-KEY-redhat-release   #GPG-KEY路径
   


三、清除yum缓存,使用yum install自动安装软件

      yum clean all   #清除yum缓存
      yum install php   #安装php

系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接

至此,RHEL 6.2配置本地yum源教程完成,现在可以使用yum install命令安装软件了。

     
» 转载请注明来源:系统运维 » RHEL 6.2配置本地yum源

  系统运维技术交流QQ群:①185473046 系统运维技术交流□Ⅰ ②190706903 系统运维技术交流™Ⅱ ③203744115 系统运维技术交流™Ⅲ

目前有 11 条留言 其中:访客:11 条, 博主:0 条

  1. johnderm : 2012年02月13日12:21:24  1楼

    不错哦

  2. liasli123 : 2012年03月07日10:30:19  2楼

    安装完RHEL 6.2后,配置网卡IPV4地址,无法配置?

  3. anye : 2012年03月21日11:40:11  3楼

    我的镜像里面少了很多东西,并且还没有server

  4. 晓天 : 2012年06月24日22:34:08  4楼

    在执行yum clean all时有个错误提示
    No such file or directory :’/var/cache/yum/i386/6Server
    不知道有没有影响?
    接着执行的yum install php没有什么错误。

  5. 晓天 : 2012年06月24日22:53:04  5楼

    重启一下又出现老问题了。。。。不知道怎么搞了。。。
    [root@localhost network-scripts]# yum install php
    Loaded plugins: refresh-packagekit, rhnplugin
    This system is not registered with RHN.
    RHN support will be disabled.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia. Please verify its path and try again

  6. 骑着蜗牛闯红灯 : 2013年03月11日22:50:16  6楼

    我在安装的时候会出现错误,

    Running Transaction
    Installing : system-config-cluster 1/1
    error: failed to stat /media/RHEL_5.5 i386 DVD: No such file or directory

    不知道是什么原因?

  7. 骑着蜗牛闯红灯 : 2013年03月21日21:51:29  7楼

    [root@rehl6 yum.repos.d]# yum install cluster-glue resource-agents pacemaker
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    Updating certificate-based repositories.
    Unable to read consumer identity
    HighAvailability | 4.0 kB 00:00 …
    LoadBalancer | 3.9 kB 00:00 …
    file:///media/rhrl/Packages/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/rhrl/Packages/repodata/repomd.xml
    Trying other mirror.
    ResilientStorage | 4.0 kB 00:00 …
    file:///media/rhel/ScalableFileSystem/repodata/repomd.xml: [Errno 14] Could not open/read file:///media/rhel/ScalableFileSystem/repodata/repomd.xml
    Trying other mirror.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: ScalableFileSystem. Please verify its path and try again
    [root@rehl6 yum.repos.d]#

    不知道是什么原因?

  8. 294750362@qq.com : 2013年06月27日11:07:49  8楼

    写的很好啊,很详细,菜鸟学习了 :razz: :razz: :razz: :razz: :razz: :razz:

给我留言

您必须 [ 登录 ] 才能发表留言!



Copyright© 2011-2024 系统运维 All rights reserved
版权声明:本站所有文章均为作者原创内容,如需转载,请注明出处及原文链接
陕ICP备11001040号-3