Help Center > > FAQs> Image Source Management> How Can I Use an epel Image Source (x86_64 or Arm) Provided by HUAWEI CLOUD?

How Can I Use an epel Image Source (x86_64 or Arm) Provided by HUAWEI CLOUD?

Updated at: Jul 10, 2020 GMT+08:00

Scenarios

When updating the OS or software of an ECS, you can access the Internet through the ECS and use an external epel image source. However, if your ECS cannot access the Internet, or the external epel image source cannot provide services stably, you can use the epel 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.
  • Make sure that the DNS server provided by HUAWEI CLOUD has been configured.
  • The operations described in this section apply to ECSs deployed on x86_64 or Arm (Kunpeng) servers.

Procedure

  1. Log in to the ECS as user root.
  2. (Optional) Run the following command to back up the epel.repo file:

    mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.bak

    Perform this step only if the epel.repo file is available.

  3. Run the following commands to install epel-xxx-noarch.rpm and obtain the configuration file:
    • For CentOS 6 or RHEL 6

      rpm -ivh http://mirrors.myhuaweicloud.com/epel/epel-release-latest-6.noarch.rpm

      wget -qO /etc/yum.repos.d/epel.repo http://mirrors.myhuaweicloud.com/repo/epel-6.repo

    • For CentOS 7 or RHEL 7

      rpm -ivh http://mirrors.myhuaweicloud.com/epel/epel-release-latest-7.noarch.rpm

      wget -qO /etc/yum.repos.d/epel.repo http://mirrors.myhuaweicloud.com/repo/epel-7.repo

  4. Run the following command to generate a cache:

    yum clean metadata

    yum makecache

    yum install epel-release -y >/dev/null 2>&1

    • 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 After the command is executed, if the system displays the message "Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again", run the following command to update the certificate for temporarily disabling the epel image source:

      yum --disablerepo=epel -y update ca-certificates

    • If certain packages are unavailable, this issue may be caused by in-progress data synchronization. In such a case, try again several hours later.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel