Main Repository Divisions
Main software repositories:
- Official Centos Repositories (Section 1)
- 3rd Party Repositories (Section 2)
Section 1
A repository is a prepared directory or web site that contains software packages and index files. Software management utilities such as yum automatically locate and obtain the correct RPM packages from these repositories. This method frees you from having to manually find and install new applications or updates. You may use a single command to update all system software, or search for new software by specifying criteria. All of the software provided by the Centos Project is open source software. You may download and install software from the Centos Project network of repositories on as many systems as desired. The configuration files for these repositories can be found on the system here: /etc/yum.repos.d/*.repo
Official Centos Repos
- Base Repository:
- Updates Repository:
- Addons Repository:
- Contrib Repository:
- Centosplus Repository:
- CSGFS:
- Extras:
- Testing:
[Base] – The packages that make up Centos, as it is released on the ISOs. It is enabled by default
[Updates] – Updated packages to [Base] released after the Centos ISOs. This will be Security, BugFix, or Enhancements to the [Base] software. It is enabled by default
[Addons] – Contains packages required in order to build the main Distribution or packages produced by SRPMS built in the main Distribution, but not included in the main Red Hat package tree (mysql-server in Centos-3.x falls into this category). Packages contained in the addons repository should be considered essentially a part of the core distribution, but may not be in the upstream Package tree. It is enabled by default
[Contrib] – Packages contributed by the Centos Users, which do not overlap with any of the core Distribution packages. These packages have not been tested by the Centos developers, and may not track upstream version releases very closely. It is disabled by default
[Centosplus] – Packages contributed by Centos developers and the users. These packages might replace rpm’s included in the core distribution. You should understand the implications of enabling and using packages from this repository. It is disabled by default
[csgfs] – Packages that make up the Cluster Suite and Global File System. It is disabled by default
[Extras] – Packages built and maintained by the Centos developers that add functionality to the core distribution. These packages have undergone some basic testing, should track upstream release versions fairly closely and will never replace any core distribution package. It is enabled by default
[Testing] – Packages that are being tested prior to release, you should not use this repository except for a specific reason. It is disabled by default
You can have a look at the packages here:
http://dev.centos.org/centos/6/
http://dev.centos.org/centos/7/
Section 2
3rd Party Software Repositories
These are known safe repositories when used alone with default Centos repositories. They are safe to leave enabled and known to integrate well with Centos. Do not mix them together or with other repos or you will have conflicts eventually, pick one or the other.
- EPEL: Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux (RHEL) and its compatible spinoffs such as Centos or Scientific Linux. Find out more information here: EPEL Homepage
- IUS Repo: IUS requires that the EPEL repo also be installed. This is where you’ll find updated PHP and other packages for Centos.
Step 1
C6:rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
C7: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmStep 2
C6:rpm -Uvh https://centos6.iuscommunity.org/ius-release.rpm
C7:rpm -Uvh https://centos7.iuscommunity.org/ius-release.rpm
- elrepo: The ELRepo Project focuses on hardware related packages to enhance your experience with Enterprise Linux. This includes filesystem drivers, graphics drivers, network drivers, sound drivers, webcam and video drivers.
- Import the RPM signing key:
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
- C6:
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
- C7:
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
- Import the RPM signing key:
- RPMFusion: RPMFusion is a repository of add-on packages for Fedora and RHEL+EPEL maintained by a group of volunteers. RPMFusion is not a standalone repository, but an extension of RHEL/Centos/Fedora. RPMFusion distributes packages that have been deemed unacceptable to Red Hat or Fedora.
- The above sed command puts these repos in a default disabled state to keep you or another person with software installation access from making a mistake that could destroy the system. To search for software in these repositories or install software you would use commands similar to these:
Install EPEL:
C6: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
C7: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
See configuration options at: http://rpmfusion.org/Configuration
Free: Free software repository config can be downloaded here:
C6: http://download1.rpmfusion.org/free/el/updates/6/i386/rpmfusion-free-release-6-1.noarch.rpm
non-Free: non-Free software repository config can be downloaded here:
C6: http://download1.rpmfusion.org/nonfree/el/updates/6/i386/rpmfusion-nonfree-release-6-1.noarch.rpm
After this install successfully completes, run these 2 commands as root:
sed -i 's/^enabled=1/enabled=0/' /etc/yum.repos.d/rpmfusion-free-updates.repo
sed -i 's/^enabled=1/enabled=0/' /etc/yum.repos.d/rpmfusion-nonfree-updates.repo
To search:
1 2 3 |
yum --enablerepo=epel search denyhosts yum --enablerepo=rpmforge search fail2ban yum --enablerepo=epel --enablerepo=rpmforge search */php |
To install:
1 2 |
yum --enablerepo=epel install denyhosts yum --enablerepo=rpmforge install fail2ban |
Things NOT to do:
1 |
yum --enablerepo=epel --enablerepo=rpmforge update |
The reason these repositories cannot be enabled together in any sane fashion is due to methodology. Each repository has its own way of packaging and integrating the packages into the system. They can be used together with some common sense and planning, but you need to understand and take appropriate
precautions.
Use of the yum-priorities plugin is highly encouraged to further prevent unwanted overwriting of key files or rpms on the system.
This plugin is configured here:
/etc/yum.conf
/etc/yum/pluginconf.d/priorities.conf
/etc/yum.repos.d/*.repo files
Configuration:
/etc/yum.conf
make sure this line is included:
plugins=1
in: /etc/yum/pluginconf.d/priorities.conf
make sure these lines are included:
1 2 3 |
[main] enabled=1 check_obsoletes=1 |
/etc/yum.repos.d/*.repo
make sure this line is added to all *.repo files:
priority=N (where N is an integer between 1-99)
This setting is the most important of the 3. The first 2 make sure the plugin is enabled, the last tells yum what repositories have priority over the others. 1 =- most priority, 99 == least. You’ll want to make sure the default Centos repos are set to 1 and the others according to your personal preferences.
Please see: http://wiki.centos.org/PackageManagement/Yum/Priorities for verbose explanations.
Check out the Centos wiki for more in-depth information
Disclaimer
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #centoshelp on irc.freenode.net