Obtaining Red Hat Linux Applications

Obtaining Red Hat Linux Applications

Unfortunately, you won't be able to walk into the average computer store and find a lot of Linux application programs. The best way to get Linux applications (other than those included with your Red Hat Linux system) is to download them from the Internet. They can also be ordered on CD-ROM from several Linux Web sites.

Software packages that are specifically compiled and packaged for Red Hat Linux distributions are almost always available in RPM format. So when you begin scouring the Internet for Red Hat software (as described later), look for software repositories of RPM packages built specifically for the version of Red Hat Linux or Fedora Core that you are using.

Investigating your desktop

More and more high-quality desktop applications are being packaged with Red Hat Linux, mostly as part of the GNOME or KDE desktop environments. In other words, to start finding some excellent office applications, games, multimedia players, and communications tools, you don't have to look any further than the red hat menu button on your desktop.

So before you start hunting around the Internet for the software you need, see if you can use something already installed with Red Hat Linux. The chapters that follow this one describe how to use publishing tools, play games, work with multimedia, and communicate over the Internet — all with programs that are either on the CDs that come with this book or are easily attainable. Appendix B contains a list of the software packages that are included with the complete version of Red Hat Linux that is packaged with this book.


To keep up with fixes to software packages that are part of the Red Hat Linux distribution, Red Hat offers a service for automatically downloading and installing packages. Chapter 10 shows you how to use Red Hat Network and the up2date command to update your Red Hat Linux software.

Finding applications on the Internet

If you don't already know the names of applications you want to use, there are a lot of places to look for Linux applications on the Internet. If you do know what you want, your best bet might be to head for a software repository that has packages build specifically for Red Hat Linux and Fedora.

Here are a few Web sites that you can browse for software that runs in Linux:

  • Freshmeat (www.freshmeat.net) — This site maintains a massive index of Linux software. You can do keyword searches for software projects or browse for software by category.

  • SourceForge (www.sourceforge.net) — This site hosts thousands of open source software projects. You can download software and documentation from those projects from the SourceForge site.

  • Tucows Linux site (linux.tucows.com) — Both free and commercial software for Linux is available from the Tucows Linux Web site. This site also features news articles on Linux and a listing of software downloads from the site by category.

When you purchase a commercial application, you usually get the application on CD. Installation is often simplified, and hard copy documentation is provided. Of course, when you download software, you get immediate gratification — when you purchase it, you have to wait for the package to arrive in the mail.


Sometimes software packages will be available in both libc5 and libc6 formats. This designation refers to the version of C programming-language libraries used by the application. If you have a choice, choose the libc6 packages. These are compatible with Red Hat Linux 7 and later (or any Linux kernel version 2.2 and higher). In fact, all major Linux distributions now use libc6. Better yet, look for packages designated for the specific distribution you are using (such as Fedora, Red Hat Linux 9, and so on.).

You can visit FTP sites containing RPM packages if you already have some idea of what you are looking for. You can start by reading the README and INDEX files for a particular software product to get your bearings. When you find the software you want, simply click the link to begin downloading the software to your computer. Here are a few sites that are particularly good for finding RPM packages:

  • Rpmfind (www.rpmfind.net) — Open source software that is already packaged up in Red Hat Package Management (RPM) format is available from this site. Do a keyword search from this Web site, then download the appropriate RPM from the search results.

  • FreshRPMs (www.freshrpms.net) — Another site with a good selection of high-quality RPMs.

  • Red Hat FTP Mirrors (www.redhat.com/mirrors.html) — Go to this page for a listing of FTP sites containing Red Hat software that you can download. Most of these sites also have a variety of freeware and shareware applications that are usable with Linux.

Often, you can't just download a single software package to get the software in that package to work. Many packages depend on other packages. For example, software packages for playing audio and video typically rely on other software packages for decoding different kinds of content. To deal with this issue, Red Hat Linux (Fedora Core) has included the yum package.

Downloading and installing applications with yum

The Yellow dog Updater, Modified (yum) software package lets you install and update selected software packages in RPM format from software repositories on the Web. Once you know the software package that you want, yum is probably the best way to download and install that package.

The yum package is included on the Fedora Core CDs that come with this book. To use yum to install RPM software packages, follow these basic steps:

  1. Determine the software package you want. Many popular add-on packages for Red Hat Linux are already built for specific versions Red Hat Linux (Red Hat 8, 9, Fedora, and so on) and stored in software repositories on the Internet. Lists of repositories are available from the Yum Web site at http://linux.duke.edu/projects/yum/repos.

  2. Configure yum. You need to configure the /etc/yum.conf file to point to the repository that contains the software you want. Once that is done, you can install any package that repository contains.

  3. Run yum. The yum command can be used to download and install any package from the yum repository, including any packages the one you want depends on.


    In Red Hat Linux, and presumably in the new Fedora Core, Red Hat, Inc. has gone to great lengths to ensure that software it provides is of good quality and unimpaired by legitimate patent claims. Once you download packages outside of a Red Hat distribution of Linux, you are on your own to check the quality and legality of that software.

Besides downloading and installing new software packages, yum can also be used to check for available updates and list various kinds of information about available packages.

Configuring yum (/etc/yum.conf)

The /etc/yum.conf file already comes preconfigured to be able to install Red Hat base system packages as well as updates. So, to update your system with packages that are part of the current Red Hat Linux release, you probably don't need to update yum.conf at all.

To be able to download from a repository that contains software that is not in a Red Hat Linux or Fedora distribution, you need to add that repository to the /etc/yum.conf file. Here is an example of an entry in yum.conf that points to such a repository:

name=Freshrpms packages for Red Hat Linux 9

In this example, for the entry freshrpms-rhl-9, the repository is named Freshrpms packages for Red Hat Linux 9. When you request a software package with yum, it looks in subdirectories of http://ayo.freshrpms.net/redhat/9/i386/freshrpms. If you are using Fedora Core, you can check freshrpms.net or similar sites for a repository that is specific to Fedora Core.

Running yum to download and install RPMs

With the repository identified in your yum.conf file, downloading and installing an RPM you want is as simple as running yum with the install option to request the RPM. With an active connection to the Internet, open a Terminal window as root user. Here is an example of using the yum command to download the mplayer media player:

# yum install mplayer
Gathering header information file(s) from server(s)
Server: Red Hat Linux 0.94 - i386 - Base
Server: Freshrpms packages for Red Hat Linux 9
Server: Red Hat Linux 0.94 - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
..Dependencies resolved
I will do the following:
[install: mplayer 1.0-0.1.20031002.fr.i386]
I will install/upgrade these to satisfy the dependencies:
Is this ok [y/N]: y
Getting mplayer-fonts-1.1-1.fr.noarch.rpm
Getting mplayer-1.0-0.1.20031002.fr.i386.rpm
Calculating available disk space - this could take a bit
mplayer-fonts 100 % done 2/14
mplayer 100 % done 14/14
Installed:  mplayer 1.0-0.1.20031002.fr.i386
Dep Installed: mplayer-fonts 1.1-1.fr.noarch
Transaction(s) Complete

As you can see from this example, yum checked three different software repositories: Red Hat Linux 0.94 (Base and Updates) and Freshrpms packages for Red Hat Linux 9. After listing the dependencies, yum asks if it is OK to install them. Type y and the package and all its dependencies are installed.

Using yum for listing and updating packages

Besides downloading and installing new RPM packages, yum can also be used to list available packages and update packages that are already installed. The following examples illustrate some uses of yum.

# yum check-update

The check-update option causes yum to check the software repositories for available updated versions of RPM packages you have installed. If you see a package you want to update, you can use the update option. For example, to update the nmap-frontend package, you could type the following:

# yum update nmap-frontend

If you want to see a list of all packages that are available for download from the repositories you have entered, type the following:

# yum list | less

Adding the less command to the end lets you page through the list of software (it could be long, depending on which repositories you point to). If you try to install a package and it fails with a message like "package xyzpackage needs xyzfile (not provided)" you can check for packages that include the missing file using the provides option as follows:

# yum provides missingfile

With the provides option, yum will search your repositories for whatever file you enter (instead of missingfile) and return the name of any packages it finds that include that file.

Downloading Linux software

Instead of using yum to download and install software RPMS, you can simply browse around and download Linux software from the Internet using a Web browser (such as Mozilla) or an FTP program (such as the ncftp command). The browser often enables you to view the contents of an FTP site through a Web interface (look for an index.html file in an FTP directory). An ftp command (such as ncftp) has more options, but is less intuitive. There are also GUI-based FTP applications, such as gFTP, to make FTP services easier to use. (The gFTP command is described in Chapter 9.)


The following procedures assume that you have a connection to the Internet.

Downloading with Mozilla

To download a Linux software package from the Internet using Mozilla, follow this procedure:

  1. From the desktop panel, start Mozilla.

  2. Type the name of an FTP site that has Linux software in the location box and press Enter.

  3. To move around the FTP site, click Up to Higher Level Directory to move up, or click on a directory to move down.

  4. When you find a package that you want to install, position the cursor over it, click the right mouse button, and then select Save Link Target As.

  5. In the Save As window, click the Go Up a Level button to move up, or click a directory to go down until you find where you would like to save the package.

  6. Click Save.

As the package is downloaded to your computer, a dialog box displays the progress. When the download is complete, the application is ready to be uncompressed and installed (or simply installed if you have an RPM file).

Downloading with ncFTP

If you want to use a text-based means of downloading files (instead of Mozilla), you can use any of several FTP commands that come with Red Hat Linux. One FTP client that I like to use is the ncftp command. (Other options are the ftp and lftp commands.) Here's an example of an ncftp procedure:


The sftp command is a more secure way to connect to FTP servers. However, the FTP server needs to support ssh requests for sftp to work (which they don't all do). To try an sftp command to connect to an FTP server, use a comand like the following: sftp user@ftp.example.com. Once you are connected, use commands in the procedure below to get around.

  1. From a shell or a Terminal window, type ncftp location, where location is the name of an FTP site. For example:

    $ ncftp metalab.unc.edu


    $ ncftp –u jake ftp.myveryownsrver.com

    With no user name, as in the first example, ncftp logs you in as the anonymous user.

    With a user name (for example, -u jake), you are prompted to enter the password for that user at the FTP site.

  2. When your login is accepted, you can use these commands to find the software package or document that you are looking for:

    • ls — To list the contents of the current directory.

    • cd dir — To change the current directory to the subdirectory dir. If you prefer, you can use two dots (cd ..) to go up a directory level. For example, try cd /pub/Linux/apps/doctools.

  3. Type binary (to make sure the file is downloaded as a binary file).

  4. To download a file from the current working directory, type get file where file is the application name. For example, to download the whichman application while /pub/Linux/apps/doctools is the current directory, type:

    > get whichman-2.0.tar.gz
  5. When the download is complete, type exit.


    Before you start the ncftp command, make sure that your current directory is the one in which you want to download the file. Alternatively, you could change to the directory you want by using the lcd command within ncftp. For example, to change to /tmp/abcapp, type lcd /tmp/abcapp.

Understanding package names and formats

Whenever possible, you want to install the applications you use with Red Hat Linux from software packages in RPM format (files with a .rpm suffix). However, if an RPM isn't available, the software that you want may come in other package formats.

Say you just downloaded a file from the Internet that contains lots of names, numbers, dots, gzs, and tars. What does all that stuff mean? Well, when you break it down, it's really not that complicated.

Most of the names of archive files containing Linux applications follow the GNU-style package-naming conventions. The following example illustrates the package-naming format:


These examples represent several different packages of the same software application. The name of this package is mycoolapp. Following the package name is a set of numbers that represent the version of the package. In this case, it is version 4.2.3 (the major version number is 4, followed by minor version number and patch level 2.3). After the version number is a dot, followed by some optional parts, which are followed by indications of how the file is archived and compressed.

The first line shows a package that is in Red Hat Package Manager (.rpm) format. The .i386 before the .rpm indicates that the package contains binaries that are built to run Intel i386 architecture computers (in other words, PCs). See the sidebar "Using RPMs versus Building from Source" for the pros and cons of using prebuilt RPM binary packages as opposed to compiling the program yourself.

In the next two lines of the previous example, each file contains the source code for the package. The files that make up the package were archived using the tar command (.tar) and compressed using the gzip command (.gz). You use these two commands (or just the tar command with the -z option) to expand and uncompress the packages when you are ready to install the applications.

Between the version number and the .tar.gz suffixes there can be optional tags, separated by dots, which provide specific information about the contents of the package. In particular, if the package is a binary version, this information provides details about where the binaries will run. In the third line, the optional .src tag was added because the developer wanted to differentiate between the source and binary versions of this package. In the fourth line, the .bin.SPARC indicates that it is a binary package, ready to run on a SPARC workstation. The final line indicates that it is a binary package, consisting of statically linked ELF format executables.

Here is a breakdown of the parts of a package name:

  • name — This is generally an all-lowercase string of characters that identifies the application.

  • dash (-)

  • version — This is shown as major to minor version number from left to right.

  • dot (.)

  • src or bin — This is optional, with src usually implied if no indication is given.

  • dot (.)

  • type of binary — This is optional and can include several different tags to describe the content of the binary archive. For example, i386 indicates binaries intended for Intel architectures (Pentium CPU) and SPARC indicates binaries for a Sparc CPU.

  • dot (.)

  • archive type — Often tar is used (.tar)

  • compression type — Often gzip is used (.gzip)

Using different archive and document formats

Many of the software packages that are not associated with a specific distribution (such as Red Hat or Debian) use the tar/gzip method for archiving and compressing files. However, you may notice files with different suffixes at software project sites.


Because we are using Red Hat Linux, most of the software applications we install are in Red Hat Package Management format (.rpm). Unless you want to build the software yourself — in which case you'll need the source code — RPM is the format to look for. When it is available, an RPM package from a Red Hat FTP site will provide your best chance for getting a software package that will run without modification on a Red Hat Linux system. The next best is probably freshrpms.net.

Table 5-2 describes the different file formats that you will encounter as you look for software at a Linux FTP site. Table 5-3 lists some of the common document formats that are used in distributing information in Linux.

Table 5-2: Linux Archive File Formats




Gzip file

.gz or .z

File was compressed using the GNU gzip utility. It can be uncompressed using the gzip or gunzip utilities (they are both the same).

Tar file


File was archived using the tar command. tar is used to gather multiple files into a single archive file. You can expand the archive into separate files using tar with different options.



File was compressed with the bzip2 program.


.taz or .tz

File was archived with tar and compressed with the UNIX compress command.

Linux Software Map


File contains text that describes the content of an archive.

Debian Binary Package


File is a binary package used with the Debian Linux distribution. (See descriptions of how to convert Debian to Red Hat formats later in this chapter.)

Red Hat Package Management


File is a binary package used with Red Hat Linux. Format also available to other Linux distributions.

Table 5-3: Linux Document Formats




Hypertext Markup Language

.html or .htm

File is in hypertext format for reading by a Web browser program (such as Netscape Communicator).



File is in PostScript format for outputting on a PostScript printer.



File is in SGML, a standard document format. SGML is often used to produce documents that can later be output to a variety of formats.



File is in DVI, the output format of the LaTeX text-processing tools. Convert these files to PostScript or Hewlett-Packard's PCL using the dvips and dvilj commands.

Plain text


Files without a suffix are usually plain-text files (in ASCII format).

If you are not sure what format a file is in, use the file command as follows:

$ file archive-file

This command tells you if it is a GNU tar file, RPM, gzip, or other file format. (This is a good technique if a file was renamed and lost its suffix.)

Part IV: Red Hat Linux Network and Server Setup