yum设置文件路径
centos.repo
centos.repo 设置文件是 CentOS 系统中用于设置 yum 软件仓库(repository)的文件。这个文件界说了 yum 从哪些 URL 地点获取软件包。
/etc/yum.repos.d/centos.repo
centos-addons.repo
centos-addons.repo 设置文件是 CentOS 系统中用于设置额外软件仓库(repository)的 yum 设置文件。这个文件允许用户添加除了基础仓库之外的额外软件包源,以便安装那些不在基础仓库中的软件包。
/etc/yum.repos.d/centos-addons.repo
备份设置文件
- cp /etc/yum.repos.d/centos.repo /etc/yum.repos.d/centos.repo.backup-20240812-1
- cp /etc/yum.repos.d/centos-addons.repo /etc/yum.repos.d/centos-addons.repo.backup-20240812-1
- ll
复制代码- 总用量 44
- -rw-r--r--. 1 root root 4245 4月 6 2023 centos-addons.repo
- -rw-r--r-- 1 root root 4245 8月 12 11:52 centos-addons.repo.backup-20240812-1
- -rw-r--r--. 1 root root 2600 4月 6 2023 centos.repo
- -rw-r--r-- 1 root root 2600 8月 12 11:52 centos.repo.backup-20240812-1
- -rw-r--r--. 1 root root 1919 7月 3 11:26 docker-ce.repo
- -rw-r--r--. 1 root root 1519 12月 2 2021 epel-next.repo
- -rw-r--r--. 1 root root 1621 12月 2 2021 epel-next-testing.repo
- -rw-r--r--. 1 root root 1453 12月 2 2021 epel.repo
- -rw-r--r--. 1 root root 1552 12月 2 2021 epel-testing.repo
复制代码 修改yum源
centos.repo
- [baseos]
- name=CentOS Stream $releasever - BaseOS
- baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/os/
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- gpgcheck=1
- repo_gpgcheck=0
- metadata_expire=6h
- countme=1
- enabled=1
- [baseos-debug]
- name=CentOS Stream $releasever - BaseOS - Debug
- baseurl=https://mirrors.aliyun.com/centos-stream/$stream/BaseOS/$basearch/debug/tree/
- 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.aliyun.com/centos-stream/$stream/BaseOS/source/tree/
- 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.aliyun.com/centos-stream/$stream/AppStream/$basearch/os/
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- gpgcheck=1
- repo_gpgcheck=0
- metadata_expire=6h
- countme=1
- enabled=1
- [appstream-debug]
- name=CentOS Stream $releasever - AppStream - Debug
- baseurl=https://mirrors.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/
- 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.aliyun.com/centos-stream/$stream/AppStream/$basearch/debug/tree/
- 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.aliyun.com/centos-stream/$stream/CRB/$basearch/os/
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- gpgcheck=1
- repo_gpgcheck=0
- metadata_expire=6h
- countme=1
- enabled=0
- [crb-debug]
- name=CentOS Stream $releasever - CRB - Debug
- baseurl=https://mirrors.aliyun.com/centos-stream/$stream/CRB/$basearch/debug/tree/
- 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.aliyun.com/centos-stream/$stream/CRB/source/tree/
- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
- gpgcheck=1
- repo_gpgcheck=0
- metadata_expire=6h
- enabled=0
复制代码 centos-addons.repo
更新缓存
yum makecache
- [root@localhost yum.repos.d]# yum makecache
- CentOS Stream 9 - BaseOS 451 kB/s | 9.2 MB 00:20
- CentOS Stream 9 - AppStream 468 kB/s | 18 MB 00:39
- CentOS Stream 9 - Extras packages 39 kB/s | 18 kB 00:00
- Docker CE Stable - aarch64 8.5 kB/s | 3.5 kB 00:00
- Extra Packages for Enterprise Linux 9 - aarch64 3.6 kB/s | 6.2 kB 00:01
- Extra Packages for Enterprise Linux 9 - Next - aarch64 8.4 kB/s | 17 kB 00:01
复制代码 元数据缓存已建立。
yum update
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |