1、一键配置CentOS 8.0一键配置阿里云yum源和epel源脚本:

curl -o centos8.proyy.com.repo https://www.proyy.com/usr/uploads/2020/07/2798727987.repo&&mv /etc/yum.repos.d/*.repo ./ &&cp -rp centos8.proyy.com.repo /etc/yum.repos.d/centos8.proyy.com.repo&& yum clean all&&yum makecache&&yum install -y www.proyy.com 

CentOS 8.0阿里云yum源文件下载:
CentOS8-Base.repo

2、配置CentOS 8.0配置阿里云yum源和epel源

cat /etc/redhat-release

2020-07-03T06:56:50.png

# cd /etc/yum.repos.d

# vim CentOS-AppStream.repo

baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/

2020-07-03T06:59:31.png
2020-07-03T07:00:15.png

# vim CentOS-Base.repo

baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
# vim CentOS-Extras.repo

baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
# dnf -y install epel-release

# dnf clean all

# dnf makecache

# dnf repolist

3、或者直接参考以下配置最新centos8.0配置阿里云yum镜像源:

# 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-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

[PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/PowerTools/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
[AppStream]
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official

2020-07-03T07:03:39.png

Last modification:July 3rd, 2020 at 03:17 pm
如果觉得我的文章对你有用,请随意赞赏