Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  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 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Accessing Database Data with ADO

...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...


Windows OSs Whitepapers Replay for Exchange: Enterprise Protection and an Affordable Price

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events 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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Entrust Unified Communications Certs
Secure Exchange 2007 and save 20%. Now through Sept. 2008.

Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Need to convert between XML, DBs, EDI, and Excel? Try MapForce free!
Drag & drop to transform between popular data formats – get results instantly or generate code.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
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 Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing