RPM

Preparation
- Perform this stage using your functioning PC.
- Download the RPM i386 precompiled binaries from www.rpm.org.
- Visit www.rpm.org and scroll down to the section headed "Resources to obtain the programs and source code for free".
- Click on the link for "RPM FTP site".
- Click on the link for the "rpm" directory.
- Click on the link for the "dist" directory.
- Click on the link for the "rpm-4.1.x" directory.
- Click on the link for the i386 precompiled binaries of the latest version of RPM. The file is in
.tar.gzformat.- At the time of writing the latest version of RPM was version 4.1, so the file downloaded was
rpm-4.1.i386.tar.gz.
- At the time of writing the latest version of RPM was version 4.1, so the file downloaded was
- You will be asked to where you wish to save the file. Chose a safe place and make a note of it.
- The download is about 5.4Mb and will take about an hour over a modem, but a lot less over a broadband connection.
- If you are using a download accelerator program, it will save the file to your default download directory.
- Download the following RPM files from www.rpmfind.net for the RedHat Linux 8.0 distribution or copy them from the RedHat Linux 8.0 Disc 1 CD-ROM:
These files are essential for RPM to initialise and maintain its database of installed packages.
libelf-0.8.2.i386.rpm
bzip2-libs-1.0.2-5.i386.rpm
glibc-2.2.93-5.i386.rpm
glibc-common-2.2.93-5.i386
basesystem-8.0-1.noarch.rpm
setup-2.5.20-1.noarch.rpm
filesystem-2.1.6-5.noarch.rpm- Visit ftp.rpmfind.net/linux/redhat/8.0/en/os/i386/RedHat/RPMS and click on each of the above files in turn to download them.
- You will be asked to where you wish to save the files. Chose a safe place and make a note of it.
- In total the files are 14.5Mb in size and will take over two hours over a modem, but a lot less over a broadband connection.
- If you are using a download accelerator program, it will save the files to your default download directory.
- Burn the file
rpm-4.1.i386.tar.gzand the RPM files to a CD. This page assumes that the subdirectory/appsis used for the.tar.gzand RPM files. The CD-ROM can be a multi-session disk.- Use your CD burning software to create an ISO9660 disc image with the file
rpm-4.1.i386.tar.gzand the RPM files in the/appsdirectory. - Burn the CD and verify the data stored on it.
- Use your CD burning software to create an ISO9660 disc image with the file
Booting
- Perform this stage and subsequent stages, unless otherwise stated, using your Core Linux PC.
- Boot your Core Linux PC.
- Login as
root. You will need to enter the password at the prompt.- Wait for the following text to appear:
localhost login: - Type
rootand press Enter. - The screen will display this message:
Password: - Enter the password for
rootthat you set earlier. - You will be shown a prompt that looks like this:
[~]#
- Wait for the following text to appear:
Extract the binaries
- Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under
/mnt/cdrom.- At the prompt enter:
mount /dev/hdb /mnt/cdrom - You will see the following line appear:
mount: block device /dev/hdb is write-protected, mounting read-only
- At the prompt enter:
- Change to the
/appsdirectory on the CD-R.- At the prompt enter:
cd /mnt/cdrom/apps - The prompt will change to:
[/mnt/cdrom/apps]#
- At the prompt enter:
- Copy the
rpm-4.1.i386.tar.gzfile to the root directory.- At the prompt enter:
cp rpm-4.1.i386.tar.gz / - The system will not display a message if everything is OK.
- At the prompt enter:
- Change to the root directory and extract the data from the
.tar.gzfile.- At the prompt enter
cd / - The prompt will change to:
[/]# - At the prompt enter:
tar -zxvf rpm-4.1.i386.tar.gz - A long stream of unzipping files and directories should scroll up the screen for about thirty seconds.
- At the prompt enter
Install essential RPMS
- It is important to install the RPMS in the order given here, to ensure that the package dependencies are satisfied. Details of the package dependencies for the RPMs needed to run RPM can be seen here.
- Change to the
/mnt/cdrom/appsdirectory.- At the prompt enter:
cd /mnt/cdrom/apps - The prompt will change to:
[/mnt/cdrom/apps]#
- At the prompt enter:
- Install the
setup-2.5.20-1.noarch.rpmRPM.- At the prompt enter:
rpm -ivh setup-2.5.20-1.noarch.rpm - RPM will prepare and install the files. The process will display warnings about the following files:
/etc/group created as /etc/group.rpmnew
/etc/passwd created as /etc/passwd.rpmnew
/etc/profile created as /etc/profile.rpmnew
/etc/protocols saved as /etc/protocols.rpmorig
/etc/services saved as /etc/services.rpmorig - The process finishes when the process bar reaches 100%.
- At the prompt enter:
- Install the
filesystem-2.1.6-5.noarch.rpmRPM.- At the prompt enter:
rpm -ivh filesystem-2.1.6-5.noarch.rpm - RPM will prepare and install the files. The process will display warnings about the following groups:
group lock does not exist - using root
group mail does not exist - using root - The process finishes when the process bar reaches 100%.
- At the prompt enter:
- Install the
basesystem-8.0-1.noarch.rpmRPM.- At the prompt enter:
rpm -ivh basesystem-8.0-1.noarch.rpm - RPM will prepare and install the files.
- The process finishes when the process bar reaches 100%.
- At the prompt enter:
- Install the
glibc-common-2.2.93-5.i386.rpmRPM.- At the prompt enter:
rpm -ivh glibc-common-2.2.93-5.i386.rpm - RPM will prepare and install the files.
- The process finishes when the process bar reaches 100%.
- At the prompt enter:
- Install the
glibc-2.2.93-5.i386.rpmRPM.- At the prompt enter:
rpm -ivh glibc-2.2.93-5.i386.rpm - RPM will prepare and install the files. The process will display warnings about the following files:
/etc/localtime created as /etc/localtime.rpmnew
/etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
/etc/rpc saved as /etc/rpc/rpmorig
/usr/lib/gconv/gconv-modules created as /usr/lib/gconv/gconv-modules.rpmnew - The process finishes when the process bar reaches 100% and the following line is displayed:
INIT: version 2.84 reloading
- At the prompt enter:
- Install the
bzip2-libs-1.0.2-5.i386.rpmRPM.- At the prompt enter:
rpm -ivh bzip2-libs-1.0.2-5.i386.rpm - RPM will prepare and install the files.
- The process finishes when the process bar reaches 100%.
- At the prompt enter:
- Install the
libelf-0.8.2-2.i386.rpmRPM.- At the prompt enter:
rpm -ivh libelf-0.8.2-2.i386.rpm - RPM will prepare and install the files.
- The process finishes when the process bar reaches 100%.
- At the prompt enter:
Initialise the RPM database
- Initialise the RPM database using the command
rpm --initdb- At the prompt enter:
rpm --initdb - The system will not display a message if everything is OK.
- At the prompt enter:
Checking RPM
- Check the list of installed RPMS using
rpm -qa.- At the prompt enter:
rpm -qa - The following list should appear on the screen:
filesystem-2.1.6-5
glibc-common-2.2.93-5
bzip2-libs-1.0.2-5
setup-2.5.20-1
basesystem-8.0-1
glibc-2.2.93-5
libelf-0.8.2-2
- At the prompt enter:
Using RPM
- You should now be able to use RPM for package installations and upgrades.
- Ensure that you are consistent in using RPMs for one distribution only. (This document uses RedHat Linux 8.0 RPMs.)
- You may find that some dependencies fail for software (or Core Linux packages) that are already installed, eg
ncurses.- You can choose to force installation when a dependency fails but you know that the required software is installed. The packaged software should function properly, provided it can locate the binaries. You can check the expected location of many files by searching for them at www.rpmfind.net and noting their path in the RPM file listing. You can then create a symbolic link between the actual file and the location that the Red Hat package expects.
- You can choose to install the required software from RPM which will then register its presence with the RPM database.

The text of this page is licensed under a Creative Commons License.
