ads


Fix Base RepoBase Centos

did you have any problem with yum command, yum command cant running under your server.  you can back and restore default base repo centos. many provider VPS has modified repo and sometimes your repo conflict so yum command cant run.

first step delete /etc/yum.repos.d/CentOS-Base.repo

Command :

rm /etc/yum.repos.d/CentOS-Base.repo

after delete /etc/yum.repos.d/CentOS-Base.repo you can recreate that file

use command Nano or vi

nano /etc/yum.repos.d/CentOS-Base.repo

or use :

vi /etc/yum.repos.d/CentOS-Base.repo

after that copy this to your editor nano command or vi command :

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=1
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=1
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=1
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=1
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=1
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
priority=2

Note: The above example is for CentOS-4, the file name RPM-GPG-KEY-centos5 (in the gpgkey line) should be replaced with RPM-GPG-KEY-CentOS-4 for use with CentOS-4.

Now you can try give command yum install etc…..

One Response į “Fix Base RepoBase Centos”

  1. free virtualization @ March 7th, 2012 12:30 am

    windows 2000 server…

    Thanks for sharing superb informations. Your web site is so cool. I am impressed by the details that you¡¦ve on this web site. It reveals how nicely you understand this subject. Bookmarked this web page, will come back for more articles. You, my friend…

Leave a Reply:

You must be logged in to post a comment.