redhat配置本地yum源

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了redhat配置本地yum源相关的知识,希望对你有一定的参考价值。


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


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

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


清理原有缓存
# yum clean all     

验证 yum配置成功没有
[[email protected] ~]# 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配置是否成功
[[email protected] ~]# 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静态源

redhat 配置本地yum源163yum源epel 源,无需卸载yum!无须拷贝ISO

redhat配置本地yum源

redhat系列yum本地源配置

如何设置redhat为centos yum 源

CentOS 8  配置本地yum源