centos7yum源配置
时间: 2023-11-28 15:46:14 浏览: 128
CentOS 7配置yum源
5星 · 资源好评率100%
以下是CentOS 7 yum源配置的步骤:
1.备份原有的yum源配置文件
```shell
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
```
2.下载新的yum源配置文件
```shell
# 下载阿里云的yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
```
3.清除yum缓存
```shell
yum clean all
```
4.生成yum缓存
```shell
yum makecache
```
5.更新yum
```shell
yum update
```
阅读全文