183 lines
6.2 KiB
Markdown
183 lines
6.2 KiB
Markdown
|
CentOS 9 Stream
|
||
|
|
||
|
yum配置文件路径
|
||
|
|
||
|
```
|
||
|
/etc/yum.repos.d/centos.repo
|
||
|
```
|
||
|
|
||
|
|
||
|
备份源配置
|
||
|
|
||
|
```
|
||
|
mv /etc/yum.repos.d/centos.repo /etc/yum.repos.d/centos.repo.backup
|
||
|
```
|
||
|
|
||
|
阿里源配置
|
||
|
|
||
|
```
|
||
|
# 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-stream/$stream/BaseOS/$basearch/os/
|
||
|
http://mirrors.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/
|
||
|
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/BaseOS/$basearch/os/
|
||
|
gpgcheck=1
|
||
|
gpgkey=https://mirrors.aliyun.com/centos-stream/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-stream/$stream/extras/$basearch/os/
|
||
|
# http://mirrors.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/
|
||
|
# http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/extras/$basearch/os/
|
||
|
#gpgcheck=1
|
||
|
#gpgkey=https://mirrors.aliyun.com/centos-stream/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-stream/$stream/centosplus/$basearch/os/
|
||
|
http://mirrors.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/
|
||
|
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/centosplus/$basearch/os/
|
||
|
gpgcheck=1
|
||
|
enabled=0
|
||
|
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official
|
||
|
|
||
|
[PowerTools]
|
||
|
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
|
||
|
#failovermethod=priority
|
||
|
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/PowerTools/$basearch/os/
|
||
|
http://mirrors.aliyuncs.com/centos-stream/$stream/PowerTools/$basearch/os/
|
||
|
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/PowerTools/$basearch/os/
|
||
|
gpgcheck=1
|
||
|
enabled=0
|
||
|
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official
|
||
|
|
||
|
|
||
|
[AppStream]
|
||
|
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
|
||
|
#failovermethod=priority
|
||
|
baseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/
|
||
|
http://mirrors.aliyuncs.com/centos-stream/$stream/AppStream/$basearch/os/
|
||
|
http://mirrors.cloud.aliyuncs.com/centos-stream/$stream/AppStream/$basearch/os/
|
||
|
gpgcheck=1
|
||
|
gpgkey=https://mirrors.aliyun.com/centos-stream/RPM-GPG-KEY-CentOS-Official
|
||
|
```
|
||
|
|
||
|
```
|
||
|
[baseos]
|
||
|
name=CentOS Stream $releasever - BaseOS
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/os
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-$stream&arch=$basearch&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
countme=1
|
||
|
enabled=1
|
||
|
|
||
|
[baseos-debuginfo]
|
||
|
name=CentOS Stream $releasever - BaseOS - Debug
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/$basearch/debug/tree/
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-debug-$stream&arch=$basearch&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
enabled=0
|
||
|
|
||
|
[baseos-source]
|
||
|
name=CentOS Stream $releasever - BaseOS - Source
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/BaseOS/source/tree/
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-baseos-source-$stream&arch=source&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
enabled=0
|
||
|
|
||
|
[appstream]
|
||
|
name=CentOS Stream $releasever - AppStream
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/os
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-$stream&arch=$basearch&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
countme=1
|
||
|
enabled=1
|
||
|
|
||
|
[appstream-debuginfo]
|
||
|
name=CentOS Stream $releasever - AppStream - Debug
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/$basearch/debug/tree/
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-debug-$stream&arch=$basearch&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
enabled=0
|
||
|
|
||
|
[appstream-source]
|
||
|
name=CentOS Stream $releasever - AppStream - Source
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/AppStream/source/tree/
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-appstream-source-$stream&arch=source&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
enabled=0
|
||
|
|
||
|
[crb]
|
||
|
name=CentOS Stream $releasever - CRB
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/os
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-$stream&arch=$basearch&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
countme=1
|
||
|
enabled=1
|
||
|
|
||
|
[crb-debuginfo]
|
||
|
name=CentOS Stream $releasever - CRB - Debug
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/$basearch/debug/tree/
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-debug-$stream&arch=$basearch&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
enabled=0
|
||
|
|
||
|
[crb-source]
|
||
|
name=CentOS Stream $releasever - CRB - Source
|
||
|
baseurl=https://mirrors.ustc.edu.cn/centos-stream/$releasever-stream/CRB/source/tree/
|
||
|
# metalink=https://mirrors.centos.org/metalink?repo=centos-crb-source-$stream&arch=source&protocol=https,http
|
||
|
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
|
||
|
gpgcheck=1
|
||
|
repo_gpgcheck=0
|
||
|
metadata_expire=6h
|
||
|
enabled=0
|
||
|
```
|
||
|
|
||
|
更新缓存
|
||
|
|
||
|
```
|
||
|
yum makecache && yum update
|
||
|
```
|
||
|
|