我要评分
获取效率
正确性
完整性
易理解

Configuring the Huawei Yum Source

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Back up the Base source file.
    cp -a /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
  3. 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
  4. Clear the original Yum cache.
    yum clean all
  5. Refresh the Yum source cache.
    yum makecache
    yum repolist all
  6. Back up the EPEL source file.
    cp -a /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
  7. 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
  8. Update the Yum source.
    yum update