yum源安装
背景:
由于服务器限制,yum源配置不能通过远程获取,故只能通过镜像挂载方式提供仓库进行yum源配置
- 挂载(需将镜像上传到/mnt路径下)
mount -o,loop -t iso9660 /mnt/rhel-server-7.4-x86_64-dvd.iso /opt/iso/ - 开机自动挂载
vi /etc/fstab
/mnt/rhel-server-7.4-x86_64-dvd.iso /opt/iso/ iso9660 defaults 0 0 - 检查挂载是否成功
mount -a - yum源安装
vi /etc/yum.d/rhel.repo
[rhel 7]
name=redhat7
baseurl=file:///opt/iso
enabled=1
gpgcheck=0
wq!
yum clean all
yum repolist