Configuring the Huawei Yum Source
Procedure
- Use PuTTY to log in to the server as the root user.
- Back up the Base source file.
cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
- Download the new CentOS-Base.repo file to the /etc/yum.repos.d/ directory.
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.huaweicloud.com/repository/conf/CentOS-AltArch-7.repo
- Clear the original Yum cache.
yum clean all
- Refresh the Yum source cache.
yum makecache yum repolist all
- Back up the EPEL source file.
cp -a /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
- Modify the epel.repo file.
sed -i "s/#baseurl/baseurl/g" /etc/yum.repos.d/epel.repo sed -i "s/metalink/#metalink/g" /etc/yum.repos.d/epel.repo sed -i "s@https\?://download.fedoraproject.org/pub@https://mirrors.huaweicloud.com@g" /etc/yum.repos.d/epel.repo
- Update the Yum source.
yum update
Parent topic: Configuring the Compilation Environment