Policies

Package management

Generally speaking, it is preferred to keep all install software under package management, i.e., RPM. Mostly because it makes software maintenance much easier. Old and obsolete files get removed during upgrades and/or uninstalls. You can verify administrative integrity easily ("rpm -V"). You can figure out where files come from ("rpm -qf").

When building packages from source, it is thus considered a best practice to build an RPM package and install that, rather then using a simple "make install". These days, many upstream authors provide the RPM .spec files needed in their source distribution. In other cases, one can find a third-party who provides a .spec or SRPM file. In these cases, buidling an RPM becomes almost trivial.

For Perl modules, see "cpan2rpm", below.

Package repositories

Generally speaking, it is preferred to stick with the software the distribution provides, unless there are good reasons to use a third-party package. Sticking to a single source of software means security updates and system upgrades become hugely easier. There will, of course, be reasons to go outside the distribution.

Furthermore, when going outside the distribution, try looking in "big name" repositories first. For example, RPMForge provides a large number of independent packages. We even have the RPMForce repository configured for YUM on liberty; it just isn't enabled by default. By keeping the number of places we have to go to to get software to a minimum, we again make updates and upgrades easier.

Tools

rpm, yum, and up2date

The standard tool for package management on Red Hat-derived systems is "rpm". For dependency management and package retrieval, Red Hat provided "up2date", which works just fine on CentOS. The third-party "yum" tool is also provided with CentOS. Both "up2date" and "yum" are configured to pull from the same CentOS repository mirrors, and can be used interchangeably.

cpan2rpm

Installing Perl modules is frequently needed. A third-party tool called "cpan2rpm" is installed to make this much easier. In short, running "cpan2rpm Foo::Bar" will automatically download, build, and package that module from CPAN, resulting in RPM and SRPM files which can be installed on any RPM-enabled system.

Examples

Using RPMForge

Subversion was, on one iteration of the system, upgraded to 1.2.1-0.1.2.el4.rf from RPMForge.

Since not everyone here is familiar with yum, here is how it was done:

  1. I checked to see if there was a CentOS update that got missed somehow: yum list updates subversion
  2. Nope. Okay, next was to check to see if RPMForge had something newer: yum --enablerepos=rpmforge list subversion
  3. Yup, that found a newer version than what CentOS had -- the 1.2 Paul was looking for. Okay, so after checking with Paul (and making sure no one else was logged in), I ran the update: yum --enablerepos=rpmforge update subversion

And that was about it.

Edit | Attach | Watch | Print version | History: r9 | r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2006-04-18 - BenScott
 

All content is Copyright © 1999-2024 by, and the property of, the contributing authors.
Questions, comments, or concerns? Contact GNHLUG.
All use of this site subject to our Legal Notice (includes Terms of Service).