首页 > 代码库 > redhat配置本地yum源
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源