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

Before you run the configure command, first extract the software source code by using the tar command, which is much like unzipping a .zip file by using WinZip:

# tar -xzf software.tgz

Typically, when you extract software source from a tar file, a subdirectory is created with the software name and version. You need to change into that subdirectory to actually compile the software, as follows:

# cd ./software-1.0

(For software, type the name of the software as it's shown in the directory.) Now, you're ready to run the configure command:

# ./configure

The configure script performs a series of tests against the system and decides how best to compile the software. If Autoconf determines that the source code won't compile properly against the system, the configure script will abort with an error message. The most common error is that the server doesn't have required software installed (e.g., the GNU Compiler Collection—GCC—compiler). After you install the necessary software, rerun the configure script to let it finish.

After the configure script finishes, issue the make command. The make command reads the file Makefile, which the configure script generated. This file contains a set of instructions that dictate how the source code will be compiled.

New Linux administrators often make the mistake of issuing the make command even if the configure script fails to finish. The result is that the make command either fails or compiles the source code with a default setting the administrator didn't intend to use. To prevent this situation, always use the command-line And operation, which ensures that each command runs only if the preceding command succeeded:

# ./configure && make

The make command will compile the software but won't install it. After the software is compiled, run the make install command to install the software files, including libraries and documentation, to the required location:

# ./configure && make && make install

Uninstalling source-based software. The major caveat to managing software installed by source is that you'll find it laborious if not impossible to remove the software. Most software installed by source is installed to various locations under /usr/local. It can be difficult to determine where files were installed and whether newer versions were installed over older versions. (Package managers, which I address later, effectively address the challenge of removing software.)

If you're lucky, the developer will include an uninstall option in the Makefile you use to originally install the software. The following example removes source code by using the uninstall directive with the make command:

# make uninstall

Some developers use a deinstall directive instead of an uninstall directive. If the uninstall directive fails, try

# make deinstall

If both fail, you'll probably have to delete each installed file manually or leave the software on the system. To determine which files were installed, you can examine Makefile by using a text editor, which is tedious at best.

You can track which files are installed by source or altered by a source-based installation one of two ways. The first is to use a file integrity tool, such as Tripwire's Tripwire for Servers (http://www.tripwire.com), to track file changes on the server. In any case, you should deploy file-integrity tools enterprisewide to increase your ability to monitor file systems for unauthorized changes. The second is to use a software manager, such as GNU Stow (http://www.gnu.org/software/stow) or Depot (http://asg.web.cmu.edu/depot). These tools work like package managers to monitor which files are changed by source-based installations and to help automate software removal.

Installing by Using a Package Manager
Although installing by source permits a lot of customization, package managers offer a more administrator-friendly installation method. Linux distribution vendors provide package managers that, like Windows Installer, automate most of the software installation management task.

   Previous  1  [2]  3  4  Next 


Top Viewed ArticlesView all articles
Command Prompt Tricks

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

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Events WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

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