天天看點

RHEL7.1配置本地yum源

RHEL7.1配置本地yum源

[root@localhost ~]#monut /dev/cdrom /mnt/cdrom      #挂載CD光牒

[root@localhost ~]# rm -rf /etc/yum.repos.d/*

[root@localhost ~]# vim /etc/yum.repos.d/rhel7.repo

[rhel7-yum]                                              #yum源名稱,唯一的,用來區分不同的yum源

name=rhel7-source                                   #對yum源描述資訊

baseurl=file:///mnt                                    #yum源的路徑(repodata目錄所在的目錄)

enabled=1                                                #為1,表示啟用yum源

gpgcheck=0                                              #為1,使用公鑰檢驗rpm的正确性

YUM使用:

[root@localhost ~]# yum clean all               #清空yum緩存

[root@localhost ~]# yum list                      #生成清單

     本文轉自lisiyun22 51CTO部落格,原文連結:http://blog.51cto.com/lisiyun/1875348,如需轉載請自行聯系原作者

繼續閱讀