Perhaps before asking, Where can I get RPM? it might be better to see if
RPM is already installed on your system. If you have Red Hat Linux on your
system, it's there already. But be sure to check on other systems —
people are porting RPM to different systems every day, and it just might
be there waiting for you.
If this command doesn't work, it might be that your path doesn't include
the directory where RPM resides. Check the usual "binary" directories
before declaring RPM a no-show!
If you can't find RPM on your system, you'll have to grab a copy by FTP.
RPM can be found practically anywhere Red Hat Linux is available. While the
most obvious site, ftp.redhat.com
, is certainly an
option, it might not be your best choice. For one, it can be
very busy. For another, unless your link to the
Internet is near Red Hat's sprawling development campus in Durham, North
Carolina, there's probably an FTP site that is closer to you.
Here is a list of sites that mirror Red Hat's main FTP site. Be aware
that this list changes frequently, so don't be surprised if a particular
site no longer mirrors Red Hat, or has moved it from the paths listed
below:
[1]
FTP Site Directory
======== =========
sunsite.doc.ic.ac.uk /packages/linux/redhat
ftp.mpi-sb.mpg.de /pub/linux/mirror/ftp.redhat.com
ftp.jate.u-szeged.hu /pub/linux/redhat
ftp.ibp.fr /pub/linux/distributions/redhat
ftp.gwdg.de /pub/linux/install/redhat
ftp.msu.ru /pub/Linux/RedHat
ftp.sgg.ru /mirror/redhat
sunsite.mff.cuni.cz /OS/Linux/Distributions/Redhat
ftp.ton.tut.fi /pub/Linux/RedHat
ftp.funet.fi /pub/Linux/images/RedHat
sunsite.icm.edu.pl /pub/Linux/redhat
ftp.arch.pwr.proc.pl /mirror/linux/redhat
ftp.rhi.hi.is /pub/linux/RedHat
ftp.nvg.unit.no /pub/linux/redhat
ftp.pk.edu.pl /pub/linux/redhat
ftp.nluug.nl /pub/os/Linux/distr/RedHat
dutepp0.et.tudelft.nl /pub/Unix/Linux/Distributions/redhat
ftp.iol.ie /pub/Unix/Linux/distributions/RedHat
sunsite.auc.dk /pub/os/linux/redhat
ftp.tku.edu.tw /Unix/Linux/RedHat
ftp.cs.us.es /pub/Linux/redhat
ftp.is.co.za /linux/distributions/redhat
ftp.dstc.edu.au /pub/linux-redhat
ftp.lab.kdd.co.jp /OS/Linux/packages/redhat
sunsite.ust.hk /pub/Linux/distributions/redhat
ftp.sunsite.dcc.uchile.cl /pub/OS/linux/redhat
ftp.interpath.net /pub/linux/redhat
schlitz.cae.wisc.edu /pub/Linux/RedHat
ftp.wownet.net /LINUX/redhat
ftp.engr.uark.edu /pub/linux/redhat
ftp.infomagic.com /pub/mirrors/linux/RedHat
ftp.wgs.com /pub/linux/redhat
ftp.drcdrom.com /pub/linux-redhat
ftp.hkstar.com /pub/Linux/redhat
ftp.pht.com /pub/linux/redhat
linux.ucs.indiana.edu /pub/linux/redhat
ftp.uoknor.edu /linux/redhat
ftp.cc.gatech.edu /pub/linux/distributions/redhat
uiarchive.cso.uiuc.edu /pub/systems/linux/distributions/redhat
ftp.caldera.com /pub/mirrors/redhat
ftp.cms.uncwil.edu /linux/redhat
ftp.wilmington.net /linux/redhat
sunsite.unc.edu /pub/Linux/distributions/redhat
gatekeeper.dec.com /pub/linux/redhat
ftp.rge.com /pub/systems/linux/redhat
linuxwww.db.erau.edu /pub/linux/distrib/redhat
ftp.eit.com /pub/mirrors/redhat
ftp.real-time.com /pub/redhat
|
Once you find a nearby site with RPM, and have found the directory where
it's kept, you'll notice a variety of files, all starting with
"
rpm
". What are they? Which ones do you need?
Here's a representative list, along with the ways in which each file
would be used:
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 2689
drwxr-xr-x 6 root 97 2048 Jul 18 10:04 .
drwxr-xr-x 6 root 97 1024 Aug 2 10:09 ..
lrwxrwxrwx 1 root root 23 Jan 22 1996 RPM-HOWTO.ps ->
../../docs/RPM-HOWTO.ps
lrwxrwxrwx 1 root root 24 Jan 22 1996 RPM-HOWTO.txt ->
../../docs/RPM-HOWTO.txt
-rw-rw-r-- 1 root 97 59239 Jan 20 1996 paper.ps.gz
-rw-r--r-- 1 root 97 365319 Jul 18 06:05 rpm-2.2.2-1.axp.rpm
-rw-rw-r-- 1 root 97 278620 Jul 18 06:05 rpm-2.2.2-1.i386.cpio.gz
-rw-r--r-- 1 root 97 282015 Jul 18 06:05 rpm-2.2.2-1.i386.rpm
-rw-r--r-- 1 root 97 279855 Jul 18 06:05 rpm-2.2.2-1.sparc.rpm
-rw-r--r-- 1 root 97 359354 Jul 18 06:05 rpm-2.2.2-1.src.rpm
-rw-rw-r-- 1 root 97 356943 Jul 18 06:05 rpm-2.2.2.tar.gz
-rw-r--r-- 1 root 97 122157 Jul 18 06:05 rpm-devel-2.2.2-1.axp.rpm
-rw-r--r-- 1 root 97 51132 Jul 18 06:05 rpm-devel-2.2.2-1.i386.rpm
-rw-r--r-- 1 root 97 54470 Jul 18 06:05 rpm-devel-2.2.2-1.sparc.rpm
-rw-r--r-- 1 root 97 35504 May 1 04:28 rpmbuild.ps.gz
226 Transfer complete.
ftp>
|
Although the version numbers may change, the types of files kept in this
directory will not. The files
RPM-HOWTO
,
paper.ps.gz
, and
rpmbuild.ps.gz
contain a variety of information
concerning RPM. As such they are valuable sources of supplemental
information. The remaining files contain RPM, packaged for various
architectures, and in source form. We'll look at them, grouped
according to their contents. Here's the first group of files:
-rw-r--r-- 1 root 97 365319 Jul 18 06:05 rpm-2.2.2-1.axp.rpm
-rw-r--r-- 1 root 97 282015 Jul 18 06:05 rpm-2.2.2-1.i386.rpm
-rw-r--r-- 1 root 97 279855 Jul 18 06:05 rpm-2.2.2-1.sparc.rpm
|
The files above are the binary package files for RPM version 2.2.2,
release 1, on the Digital Alpha, the Intel 386/486/Pentium, and the Sun
SPARC. Note that the version number will change in time, but the other
parts of the file naming convention won't. As binary package files,
they must be installed using RPM. So if you don't have RPM yet, they
won't do you much good.
[2]
Let's look at the next file:
-rw-r--r-- 1 root 97 359354 Jul 18 06:05 rpm-2.2.2-1.src.rpm
|
This is the source package file for RPM version 2.2.2, release 1. Like
the binary packages, the source package requires RPM to install —
therefore, it cannot be used to perform an initial install of RPM.
Let's see what else there is here:
-rw-r--r-- 1 root 97 122157 Jul 18 06:05 rpm-devel-2.2.2-1.axp.rpm
-rw-r--r-- 1 root 97 51132 Jul 18 06:05 rpm-devel-2.2.2-1.i386.rpm
-rw-r--r-- 1 root 97 54470 Jul 18 06:05 rpm-devel-2.2.2-1.sparc.rpm
|
The files above are binary package files that contain the
rpm-devel
subpackage. The
rpm-devel
package contains header files and the RPM
library, and is used for developing programs that can perform
RPM-related functions. These files cannot be used to get RPM running.
That leaves two files left:
-rw-rw-r-- 1 root 97 278620 Jul 18 06:05 rpm-2.2.2-1.i386.cpio.gz
-rw-rw-r-- 1 root 97 356943 Jul 18 06:05 rpm-2.2.2.tar.gz
|
The first file is a gzipped
cpio archive of the files
comprising RPM. After uncompressing the file,
cpio
can be used to extract the files and place them on your system. Note,
however, that there is a
cpio archive for the i386
architecture only. To extract the files, issue the following command:
# zcat file.cpio.gz | (cd / ; cpio --extract)
#
|
(When actually issuing the command,
file.cpio.gz
should be
replaced with the actual name of the cpio archive.)
Note that the archive should be extracted using GNU
cpio version 2.4.1 or greater. It may also be
necessary to issue the following command prior to using RPM:
The last file, rpm-2.2.2.tar.gz
, contains the
sources for RPM. Using it, you can build RPM from scratch. This is the
most involved option, but it is the only choice for people interested in
porting RPM to a new architecture. See Chapter 8 for an example of RPM being built from the
sources.