Saturday, August 16, 2008

Building Red Hat Enterprise RPMs

Red Hat makes source RPMs freely available at ftp.redhat.com/You can find the SRPMs for RHEL 5 Server in the /pub/redhat/linux/enterprise/5Server/en/os/SRPMS directory. If you're working with RHEL 5 Desktop, substitute 5Client for 5Server.

If you're studying for the Red Hat exams using a "rebuild," you don't have to buy RHEL. Alternatively, you can build Red Hat Enterprise RPMs from the source code. For example, you can learn more about the Samba server from the Samba source code. To do so, take the following steps. First, navigate to ftp.redhat.com (or a mirror site) and navigate to the directory with RHEL 5 source RPMs. (The source code for the RHEL 5 Client and Server are identical, as of this writing). Then you can

1. Down the RHEL 5 version of the package that contains the Samba server, samba-*.src.rpm.

2. Install the source RPM package. The rpm command described earlier sets up the source code in your /usr/src/redhat tree.

3. Build the RPM from source. The rpmbuild commands use the code loaded in the /usr/src/redhat directories to create RPM packages in the /usr/src/redhat/RPMs directory, in the subdirectory associated with your architecture.

0 comments: