Linux package management
By Andres Barcenas, System Administrator, PEER 1
Custom software installation on Red Hat Enterprise 3/4
The RedHat Package Manager (RPM) is a powerful command line-driven package
management system used on our REd Hat systems that is capable of installing,
uninstalling, verifying, querying and updating computer software packages. Our
systems come with a list of pre-compiled binaries from the vendor or our
development team.
Customizing packages is a task that most Linux administrators undertake on a
daily basis. In order to properly install customized pre-compiled software
(unsupported) on your server, or a customized, pre-compiled version of what we
provided with the OS, you have a couple of options of how to proceed. Both of
the options we suggest below will ensure that those customizations do not get
overwritten by the updates that we release from time to time via up2date.
Option 1
Download the source RPM for the package you want to install, recompile it and
install it, taking care to also recompile any other packages with dependencies
on that RPM. Next, add the proper exclusions for updates to the file /etc/sysconfig/rhn/up2date
so up2date will not automatically download and apply updates we release. This:
- prevents updates from
overwriting your custom work;
- keeps packages rpm-based for
easier dependency detection and resolution;
- is the 'proper' way of
updating packages on an rpm-based linux installation.
Here is an example of /etc/sysconfig/rhn/up2date with
apache (httpd) excluded:
pkgSkipList=httpd*;mod_ssl*;
and here is the output from up2date:
[root@ns ~]# up2date
Fetching
Obsoletes list for channel: rhel-i386-es-3...
Fetching
rpm headers...
Name Version Rel
----------------------------------------------------------
The following packages were marked to be skipped by your
configuration:
Name
Version Rel
Reason
-------------------------------------------------------------------------------
httpd
2.0.46 57.ent.STOCKPkg
name/pattern
httpd-devel
2.0.46
57.ent.STOCKPkg name/pattern
mod_ssl 2.0.46 57.ent.STOCKPkg
name/pattern
Option
2
Alternatively, you could uninstall the RPM package that the system came with
first before recompiling the software, and do a source-based install. This will
do two things:
- Reveal dependencies by other
components of the os on that package that will also need to be uninstalled
and re-compiled against your source;
- prevent future up2date
releases from overwriting your customized re-compilation.
By not performing either of the two options referred to
above, you run the risk of having your customizations overwritten by updates
that PEER 1 releases via up2date. By working together we will ensure the
security and integrity of your server.