Let's have RPM install a package. The only thing necessary is to give
the command (rpm -i
) followed by the name of the
rpm -i eject-1.2-2.i386.rpm
If you've surfed the World Wide Web, you've no doubt noticed the way
web pages are identified:
This is called a Uniform Resource Locator, or URL. RPM can also use
URLs, although they look a little bit different. Here's one:
ftp: signifies that this URL is a
File Transfer Protocol URL. As the name implies, this type of URL is
used to move files around. The section containing
ftp.redhat.com specifies the hostname, or the
name of the system where the package file resides.
The remainder of the URL
specifies the path to the package file, followed by the package file
RPM's use of URLs gives us the ability to install a package located on
the other side of the world, with a single command:
rpm -i ftp://ftp.gnomovision.com/pub/rpms/foobar-1.0-1.i386.rpm
This command would use anonymous FTP to obtain the
version 1.0 package file and install it on
your system. Of course, anonymous FTP (no username and password
required) is not always available. Therefore, the URL may also
username and password preceding the hostname:
However, entering a password where it can be seen by anyone looking at
your screen is a bad idea. So try this format:
RPM will prompt you for your password, and you'll be in business:
rpm -i ftp://firstname.lastname@example.org/pub/rpms/apmd-2.4-1.i386.rpm
Password for email@example.com:
mypass (not echoed)
After entering a valid password, RPM installs the package.
On some systems, the FTP daemon doesn't run on the standard port 21.
Normally this is done for the sake of enhanced security. Fortunately,
there is a way to specify a non-standard
port in a URL:
This URL will direct the FTP request to port 1024. The
option is another way to specify the
port. This option is discussed later, in the section called --ftpport
<port> In FTP-based
Depending on circumstances, the following message might be rare or
very common. While performing an ordinary install, RPM prints a
rpm -i cdp-0.33-100.i386.rpm
warning: /etc/cdp-config saved as /etc/cdp-config.rpmorig
What does it mean? It has to do with RPM's handling of config files.
In the example above, RPM found a file
) that didn't belong to any
RPM-installed package. Since the
package contains a file of the same name that is to be installed in
the same directory, there is a problem.
RPM solves this the best way it can. It performs two steps:
It renames the original file to
It installs the new
cdp-config file that
came with the package.
Continuing our example, if we look in
see that this is exactly what has happened:
ls -al /etc/cdp*
-rw-r--r-- 1 root root 119 Jun 23 16:00 /etc/cdp-config
-rw-rw-r-- 1 root root 56 Jun 14 21:44 /etc/cdp-config.rpmorig
This is the best possible solution to a tricky problem.
The package is installed with a config file that is known to work.
After all, the original file may be for an older, incompatible version
of the software. However, the original file is saved so that it can
be studied by the system administrator, who can decide whether the
original file should be put back into service or not.