RedHat Enterprise Linux 6.4使用Centos6 的yum源 (32位系统,挂载光盘使用本地源)

来源:互联网 发布:产品经理mac软件 编辑:程序博客网 时间:2024/05/16 14:54

       参考http://dreamfire.blog.51cto.com/418026/1148203/


 

1、部署环境之前先配置好yum仓库指向对应光盘所在位置即可。

 

yum能够自动解决依赖包问题,功能明显优越于rpm安装。

 

    [root@rhel6u3-7 ~]# mount /dev/cdrom  /media/cdrom/   //挂载光盘 

    mount: block device /dev/sr0 is write-protected, mounting read-only 

    [root@rhel6u3-7 ~]# vim /etc/yum.repos.d/rhel-source.repo  //编辑并修改默认yum配置文件 

    [rhel-source] 

    name=Red Hat Enterprise Linux $releasever - $basearch - Source 

    baseurl=file:///media/cdrom 

    enabled=1 

    gpgcheck=0 

    [root@rhel6u3-7 ~]# yum clean all  //清空yum环境 

    Loaded plugins: product-id, security, subscription-manager 

    Updating certificate-based repositories. 

    Unable to read consumer identity 

    Cleaning repos: rhel-source 

    Cleaning up Everything 

    [root@rhel6u3-7 ~]# yum makecache  //清空yum缓存 

    Loaded plugins: product-id, security, subscription-manager 

    Updating certificate-based repositories. 

    Unable to read consumer identity 

    rhel-source                                                                       | 4.0 kB     00:00 ...  

    rhel-source/filelists_db                                                          | 3.1 MB     00:00 ...  

    rhel-source/primary_db                                                            | 2.5 MB     00:00 ...  

    rhel-source/other_db                                                              | 1.2 MB     00:00 ...  

    rhel-source/group_gz                                                              | 204 kB     00:00 ...  

    Metadata Cache Created   //当出现以上信息时候,说明yum环境配置OK了。 

0 0
原创粉丝点击