RHEL6 yum本地源配置

时间:2022-05-25 20:58:22

RHEL6 yum本地源配置

  1. 将RHEL6 的iso上传到/file1/xxx
  2. 新建目录/file1/xxx/mnt,将iso挂载到mnt目录
mount rhel-server-6.3-x86_64-dvd.iso -o loop mnt
  1. /etc/yum.repos.d目录新建配置文件local.repo
vi /etc/yum.repos.d/local.repo

  [iso]
baseurl=file:///file1/xxx/mnt
gpgkey=file:///file1/xxx/mnt/RPM-GPG-KEY-redhat-release
failovermethod=priority
enabled=1
gpgcheck=0
  1. yum install xxx