Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


July 2006

Linux Software-Installation Basics

Learn three ways to install Linux applications
RSS
Subscribe to Windows IT Pro | See More Interoperability Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    Finding Open-Source Solutions for Linux

I'll discuss the venerable Red Hat Package Manager (RPM) because of its widespread use, because both Red Hat Enterprise Server and Novell's SUSE Linux use RPM, and because most package managers behave similarly. Keep in mind, however, that you can find other excellent package managers for Debian-based Linux (e.g., Advanced Packaging Tool—APT).

The RPM system relies on three components: an installation file known as an RPM package (in Windows, comparable entities are Windows Installer and InstallShield files); the rpm command; and the RPM database. Figure 1 shows the RPM installation process. The administrator runs the rpm command to read the RPM package. The RPM package installs files on the system and possibly modifies existing files. The rpm command then updates the RPM database with information about the installed RPM package.

When you use any package manager (e.g., RPM), you typically have three major operations available: queries, installation, and removal.

Querying packages. Windows administrators will envy one feature of most Linux package managers: the ability to query a package. That is, package managers such as RPM let you query a package or the RPM database to see which files are being installed and which scripts are being executed to install or remove the software.

Let's take as an example the rcs-5.7-860.i586.rpm RPM file, which installs several binaries and documentation files. (Software developers use the Revision Control System—RCS—to control revisions of their code.) To determine exactly which files are contained in the RPM package, you can run the following rpm command:

# rpm -qlp rcs-5.7-
 86Ø.i586.rpm
 /usr/bin/ci
 /usr/bin/co
 /usr/bin/ident
 ...

(The command wraps to several lines here because of space constraints.) Be aware that the RPM files have the format application-version.architecture.rpm. When you work with RPM files, you specify the full filename, but when you work with installed RPMs, you need to specify only application (you'll see this feature in action in subsequent examples).

Before you install RCS, you can see that the RPM will install /usr/bin/ci, /usr/bin/co, and /usr/bin/ident, along with several other files that the sample command doesn't show. You perform the query operation by specifying the -q (query), -l (list files), and -p (specify a package file to examine) options.

You can also use RPM to determine which package owns a given file. For example, you might perform a file audit to determine whether a given file is on your server. To determine which package owns a file, specify the options -q and -f (from file), as follows:

# rpm -qf /usr/bin/ci
rcs-5.7-860

Other query options are available (e.g., you can review which scripts a package will run to complete an installation). To learn more about the rpm command and various query options, read the rpm manpage.

Installing packages. With the knowledge you've gained from querying a package, you can now move forward to installing the package on the server. RPM makes this process simple—you simply specify the -i (install) option of the rpm command, as follows:

# rpm -i rcs-5.7-860.i586.rpm

If all goes well, no output occurs. (This approach is typical of Linux tools—only errors are printed.) Many administrators prefer to see the status of RPM installs, especially if the RPM is large and will take several minutes or more. To watch the progress of an installation, use the -h (hash) and -v ( verbose) options:

# rpm -ihv rcs-5.7-860.i586.rpm
   Previous  1  2  [3]  4  Next 


Top Viewed ArticlesView all articles
Microsoft, News Corp. Discuss Locking Out Google

Microsoft and Rupert Murdoch's News Corp. recently discussed an alliance that would counter Google's fledgling online news service. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Protecting Microsoft SharePoint

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Managing IT Across Multiple Locations

Cutting Costs with Client Management

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement