Software Installation Basics


Installing programs on Windows is relatively easy. If you wish to use the Winamp media player, for example, you can browse to the web site, download the installer .exe file, and install the software.

Although you might not realize it, a lot of work goes into making this seemingly simple task possible. Once the original software has been created by the programmers, it must be made into a form that you, the end user, can deal with. Before it's released for general consumption, the program has to be compiled and packaged.

Compiling is the process of turning the source code created by programmers into an actual file (or set of files) that can be used on a daily basis. On most systems, compiling source code involves a lot of number crunching. This takes time—whole days, in some cases— and this is why you cannot compile the source code every time you want to run the program.

Once the program files have been compiled, there needs to be a way they can be installed on various systems and easily transported across the Internet. Programs usually consist of many files. To make each program file individually available would mean that some are sure to get lost or corrupted, and the program wouldn't work. Therefore, the files are usually combined into a single archive file. In addition, third-party system files are added to ensure compatibility on all computers. Also, an extra program, called an installer, is added so that users can quickly get the files onto their system.

All of this means that, to be able to install a program like Winamp on Windows, all you need to do is download the installer .exe file and run it once. Then you can run Winamp. No more work is necessary.

Linux is a little more involved, largely because it never assumes that the user wants things kept simple, with limited options.

The Formats of Linux Installation Files

At the most basic level, Linux software is made available as source code. Unlike with Windows and a lot of the programs that run on it, where the source code is kept secret, the philosophical cornerstone of Linux is that source code should be shared.

Note 

Linux isn't the only operating system for which open-source programs are created and used. There are open-source projects for both Windows and Apple Macintosh, many of which are hosted at the http://sourceforge.net web site. Many other less widely used operating systems also rely on open-source software to a greater or lesser extent.

Linux software can come in several forms:

  • Source code: When you attempt to download a program, you might simply find that the source code is all that's available from the developer's web site. You can then download and compile this on your own system. This isn't very hard to do. In most cases, any difficult work is handled via scripts (small programs that run through a chain of commands and, in the case of program installation, check the system for compatibility).

  • Binary files: In other cases, you might find ready-made binary files are available. In other words, the programmer has taken his or her own source code and, as a service to users of the program, compiled it so that it's ready for use as soon as it's downloaded. Sometimes, these come with scripts to help you install them. However, in most cases, you simply put the files in a convenient location on your hard disk, and then run them from there. In other words, you install the program files yourself.

    Note 

    In both the case of source code and binary files, the files usually come in a tarball, which is a single archive file containing other files. A tarball isn't by definition compressed, but usually the bzip2 or gzip tool is used to shrink the file to ease transportation across the Internet.

  • Self-installing binaries: Some larger programs are made available as a self-installing binary. This comes very close to the way Windows works because, when it's run, a GUI-based installation wizard takes you through installation. If you download OpenOffice.org from the official web site (www.openoffice.org), for example, you'll end up with a single 80MB+ file, which you then simply run from the command line in this way.

  • RPM: In many cases, you'll find that an RPM file is available. RPM stands for Red Hat Package Manager. RPM is a form of installation file technology created by Red Hat but also used on many other distributions, including SUSE Linux. RPM files are called packages because they package all the program files together in a convenient form. The entire system of using RPM files is often called package management.

    Note 

    The open-source nature of Linux encourages the sharing of programs and technologies among companies that are otherwise direct commercial competitors. This is why the RPM system is used on SUSE Linux, Red Hat, Mandrake Linux, and others.

Package Management

RPM is an entire system for managing programs within SUSE Linux. It can install programs, upgrade them, and uninstall them. It's a little like the Windows Add/Remove Programs applet on steroids, because it's very powerful and offers a great many configuration options. It's worth noting that RPM files don't include installer programs. Instead, the RPM software on the user's computer does the actual work of installing the program.

Once RPM is set up, which is done automatically when you install SUSE Linux, it creates a database of currently installed software, along with other information such as version numbers. Whenever you attempt to install a program, it's checked against the database for compatibility. This means that an RPM system is one that's tightly controlled. For example, no program is able to get onto your system unless the system files it needs are present. Installing two versions of the same program is often prohibited, thus avoiding compatibility problems.

Note 

In some cases, it's actually desirable to have two or more versions of the same program on your system, and the RPM system is able to cope with such an occurrence, too.

RPM mostly works with precompiled binary files, although RPM source files are also sometimes available, with the idea being that you can then compile the source code yourself. Additionally, special RPM files that are designed to be compiled into binary RPMs are available, but most ordinary users don't need to worry too much about these.

RPM isn't the only prepackaged installation file used under Linux. There are many others. Table 29-1 lists some of the more popular types. As a blanket rule, an installation package created for one distribution won't be compatible with another. You can find software that aims to convert packages between distributions, but this should be seen as a last resort. The first resort it to simply get a package specifically designed for your Linux distribution.

Table 29-1. Linux Installation File Typest

File Extension

Type of Installation File

Notes

.bin or .sh

Executable program

Usually a single file, which, in the context of installation files and when executed from the command line, starts an installation routine similar to that found in Windows.

.tar.gz

Compressed tarball

Collection of files in a tar archive, which also employs gzip compression. This extension usually indicates a source code file, but sometimes binaries are distributed this way, too.

.tar.bz2

Compressed tarball

Collection of files in a tar archive, which also employs the newer and more efficient bzip2 compression (although it's otherwise similar to .tar.gz files).

.deb

Debian

Installation file designed for use with the dpkg system; used on the Debian distro and those based on it, such as Linspire.

.tgz

Slackware

Usually indicates a Slackware program archive, although traditionally a tgz archive simply indicates a tarball that has been compressed with gzip.

Software Versions

Because most Linux software is open source, a curious thing happens when it comes to software versions. Rather than there being just one "official" version of a program, such as with most Windows software (where you must download the official version of the file), many individuals and organizations take the source code, compile it, and make their own RPMs available for others to use.

For example, virtually all the software installed with SUSE Linux has been compiled by SUSE itself and made into RPM files. This can be quite different from what might be "officially" available at the programmer's web site. In some cases, the source code is tweaked, so that notorious bugs are fixed or a different look and feel applied to the software so it integrates with the distribution. Often, the configuration files are changed so that the software works in the best way for the SUSE Linux system, such as integrating with other software packages. The programmer doesn't mind when such things happen, because this way of working is part and parcel of open-source software. In fact, the programmer is likely to encourage such tweaking.

Because of this, the first place to look if you want any additional software is not the developer's web site, but the SUSE DVD-ROM or SUSE's online update service. This way, you'll get an officially sanctioned SUSE release that will fit in with the rest of your system and won't require much, if any, additional work to get it up and running. As you can see in Figure 29-1, the SUSE DVD offers many programs to install on your system.

image from book
Figure 29-1. The SUSE installation DVD is packed with prepackaged programs from SUSE.

The trouble is that while SUSE Linux's collection of software is vast and covers most popular titles, it doesn't support all the software that's available. There's simply too much for SUSE to prepackage everything, so in some cases, you might be forced to go online and see what else you can uncover. Once again, this doesn't present huge challenges, because some individuals put together their own SUSE-compatible RPMs as a public service, and the original programmers of applications often make their own SUSE-compatible RPM available.




Beginning SUSE Linux from Novice to Professional
Beginning SUSE Linux: From Novice to Professional
ISBN: 1590594584
EAN: 2147483647
Year: 2005
Pages: 293
Authors: Keir Thomas

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