How Can I Use an EPEL Image Source (x86_64 or 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 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 CN-Hong Kong.
- You have configured the intranet DNS server provided by HUAWEI CLOUD.
To obtain the intranet DNS server address, see What Are the Private DNS Server Addresses Provided by Huawei Cloud?
For instructions about how to configure a DNS server, see Configuring DNS.
- The operations described in this section apply to both x86_64 and Arm (Kunpeng) ECSs.
Procedure
- Log in to the ECS as user root.
- (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
For CentOS 8 or RHEL 8 images, you also need to run the following command to back up the epel-modular.repo file.
mv /etc/yum.repos.d/epel-modular.repo /etc/yum.repos.d/epel-modular.repo.bak
Perform this step only when the epel.repo and epel-modular.repo are available.
- Run the following commands to obtain the configuration files:
- CentOS 6 / RHEL 6
wget -qO /etc/yum.repos.d/epel.repo http://mirrors.myhuaweicloud.com/repo/epel-6.repo
- CentOS 7 / RHEL 7
wget -qO /etc/yum.repos.d/epel.repo http://mirrors.myhuaweicloud.com/repo/epel-7.repo
- CentOS 8 / RHEL 8
wget -qO /etc/yum.repos.d/epel.repo http://mirrors.myhuaweicloud.com/repo/epel-8.repo
wget -qO /etc/yum.repos.d/epel-modular.repo http://mirrors.myhuaweicloud.com/repo/epel-modular.repo
For CentOS 8 or RHEL 8 images, the epel-modular.repo file also needs to be updated to prevent the failure of updating epel.repo.
- CentOS 6 / RHEL 6
- Run the following commands to generate a cache:
yum makecache
yum install epel-release -y >/dev/null 2>&1
- After you execute the yum makecache command, 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", run the following command to update the certificate and temporarily disable the EPEL image source:
- If certain packages are unavailable, this issue may be caused by in-progress data synchronization. In this case, try again after a few hours.
Image Source Management FAQs
- How Can I Use an Automated Tool to Configure a Huawei Cloud Image Source (x86_64 and Arm)?
- How Can I Use an EPEL Image Source (x86_64 or Arm) Provided by Huawei Cloud?
- How Can I Use a Pypi Image Source (x86_64 or Arm) Provided by Huawei Cloud?
- What Can I Do If the Download Speed Is Slow After the yum makecache Command Is Executed?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore