Base源

cat > /etc/yum.repos.d/CentOS-Base.repo << 'EOF'
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-6.10 - Base
baseurl=https://vault.centos.org/6.10/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.9&arch=$basearch&repo=os
enabled=1
sslverify=0
gpgcheck=0
gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-6

#released updates
[updates]
name=CentOS-6.10 - Updates
baseurl=https://vault.centos.org/6.10/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.9&arch=$basearch&repo=updates
enabled=1
sslverify=0
gpgcheck=0
gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-6



#additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras
baseurl=https://vault.centos.org/6.10/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.9&arch=$basearch&repo=extras
enabled=1
sslverify=0
gpgcheck=0
gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-6



#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - Plus
baseurl=https://vault.centos.org/6.10/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.9&arch=$basearch&repo=centosplus
gpgcheck=0
sslverify=0
enabled=0
gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-6


#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib
baseurl=https://vault.centos.org/6.10/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.9&arch=$basearch&repo=contrib
gpgcheck=0
sslverify=0
enabled=0
gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-6
EOF

GCC升级源

cat > /etc/yum.repos.d/CentOS-SCLo-scl.repo << 'EOF'
# CentOS-SCLo-sclo.repo
#
# Please see http://wiki.centos.org/SpecialInterestGroup/SCLo for more
# information

[centos-sclo-sclo]
name=CentOS-6 - SCLo sclo
baseurl=https://vault.centos.org/centos/6/sclo/$basearch/sclo/
# mirrorlist=http://mirrorlist.centos.org?arch=$basearch&release=6&repo=sclo-sclo
sslverify=0
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh]
name=CentOS-6 - SCLo rh
baseurl=https://vault.centos.org/centos/6/sclo/$basearch/rh/
sslverify=0
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
EOF