How to Install RPMs Manually



How to Install RPMs Manually

There are generally two ways to install RPM files manually. The first method is by using a file previously downloaded to your hard drive, and the other is to install the RPM from some sort of removable media, such as a CD-ROM drive.

Using Downloaded Files

Download the RPMs (which usually have a file extension ending with .rpm) into a temporary directory, such as /tmp. The next step is to issue the rpm -Uvh command to install the package.

The -U qualifier is used for updating an RPM to the latest version, the -h qualifier gives a list of hash # characters during the installation, and the -v qualifier prints verbose status messages while the command is run. Here is an example of a typical RPM installation command to install the MySQL server package:

     [root@bigboy tmp]# rpm -Uvh mysql-server-3.23.58-9.i386.rpm
     Preparing...        ####################### [100%]
        1:mysql-server   ####################### [100%]
     [root@bigboy tmp]#

Using CD-ROMs

The underlying steps to install RPMs from CDs are similar to those used when installing from your hard disk. The main difference is that you have to access your CD-ROM drive by mounting it first to the mnt/cdrom directory. Your RPMs will then be located in the CD-ROM's Fedora/RPMs subdirectory. The procedure is as follows:

1.
Insert the CD-ROM, check the files in the /mnt/cdrom/Fedora/RPMS directory, and then install the RPM:

[root@bigboy tmp]# mount /mnt/cdrom
[root@bigboy tmp]# cd /mnt/cdrom/Fedora/RPMS
[root@bigboy RPMS]# ls filename*
filename.rpm
[root@bigboy RPMS]# rpm -Uvh filename.rpm
Preparing...         ####################### [100%]
   1: filename       ####################### [100%]
[root@bigboy RPMS]#

2.
When finished, eject the CD-ROM:

[root@bigboy RPMS]# cd /tmp
[root@bigboy tmp]# eject cdrom
[root@bigboy tmp]#

Note

You can use the rpm command's --aid switch to make it search the CD-ROM for any other RPM dependencies and install them automatically.