Change the update source for CentOS

Source: Internet
Author: User
Tags gpg

My system is 6.3.

1. Modify the/etc/yum.repos.d/centos-base.repo to: 
[Base] 
Name=centos-5-base 
#mirrorlist =http://mirrorlist.centos.org/?release= $releasever 5&arch= $basearch & 
Repo=os 
#baseurl =http://mirror.centos.org/centos/$releasever/os/$basearch/ 
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/os/$basearch/ 
Gpgcheck=1 
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5 
#releasedupdates 
[UPDATE] 
Name=centos-5-updates 
#mirrorlist =http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=updates 
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/updates/$basearch/ 
Gpgcheck=1 
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5 
#packagesused/producedinthebuildbutnotreleased 
[Addons] 
Name=centos-5-addons 
#mirrorlist =http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=addons 
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/addons/$basearch/ 
Gpgcheck=1 
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5 
#additionalpackagesthatmaybeuseful 
[Extras] 
Name=centos-5-extras 
#mirrorlist =http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=extras 
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/extras/$basearch/ 
Gpgcheck=1 
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5 
#additionalpackagesthatextendfunctionalityofexistingpackages 
[Centosplus] 
Name=centos-5-plus 
#mirrorlist =http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=centosplus 
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/centosplus/$basearch/ 
Gpgcheck=1 
Enabled=0 
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5 
#contrib-packagesbycentosusers 
[Contrib] 
Name=centos-5-contrib 
#mirrorlist =http://mirrorlist.centos.org/?release=4&arch= $basearch &repo=contrib 
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/contrib/$basearch/ 
Gpgcheck=1 
Enabled=0 
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos5 
2. Verify key import: Execute 
RPM--import http://ftp.sjtu.edu.cn/centos/5.3/os/i386/RPM-GPG-KEY-CentOS-5 
3. To upgrade: Execute 
Yum Update 
OK, it's done.

This article is from the "ZPP" blog, make sure to keep this source http://1439337369.blog.51cto.com/10270624/1714354

Change the update source for CentOS

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.