Installing Packages Using RPM

team bbl


RPM is a command-line utility that is included with almost all distributions. RPM maintains a database that keeps track of the packages and versions installed. If a package is not available on your distribution Web site, you can find and download it, described earlier in this chapter. After it's downloaded, you can use the rpm commands to install the software.

RPM filenames include the package name, the version, and the type of machine. For instance, a MySQL database server rpm could be named MySQL-server-4.1.7-0.i386.rpm. It's packaged for i386 machines, meaning almost any Intel or AMD computer. Download the package to the directory where RPMs are stored on your system. On Fedora, the directory is /RPMS.

To install an RPM, change to the directory where the RPM file is stored and type:

 rpm -Uvh rpmfilename 

For instance:

 rpm -Uvh MySQL-server-4.1.7-0.i386.rpm 

RPM will tell you if the package is already installed. It will check the dependencies before it installs and display an error message for any missing dependencies, such as:

 Error: Failed dependencies: dependencypackagename >= 5.3 needed by packagename 

The message means the package (packagename) is dependent on dependencypackagename, version 5.3 or newer, being installed. You need to download and install the missing package before you install your new package.

Using the -U options installs or updates, whichever is appropriate. You can use an -i option for install only. The -v options results in informative output. The -h option results in a status report, a line of ###.

You can display information about packages by typing:

 rpm -qi packagename                (for installed packages) rpm -qip packagename               (for packages not installed) 

You need to have root permissions to install packages.

    team bbl



    Spring Into Linux
    Spring Into Linux
    ISBN: 0131853546
    EAN: 2147483647
    Year: 2005
    Pages: 362
    Authors: Janet Valade

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net