> Rocky Linux >

rocky9.4配置本地yum源

将镜像挂载在/media下

[root@localhost ~]# mount /dev/cdrom /media

备份yum源

mv /etc/yum.repos.d /etc/yum.repos.d.bak

新建文件夹

mkdir /etc/yum.repos.d

配置yum文件

[root@localhost ~]# vim /etc/yum.repos.d/local.repo

[local]
name=local
baseurl=file:///media/BaseOS
gpgcheck=0
enabled=1

[baseos]
name=baseos
baseurl=file:///media/AppStream
gpgcheck=0
enabled=1


yum clean all

yum makecache


(责任编辑:IT)