天天看點

2022-02-16 centos8更新阿裡雲軟體源

目錄

​​摘要:​​

摘要:

更換軟體源:

mv /etc/yum.repos.d /etc/yum.repos.d.back && \
    mkdir /etc/yum.repos.d/ -p && \
    cd /etc/yum.repos.d/ && \
    curl -o CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo && \
    yum clean all && \
    yum makecache      

Centos-8.repo檔案:

# 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-stream - Base - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/BaseOS/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever-stream/BaseOS/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever-stream/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-stream - Extras - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/extras/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever-stream/extras/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever-stream/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-stream - Plus - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/centosplus/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever-stream/centosplus/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever-stream/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official
 
[PowerTools]
name=CentOS-$releasever-stream - PowerTools - mirrors.aliyun.com
#failovermethod=priority
baseurl=https://mirrors.aliyun.com/centos/$releasever-stream/PowerTools/$basearch/os/
        http://mirrors.aliyuncs.com/centos/$releasever-stream/PowerTools/$basearch/os/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever-stream/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official


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

繼續閱讀