Solution to slow download from centos 5.5 Yum Source

Source: Internet
Author: User
Tags gpg

Centos 5.5 has been installed under the virtual machine recently. When yum is used, it is found that the download speed is abnormal and slow. You can modify the yum configuration file and direct its image to a domestic server.

Solution 1:

# Cd/etc/yum. Repos. d/

# Mv CentOS-Base.repo CentOS-Base.repo.bak

# Wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

Solution 2:

Means to modify the CentOS-Base.repo file, set baseurlBaseurl = http://ftp.sjtu.edu.cn/centos/5/addons/?basearch/

The detailed configuration is as follows:

 [  Base  ]  

Name = Centos- 5 -Base

# Shortlist = Http://mirrorlist.centos.org /? Release = $ Releasever5 & Arch = $ Basearch & Repo = OS

# Baseurl = Http://developer.centos.org/centos/?releasever/ OS /?basearch/

Baseurl = Http://ftp.sjtu.edu.cn/centos/ 5 /OS/$ basearch/

Gpgcheck = 1

Gpgkey = Http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

# Released updates

[ Update ]

Name = Centos- 5 -Updates

# Shortlist = Http://mirrorlist.centos.org /? Release = 4 & Arch = $ Basearch & Repo = Updates

Baseurl = Http://ftp.sjtu.edu.cn/centos/ 5 /Updates/$ basearch/

Gpgcheck = 1

Gpgkey = Http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

# Packages used/produced in the build but not released

[ Addons ]

Name = Centos- 5 -Addons

# Shortlist = Http://mirrorlist.centos.org /? Release = 4 & Arch = $ Basearch & Repo = Addons

Baseurl = Http://ftp.sjtu.edu.cn/centos/ 5 /Addons/$ basearch/

Gpgcheck = 1

Gpgkey = Http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

# Additional packages that may be useful

[ Extras ]

Name = Centos- 5 -Extras

# Shortlist = Http://mirrorlist.centos.org /? Release = 4 & Arch = $ Basearch & Repo = Extras

Baseurl = Http://ftp.sjtu.edu.cn/centos/ 5 /Extras/$ basearch/

Gpgcheck = 1

Gpgkey = Http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

# Additional packages that extend functionality of existing packages

[ Centosplus ]

Name = Centos- 5 -Plus

# Shortlist = Http://mirrorlist.centos.org /? Release = 4 & Arch = $ Basearch & Repo = Centosplus

Baseurl = Http://ftp.sjtu.edu.cn/centos/ 5 /Centosplus/$ basearch/

Gpgcheck = 1

Enabled = 0

Gpgkey = Http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

# Contrib-packages by centos users

[ Contrib ]

Name = Centos- 5 -Contrib

# Shortlist = Http://mirrorlist.centos.org /? Release = 4 & Arch = $ Basearch & Repo = Contrib

Baseurl = Http://ftp.sjtu.edu.cn/centos/ 5 /Contrib/$ basearch/

Gpgcheck = 1

Enabled = 0

Gpgkey = Http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

ImportKey

#Rpm-import http://ftp.sjtu.edu.cn/centos/5/ OS /i386/RPM-GPG-KEY-CentOS-5

Run and Test

#Yum update

Delete all temporary files

# Yum clean all

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.