如果iso或者光盘无法挂载,如何配置redhat6.5 的安装盘yum源

时间:2020-12-04 17:10:26
1. 从windows,将安装盘中的如下4个文件拷贝到redhat系统的某个目录下(比如/mnt/udisk

[root@redhat ~]# ll /mnt/udisk/ total 264 drwxr-xr-x 2 root root 258048 Dec 15 18:46Packages drwxr-xr-x 2 root root   4096 Dec 15 18:46repodata -rw-r--r-- 1 root root   3375 Dec 15 18:46RPM-GPG-KEY-redhat-beta -rw-r--r-- 1 root root   3211 Dec 15 18:46RPM-GPG-KEY-redhat-release

2. 配置yum文件,增加如下项

[root@redhat ~]# cat /etc/yum.repos.d/rhel-source.repo 
[rhel-source-iso] name=udisk for Redhat baseurl=file:///mnt/udisk enabled=1 gpgcheck=0 gpgkey=file:///mnt/udisk/RPM-GPG-KEY-redhat-beta,file:///mnt/udisk/RPM-GPG-KEY-redhat-release
3. 更新yum源
[root@redhat ~]# yum update

OK~~~