RPM and YUM

Newer Software Versions in CentOS

In general, the software version in CentOS are behind. It's just the way CentOS and Red Hat operate. They aim for long term support and stability.

But if you have to use a newer software package, you may find that some newer packages in CentOS's test repository, as listed in this page Available Repositories for CentOS. For CentOS 5 testing packages, you can find them in http://dev.centos.org/centos/5/testing/.

YUM Download Source RPM

How do I yum install SRPM from CentOS/Red Hat site, instead of manually download the srpm from one of the ftp website?

Install yum-utils

# yum install yum-utils

Yum and RPM Tips

Get the dependency

If the package is already installed, use "rpm -qR <package-name>" to get the list of packages that this package depends on. For example:

$ rpm -qR openldap

If the package is not yet installed, use "yum  deplist <package-name>" to get the list of packages that this package depends on. For example:

Signing RPM Packages

The chapter Signing Packages in Maximum RPM explains clearly on how to sign RPM packages.

There are a few things to note though. In the page http://www.rpm.org/max-rpm/s1-rpm-pgp-getting-ready.html, it asked to put the gpg key name name path into rpmrc. This has changed. You have to put the following into ~/.rpmmacros:

Create Local Repository

Prepare GPG key

 

Create the repository

This will show you how to create the repository over http.

First create directory structure on the server, say server1:

[root@server1 ~]# mkdir -p /var/www/repo/CentOS/4/local/i386/RPMS

If createrepo is not already installed, as it will not be by default, install it.