Configuring the Yum Source
- View the Yum source.Check for the Yum source (a .repo file). If it is available, go to 5.
1ls /etc/yum.repos.d/ - Back up the Yum source.
1 2 3
cd /etc/yum.repos.d mkdir bak mv *.repo bak
- Configure the Internet Yum source.
- On CentOS 7.6:
1wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.huaweicloud.com/repository/conf/CentOS-AltArch-7.repo
- On CentOS 8.1:
1 2
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-8-reg.repo sed -i "s/\$releasever/8-stream/g" /etc/yum.repos.d/CentOS-Base.repo
- On CentOS 7.6:
- View the Yum source.
1 2
ls /etc/yum.repos.d/ cat /etc/yum.repos.d/CentOS-Base.repo
- Make the Yum source take effect.
1 2 3
yum clean all yum makecache yum list
Parent topic: Configuring the Compilation Environment