備份目錄/etc/yum.repos.d/下全部文件到其餘目錄ide
baseurl爲網站內repodata文件夾所在路徑網站
[epel]url
name=epelspa
baseurl=https://mirrors.aliyun.com/epel/$releasever/$basearch it
enabled=1class
gpgcheck=1file
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7gc
寫入/etc/yum.repos.d/epel.repoyum
/dev/sr0 /misc/cd iso9660 defaults 0 0寫入/etc/fstab實現光盤自動掛載tab
[c7-media]
name=CentOS-$releasever - Media
baseurl=file:///misc/cd/
gpgcheck=1
enabled=1
gpgkey=file:///misc/cd/RPM-GPG-KEY-CentOS-7
寫入/etc/yum.repos.d/CentOS-Media.repo