Unix (Linux and *BSD) » Distributions

ID #1005

How can I add more CentOS repositories?

After installing CentOS, your system has only a few repositories, therefore offering a limited range of applications. It is possible and easy to add more repositories that are unofficial but trusted by the community. By doing so, you will access a wide range or applications for your CentOS system.

You have two ways to add more Centos repositories:

  • Drop .repo files into your /etc/yum.repos.d/ directory
  • Add a repository entry in your /etc/yum.conf file

In this example, we will use yum.conf only, for more consistency.

Adding official CentOS repositories

Here is the list of official repository entries that you can add to your /etc/yum.conf file:

[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-centos4
enabled=1
#released updates 
[update]
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-centos4
enabled=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-centos4
enabled=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-centos4
enabled=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=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#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=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

Additional third-party CentOS repositories

The following repositories don't belong to the CentOS project but are trustworthy and provide additional software:

[dries]
name=Extra Fedora rpms dries - $releasever - $basearch
baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/redhat/el4/en/i386/dries/RPMS
gpgcheck=1
enabled=1
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
[kbs-CentOS-Extras]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgcheck=1
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
enabled=1
baseurl=http://centos.karan.org/el$releasever/extras/stable/$basearch/RPMS/
[kbs-CentOS-Misc]
name=CentOS.Karan.Org-EL$releasever - Stable
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=1
enabled=1
baseurl=http://centos.karan.org/el$releasever/misc/stable/$basearch/RPMS/
[kbs-CentOS-Misc-Testing]
name=CentOS.Karan.Org-EL$releasever - Testing
gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
gpgcheck=1
enabled=1
baseurl=http://centos.karan.org/el$releasever/misc/testing/i386/RPMS/
[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/fc$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1enabled=1

To use the above repositories, you need to add their GPG key for authentication:

$ su -
# rpm --import http://centos.karan.org/RPM-GPG-KEY-karan.org.txt
# rpm --import http://dries.ulyssis.org/rpm/RPM-GPG-KEY.dries.txt
# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
# rpm --import http://ATrpms.net/RPM-GPG-KEY.atrpms

With all these repositories, you should be able to find most applications you need.

Tags: -

Related entries:

Last update: 2008-09-01 06:13
Author: Charles A. Landemaine
Revision: 1.1

Change language
 

Digg it! Print this record Send to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this entry:

Average rating: 4.37 out of 5 (86 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry

Comment of Jim Rolt:
th key for DAG is now wrong. The correct line is: # rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Added at: 2007-02-19 10:59

Comment of Marlaina Barr:
I replaced the Dag repo file you have listed with the following (which works): [dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://dag.linux.iastate.edu/dag/redhat/el$releasever/en/$basearch/dag gpgcheck=1 enabled=1
Added at: 2007-03-11 16:15

Comment of Boyce Crownover:
Excellent reference, thank you. I am using CentOS 5 and ran into problems with both the Dag key and a couple of the ones at karan.org. I don't know whether it is because the information has changed or because they aren't supporting all the same paths for 5 yet. With karan I had to disable both the kbs-CentOS-Misc and kbs-CentOS-Misc-Testing. (Neither appears to be valid/available even with info from the site.) With dag I had to browse to the key and save the key, just the key and not the comments, as a text file then import it separately. All seems functional after those changes.
Added at: 2007-05-10 22:26

Comment of Billy:
For CentOS5 I needed to change the fc to el in the following line. baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable Billy
Added at: 2007-08-15 00:30

Comment of cfyAPbvt:
That’s more than senbslie! That’s a great post!
Added at: 2011-05-23 04:22

Comment of zDzXlbnORqo:
Hahahaha. I’m not too birhgt today. Great post!
Added at: 2011-05-23 06:06

Comment of JxfeqFEz:
Cool! That's a cevler way of looking at it!
Added at: 2011-05-23 07:09

Comment of tfNmQQrHtEOXaCy:
Now I know who the brainy one is, I’ll keep looikng for your posts.
Added at: 2011-05-23 13:14

Comment of sDbkMbpLCi:
tBh4ih oraucaolpmtq
Added at: 2011-05-24 05:43

Comment of BtOCFYjflicKmpyPFM:
Flsixj destaztqnufx
Added at: 2011-05-24 05:47

Comment of xLtzdCYYwZCQAeJWO:
RVqxvl khqmdambtmsy
Added at: 2011-05-24 06:12

Comment of DcneGfrwfkp:
yc3rHm , [url=http://vmhrqdvbqvjn.com/]vmhrqdvbqvjn[/url], [link=http://barmqoismhtw.com/]barmqoismhtw[/link], http://vtahrginstsp.com/
Added at: 2011-05-24 12:31

Comment of jaiDYQhLJj:
qln3YA , [url=http://axnbjojkqtoe.com/]axnbjojkqtoe[/url], [link=http://fpysesomcwut.com/]fpysesomcwut[/link], http://tmwmsqoqhobc.com/
Added at: 2011-05-24 12:41

Comment of sISBeIeDHoBzPbaJbEc:
vZvCaC , [url=http://hindlslkhpyx.com/]hindlslkhpyx[/url], [link=http://dacgipjetznc.com/]dacgipjetznc[/link], http://qnikzbjustjm.com/
Added at: 2011-05-24 12:52

Comment of fIjBnhcVJnHKv:
rX4meD livburqzlwwp
Added at: 2011-05-28 04:07

Comment of cBeCOPDb:
i5cH12 aptnymqxzuli
Added at: 2011-05-28 04:11

Comment of jTqyZdihNEtQZatX:
VKZFdh mchflnqtjsng
Added at: 2011-05-28 04:16

Comment of nZTSzXzuW:
llw7z2 fidgoelxkivt
Added at: 2011-05-28 04:41

Comment of WqAUDdlPTYhT:
yLXF7K , [url=http://fevenqapkpij.com/]fevenqapkpij[/url], [link=http://vfiuvcvsparl.com/]vfiuvcvsparl[/link], http://hbyxqgkwqrqp.com/
Added at: 2011-05-31 07:26

Comment of yNmROYALzIgiVk:
AoRMQX , [url=http://asqqufybcolm.com/]asqqufybcolm[/url], [link=http://qzefpabmonzk.com/]qzefpabmonzk[/link], http://zxegznzbunjl.com/
Added at: 2011-05-31 07:51

Comment of BhoQEtBSBRUGbMsoqlo:
bVxoca , [url=http://xucdlgtmyjcf.com/]xucdlgtmyjcf[/url], [link=http://monhzzhymnet.com/]monhzzhymnet[/link], http://fgxdlcbjmjjo.com/
Added at: 2011-05-31 08:37

Comment of NgCrBydCPpAinDQjbv:
yDZOrI , [url=http://xoszhglxcerh.com/]xoszhglxcerh[/url], [link=http://sdslpaazqucf.com/]sdslpaazqucf[/link], http://psiwbkubyaog.com/
Added at: 2011-05-31 08:57

Comment of sfDIeiyVMBEsK:
So excetid I found this article as it made things much quicker!
Added at: 2011-09-26 05:33

Comment of ifmrYJAmFKkuASZsE:
PXi7zJ wahkgifkrxov
Added at: 2011-10-01 13:04

Comment of ymXPSBzxMBfHsUdyVM:
cUHV4O , [url=http://jgdfzesgioex.com/]jgdfzesgioex[/url], [link=http://ypvfneqiqsol.com/]ypvfneqiqsol[/link], http://qdbomjvngubp.com/
Added at: 2011-10-04 12:13

Comment of yVLEHnHuVEOF:
Cheers pal. I do appriecate the writing.
Added at: 2012-10-26 15:39

Comment of WPVPCvwIjQ:
LVzac8 pkfqvhspfvcl
Added at: 2012-10-27 02:41

Comment of aocLsqYuMzfstMXJVY:
Hi,Centos official site doesn't have the uperdagd kernel version in its repository when this post was made so I used unofficial kernel. Now they have added the new kernel version, so i have edited the post now, you can check with the same. Thank you for your advice.
Added at: 2012-10-28 00:12

Comment of iRmJhTSevhZsg:
75GxHg uyinyuptgtpi
Added at: 2012-10-28 14:48

Comment of hBHeIABnpAZWbMCZmF:
705LCg pcmfvwurxkkj
Added at: 2012-10-28 18:01

Comment of wrapynqPpK:
RG6Y2S , [url=http://ixexxqfufaqa.com/]ixexxqfufaqa[/url], [link=http://cdounkphbibk.com/]cdounkphbibk[/link], http://mijlydozdibe.com/
Added at: 2012-10-28 22:44

Comment of flrtiloyuEueqlzkw:
hobYbv bfybcmrabiyu
Added at: 2012-10-29 01:31