配置yum本地源

rm -rf /etc/yum.repos.d/*
mount -o loop CentOS-7-x86_64-DVD-2009.iso /media
mkdir -p /yum
cp -r /media/* /yum
umount /media
rm -f CentOS-7-x86_64-DVD-2009.iso

配置文件

cat > /etc/yum.repos.d/c7.repo <<EOF
[c7repo]
name=c7repo
baseurl=file:///yum
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
Copyright © weiliang 2021 all right reserved,powered by Gitbook本书发布时间: 2024-04-22 16:03:41

results matching ""

    No results matching ""