码迷,mamicode.com
首页 > 其他好文 > 详细

redhat配置本地yum源

时间:2017-02-13 00:24:49      阅读:205      评论:0      收藏:0      [点我收藏+]

标签:redhat 本地yum源


配置本地yum源
#mkdir /media/mnt/
#mount /dev/sro /media/mnt/
# cp -prf /media/mnt/* /var/ftp/rhel5/


配置本地YUM源
root@localhost ~]#  cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# vi local.repo

[base]  
name=local  
baseurl=file:///var/ftp/rhel5/  
gpgcheck=1  
enabled=1


清理原有缓存
# yum clean all     

验证 yum配置成功没有
[root@localhost ~]# yum makecache
Loaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.media                                                                    | 4.1 kB     00:00 ... media/group_gz                                                           | 211 kB     00:00 ... media/filelists_db                                                       | 3.3 MB     00:00 ... media/primary_db                                                         | 3.1 MB     00:00 ... media/other_db                                                           | 1.4 MB     00:00 ... Metadata Cache Created



验证yum配置是否成功
[root@localhost ~]# yum grouplist | grep Server
   Network Infrastructure Server
   Server Platform
   Web Server
   Backup Server
   Directory Server
   Identity Management Server
   Network Storage Server
   Print Server
   Server Platform Development

redhat配置本地yum源

标签:redhat 本地yum源

原文地址:http://11466759.blog.51cto.com/11456759/1897157

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!