What Can I Do If the Download Speed Is Slow After the yum makecache Command Is Executed?
Symptom
After the yum makecache command is executed to create a local cache, the download speed becomes slow.
Solution
Configure the EPEL source.
- Learn what is EPEL source.
- EPEL repository: https://repo.huaweicloud.com/epel/
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 x86_64 ECSs.
Procedure
- Run the following commands to back up configuration files:
cp -a /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
- Modify the epel.repo file.
Run the following commands to uncomment the line starting with baseurl, comment out the lines starting with mirrorlist, and replace http://download.fedoraproject.org/pub in the file with https://repo.huaweicloud.com, respectively:
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@http://download.fedoraproject.org/pub@https://repo.huaweicloud.com@g" /etc/yum.repos.d/epel.repo
- Run the yum update command to update the software list.
- 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.
- After you execute the yum makecache command, 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:
yum --disablerepo=epel -y update ca-certificates
- 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