Help Center> Elastic Cloud Server> FAQs> Image Source Management> How Can I Use a CentOS-Altarch Image Source (Arm) Provided by HUAWEI CLOUD?

How Can I Use a CentOS-Altarch Image Source (Arm) Provided by HUAWEI CLOUD?

Scenarios

When updating the OS or software of an ECS, you can access the Internet through the ECS and use an external CentOS image source. However, if your ECS cannot access the Internet, or the external CentOS image source cannot provide services stably, you can use the CentOS image source provided by HUAWEI CLOUD.

Constraints

  • This section applies only to the following regions: CN North-Beijing1, CN North-Beijing4, CN East-Shanghai1, CN East-Shanghai2, CN South-Guangzhou, and AP-Hong Kong.
  • The operations described in this section apply to Arm (Kunpeng) ECSs.

Procedure

  1. Log in to the ECS as user root.
  2. Run the following commands to back up the CentOS-Base.repo file:

    mkdir -p /etc/yum.repos.d/repo_bak/

    mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/repo_bak/

  3. Select a suitable curl command according to the CentOS image source version, run the command to download the CentOS-Base.repo file, and save the file into /etc/yum.repos.d/:

    curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.myhuaweicloud.com/repo/Centos-altarch-7.repo

  4. Run the following command to clear the original yum cache:

    yum clean all

  5. Run the following command to generate a new cache:

    yum makecache

    • After the command is executed, if the system displays the message "Another app is currently holding the yum lock", run the rm -rf /var/run/yum.pid command to delete the yum.pid file. Then, run the yum makecache command again to generate the cache.
    • If the system displays the message "Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again" after you run the yum makecache command, you must run the yum --disablerepo=epel -y update ca-certificates command to update the certificate for temporarily disabling the EPEL source.
    • If certain packages are unavailable, this issue may be caused by in-progress data synchronization. In such a case, try again several hours later.