光盘挂载方式
mount /dev/cdrom /mnt
IOS挂载方式
mount -0 loop /tmp/rhel7.9.iso /mnt
编写YUM配置文件(也可使用本地网络YUM源)
cat> /etc/yum.repos.d/yum.repo <<EOF
[source]
name=yumserver
baseurl=file:///mnt
gpgcheck=0
EOF
YUM源配置生效
yum clean all
yum makecache
微信扫一扫
mount /dev/cdrom /mnt
mount -0 loop /tmp/rhel7.9.iso /mnt
cat> /etc/yum.repos.d/yum.repo <<EOF
[source]
name=yumserver
baseurl=file:///mnt
gpgcheck=0
EOF
yum clean all
yum makecache
相关推荐