安装 wget
|---|---------------------------|
| 1 | yum ``install -y wget |
进入目录
|---|----------------------------|
| 1 | cd /etc/yum``.repos.d/ |
创建目录
|---|------------------|
| 1 | mkdir backup |
默认源配备份
|---|-------------------|
| 1 | mv C* backup/ |
下载阿里云yum源
|---|----------------------------------------------------------------------------------------------------------|
| 1 | wget -O ``/etc/yum``.repos.d``/CenOS-Base``.repo https:``//mirrors``.aliyun.com``/repo/Centos-7``.repo |
清除旧缓存
|---|-----------------|
| 1 | yum clean all |
创建新缓存
|---|-----------------|
| 1 | yum makecache |
更新yum
|---|-----------------|
| 1 | yum update -y |