Table of contents
- View the current yum source
- Make a backup
- Replace local source with Alibaba Cloud Source
- Clear yum cache and update
- Install epel source
- Use the epel source provided by Alibaba open source mirror
- Clear the system yum cache again and regenerate the new yum cache
- View new yum source
- tips
View the current oneyumsource
yum repolist
- 1
rightCentOS- Make a backup
mv /etc// /etc//
- 1
Replace local source with Alibaba Cloud Source
wget -O /etc// /repo/
- 1
Clear yum cache and update
yum clean all
yum makecache
- 1
- 2
Install epel source
yum list | grep epel-release
yum install -y epel-release
- 1
- 2
Using AliOpen sourceEpel source provided by mirror
wget -O /etc// /repo/
- 1
Clear the system yum cache again and regenerate the new yum cache
yum clean all
yum makecache
- 1
- 2
View new yum source
yum repolist enabled
yum repolist all
- 1
- 2
tips
If you keep reporting during the yum makecache:
Another app is currently holding the yum lock; waiting for it to exit…
Don't panic, just enter the following command
rm -f /var/run/
- 1