Fedora-27-中科大的软件源

[root@localhost yum.repos.d]# pwd
/etc/yum.repos.d
[root@localhost yum.repos.d]# ls *ustc*
fedora-updates-ustc.repo  fedora-ustc.repo

#以下是具体内容
fedora-updates-ustc.repo  fedora-ustc.repo
[root@localhost yum.repos.d]# cat fedora-updates-ustc.repo
[updates]
name=Fedora $releasever - $basearch - Updates - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[updates-debuginfo]
name=Fedora $releasever - $basearch - Updates - Debug -ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/debug/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[updates-source]
name=Fedora $releasever - Updates Source - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/SRPMS/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
[root@localhost yum.repos.d]# cat fedora-ustc.repo
[fedora]
name=Fedora $releasever - $basearch - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/$basearch/os/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/$basearch/debug/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[fedora-source]
name=Fedora $releasever - Source - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/source/SRPMS/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

#####
#执行
cat >/etc/yum.repos.d/fedora-ustc.repo<<EOF
[fedora]
name=Fedora $releasever - $basearch - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/$basearch/os/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&amp;arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/$basearch/debug/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&amp;arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[fedora-source]
name=Fedora $releasever - Source - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/releases/$releasever/Everything/source/SRPMS/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&amp;arch=$basearch
enabled=0
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
EOF

######
cat >/etc/yum.repos.d/fedora-updates-ustc.repo<<EOF
[updates]
name=Fedora $releasever - $basearch - Updates - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&amp;arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[updates-debuginfo]
name=Fedora $releasever - $basearch - Updates - Debug -ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/$basearch/debug/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&amp;arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

[updates-source]
name=Fedora $releasever - Updates Source - ustc
failovermethod=priority
baseurl=https://mirrors.ustc.edu.cn/fedora/updates/$releasever/SRPMS/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&amp;arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch

EOF