centos8 安装外网yum源
时间: 2023-11-24 21:52:45 浏览: 381
centos8的yum源
以下是在CentOS 8上安装外网yum源的步骤:
1.备份原有的yum源文件
```shell
sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
```
2.下载CentOS 8的yum源文件
```shell
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
```
3.清除yum缓存
```shell
sudo yum clean all
```
4.更新yum缓存
```shell
sudo yum makecache
```
5.测试yum源是否可用
```shell
sudo yum update
```
阅读全文