由于没有安装centos-release包,因此无法获取$releasever,asearch等相关信息,需要手动执行才行
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
下面是常用的yum源:
[base1]
name=CentOS-Base1
baseurl=http://mirror.centos.org/centos/7/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[base3]
name=CentOS-Base3
baseurl=http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.12.1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[aliyum]
name=CentOS-aliyum
baseurl=http://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[sjtu]
name=CentOS-sjtu
baseurl=http://ftp.sjtu.edu.cn/centos/7.6.1810/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[jdcloud]
name=CentOS-jdcloud
baseurl=http://mirror.jdcloud.com/centos/7.6.1810/os/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[zju]
name=CentOS-zju
baseurl=http://mirrors.zju.edu.cn/centos/7.6.1810/os/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[ustc]
name=CentOS-ustc
baseurl=http://centos.ustc.edu.cn/centos/7.6.1810/os/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[tsinghua]
name=CentOS-tsinghua
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/7.6.1810/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[lzu]
name=CentOS-lzu
baseurl=http://mirror.lzu.edu.cn/centos/7.6.1810/extras/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[163]
name=CentOS-163
baseurl=http://mirrors.163.com/centos/7.6.1810/extras/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[cqu]
name=CentOS-cqu
baseurl=http://mirrors.cqu.edu.cn/CentOS/7.6.1810/extras/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[ustc]
name=ustc
baseurl=http://centos.ustc.edu.cn/centos/7.6.1810/extras/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[nginx]
name=nginx
baseurl=http://nginx.org/packages/centos/7/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[njupt]
name=njupt
baseurl=http://mirrors.njupt.edu.cn/centos/7.6.1810/os/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[cloudera]
name=cloudera
baseurl=http://archive.cloudera.com/cm5/redhat/7/x86_64/cm/5.12.1/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[hortonworks-2.7]
name=hortonworks-2.7
baseurl=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.0.0/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[hortonworks-2.6]
name=hortonworks-2.6
baseurl=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.0/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[bit]
name=bit
baseurl=http://mirror.bit.edu.cn/centos/7.6.1810/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[njupt]
name=njupt
baseurl=http://mirrors.njupt.edu.cn/centos/7.6.1810/os/x86_64
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[huaweicloud]
name=CentOS-huaweicloud
baseurl=http://mirrors.huaweicloud.com/centos/7.6.1810/os/x86_64/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7