March 6th, 2008
420 CHAPTER 29 INSTALLING SOFTWARE Multiverse: As with the Restricted section, here you ll find software that s released under a software license incompatible with either the word or spirit of Free Software. However, unlike the software in the Restricted section, none of the software in Multiverse is considered essential to a default Ubuntu installation. Note When you configured the Synaptic Package Manager back in Chapter 8, all the sections on all the repository servers were activated (with the exception of Backports). This means that you have access to the widest possible range of software, but it also means that some of that software might not be Free Software, or compatible with the goals of the Ubuntu project. In particular, some software in the Multiverse section is considered beyond the pale by some Linux enthusiasts. You should check any software in the Multiverse section to be sure that you re happy with its licensing terms. Not all repositories contain all the sections listed here. For example, the Updates and Security Updates repositories contain only Main and Restricted sections, because the Ubuntu project doesn t update software in the Universe and Multiverse subcategories. All of this might sound a little confusing at first. The best policy is to take a look at the Synaptic Package Manager s Software Preferences dialog box. Open the program (System . Administration . Synaptic Package Manager), click Settings . Repositories on the menu, and then take a look at what appears. The headings in the list are the repositories that you can access. Any with a check alongside them are those that APT, and therefore the Synaptic Package Manager, use. Those without a check are ignored. Underneath each repository heading are the sections on that server that you can access. For example, the first repository in the list on my test PC is CD Ubuntu 5.10 Breezy Badger (Binary). This refers to the repository contained on the installation CD. Beneath that are the sections Officially Supported (Main) and Restricted Copyright (Restricted). Note At the time of writing, the Synaptic Package Manager isn t clever enough to probe a repository to find out what sections are available. As you ll see if you select an online repository within the Software Preferences dialog box and click the Edit button, each section must be manually entered into the Sections field. The Synaptic Package Manager in Depth The Synaptic Package Manager is effectively a graphical front-end for the APT system. Later on in this chapter, we ll look at the command-line APT tools. Here, we ll take a closer look at using the Synaptic Package Manager. Searching for Software Before searching for software, it s nearly always a good idea to refresh the package databases. Just click the Reload button on the Synaptic Package Manager toolbar to grab the latest package lists from the various repositories that are in your sources.list file. Reloading can take a few
Posted in PHP5 | No Comments »
March 5th, 2008
CHAPTER 29 INSTALLING SOFTWARE Backports: A Backports server allows access to software that s intended to go into the next version of Ubuntu but which has been packaged for the current version. This software might not have been tested thoroughly and so is suitable for neophiliacs or those who absolutely need the latest version (perhaps because of a vital new feature it offers). Security Updates: Although the Updates server supplies newer versions of the main Ubuntu packages, sometimes security flaws need to be fixed almost immediately. If so, the packages concerned will be placed on this server. The Security Updates server isn t about new versions or functionality. It s about fixing security holes. Note Sometimes, you might choose to add an additional repository. For example, in Chapter 28, you added the official Wine repository so you could install the latest version of the software that lets you run Windows programs. Repository Sections In addition to the categories listed in the previous sections, the Ubuntu repositories are split into sections according to how essential the software is to a basic Ubuntu installation, or the license that the software uses. Here are the sections under which software is filed within a repository: Main: This section contains nearly all the software that s featured in a basic Ubuntu installation. As such, it s all Free Software, and every package is supported by the Ubuntu project. That means that updates are frequently provided to fix security holes, or simply to keep up with latest releases. Note Free Software refers to software that s licensed under the GNU Public License (GPL). It doesn t mean that the software is free of charge, although that s nearly always the case. Restricted: Although Ubuntu is mostly Free Software, it must include some components that have license agreements that are not compatible with the goals of Free Software. That s what you ll find in this section. Many Ubuntu installations simply won t work fully without software from the Restricted section. The chief examples are hardware drivers that are released only in binary form (that is, closed source). Universe: This section might be referred to as the rest, because it contains the majority of Free Software available at the present time. Much of it is raided from the massive Debian software library, although the packages are sometimes tweaked to work correctly under Ubuntu before being made available. Unlike Main and Restricted, the Universe section is not officially supported by the Ubuntu project, which means there s no guarantee that security flaws will be fixed. Nor is there any guarantee of updates.
Posted in PHP5 | No Comments »
March 5th, 2008
418 CHAPTER 29 INSTALLING SOFTWARE you ve downloaded or otherwise got onto your hard disk, the APT tools automatically grab and install packages from repositories. Software repositories can exist on a hard disk or a CD/DVD (the Ubuntu installation CD is a relatively small APT repository), but APT is most frequently used to access online software repositories. Back in Chapter 8, you set up online software repositories when you configured the Synaptic Package Manager, as shown in Figure 29-2. This enabled you to install software later, as you ve done throughout this book. What you actually did was to configure APT s sources.list file, found at /etc/apt/sources.list. This file contains details of where APT can find the repositories, whether they are online or anywhere else, such as the installation CD. Figure 29-2. Synaptic needs to know where the software repositories are located, regardless of whether they are on CD or online. Categories of Repositories Regardless of whether they re online or on a CD, Ubuntu repositories are strictly categorized according to the type of software they contain: Main Distribution: This repository contains the packages that are used to install Ubuntu. It s a little like the installation CD s repository, but online and containing additional packages that wouldn t fit on the CD. Updates: This repository contains newer versions of the packages in the Main Distribution repository. It s the server that s used whenever you attempt to update your system.
Posted in PHP5 | No Comments »
March 4th, 2008
CHAPTER 29 INSTALLING SOFTWARE Note One reason why Windows installation files are often so large is that they typically come with all the system files they need in case those files are not already present on the system. Windows isn t alone in this regard; installation files for the Apple Macintosh are similar. Dependency management, sometimes referred to as dependency resolution, is a key feature of the Debian package-management system. You might already have seen this in action: when you mark a program for installation in the Synaptic Package Manager, you may be informed that additional packages need to be installed. If you refuse this request, the program will be deselected. The package manager simply won t let you install a piece of software unless you let it take care of the dependencies. There s no point in letting you install the software because it probably won t work. But dependency management doesn t just mean adding in packages that a piece of software needs. It might also mean removing packages already present on your system. This might happen if other packages are incompatible with the software you want to install, something that s referred to as package conflict resolution. In addition, sometimes you might want to remove a package that other packages rely on, a situation known as reverse dependency. In such a case, the package manager either prevents you from removing that software or removes the reverse-dependency packages, too. Note You can see what dependencies a package has by right-clicking its entry in the Synaptic Package Manager, clicking Properties, and then clicking the Dependencies tab. APT and Package Repositories Installing, removing, and otherwise manipulating packages under Ubuntu is handled by the dpkg software. However, dpkgis not too capable when it comes to managing dependency resolution. It s a fairly basic program whose primary function is to handle the minutiae of software installation, such as getting programs on and off the system. Because of this, the Advanced Packaging Tool (APT) was created. If you use APT to install a piece of software, you ll be told about any dependencies it needs. Not only that, but the required packages will be automatically added to the list of software that s to be installed. Note The Synaptic Package Manager is simply a GUI front-end for the APT system. You can see this clearly when you re installing or removing a package. In the Apply Changes dialog box that appears after software has downloaded, click Terminal, and you ll see the output of various APT commands. APT is able to automatically install the extra software because it s built on the principle of software repositories. These repositories are collections of software arranged into libraries from which you, as a user, can retrieve what you want. Whereas dpkg is used to install files
Posted in PHP5 | No Comments »
March 3rd, 2008
416 CHAPTER 29 INSTALLING SOFTWARE In contrast, Debian packages (.deb files) merely contain the program files, along with a handful of configuration files to ensure the software is both installed and set up correctly. Debian package files are useless without the various pieces of software that are used to manipulate them and that constitute the Debian package-management system. This approach has a number of benefits. The package-management software builds its own database, so it knows exactly which programs are installed at any one time. It also keeps tracks of version numbers. This gives users much more control over the software on their system. It also means that if a program starts to act strangely, its configuration files can simply be refreshed using the package manager. There s no need to uninstall and then reinstall the software, as is so often the case with Windows programs. 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 package files available for others to use. For example, virtually all the software installed with Ubuntu has been compiled by Ubuntu developers. This means it can be quite different from what’s 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 properly under Ubuntu, such as integrating with other software packages. The programmer behind the software 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 Ubuntu online software repositories. This way, you ll get an officially sanctioned Ubuntu 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. Dependency Management In addition to actually installing programs, a vital component of package-management software is taking care of dependencies. Put simply, the package manager must ensure that if you install a piece of software, any software it relies on to work properly is either already present on the system or is installed at the same time. Sometimes, the software you want to install might rely on other programs on your system, but more often, the dependencies take the form of system libraries. It helps if you realize that not all packages contain software that you, as a user, will use directly. Some packages contain nothing but library files, which are shared pieces of code that are equivalent to .dll files under Windows. The key library on an Ubuntu system is the GNU C Library, without which the Linux kernel couldn t function, and this is provided by the libc6 package. But practically every program has its own needs when it comes to library files, and these requirements must be handled by the package manager.
Posted in PHP5 | No Comments »
March 3rd, 2008
CHAPTER 29 INSTALLING SOFTWARE Note As a blanket rule, an installation package created for one distribution won t be compatible with another. It s possible to use a program called alien under Ubuntu, which aims to convert packages between distributions and different package formats, but this should be done as a last resort. The first resort it to obtain a package specifically designed for your Linux distribution. Packages Explained Of all the formats for Linux installation files, packages are by far the most common and popular. This is because a well-implemented package-management system is able to install programs, upgrade them, and uninstall them, all with just a few keystrokes or clicks of the mouse. This approach vastly reduces the amount of work required to get new software onto your system. The package-management system used under Ubuntu is borrowed from the Debian Project, where it was never given a proper name. Most people refer to it simply as the Debian package- management system. Ubuntu relies on packages in order to install software, and the Ubuntu CD contains hundreds of them, as shown in Figure 29-1. Figure 9-1. There are many packages under Ubuntu. It s important to understand what a package actually is and what it contains. With Windows, an installation .exefile is effectively a piece of software combined with an archive of files. When you run the executable, it triggers a small program within the executable that then unpacks the contents of the file and installs them to the hard disk.
Posted in PHP5 | No Comments »
March 2nd, 2008
414 CHAPTER 29 INSTALLING SOFTWARE Formats of Linux Installation Files If you visit the web site of a particular Linux application, you may find that the application is available to download in a number of different formats. The program will almost certainly be available as source code the original listing that the developer created. It might also be available as a binary, or as a package file. 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. Here are the formats by which Linux software is normally distributed: Source code: Programmers write their software in various programming languages, such as C and C++, and the code that results is known as source code. To make source code usable, it must be compiled into a binary file. Because the cornerstone of the Linux philosophy is the sharing of source code, you ll almost always find the source code of a program available at the developer s web site. You can then download and compile this on your own system (or, if you re so inclined, study the source code to further your understanding). Although compiling source code isn t very hard to do, it s more convenient to download either a binary version of the program or a package. Binary files: You might find ready-made binary files are available at the developer s web site. In other words, the programmer has, as a service to users of the program, compiled the source code so that it s ready for use as soon as it s downloaded. Sometimes, binary files come with scripts to help you install them. However, in most cases, you simply place the files in a convenient location on your hard disk, and then run them from there. 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 bzip2or gzip tool is used to shrink the file to ease transportation across the Internet. Self-installing binaries: Some larger programs are made available as self-installing binary files. This comes very close to the way Windows works because, when the file is executed, a GUI-based 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 to install the program. Package files: In many cases, you ll find that a package file of the program is available. In this case, someone has compiled the software files and put them altogether in a single, easily transportable file. Ubuntu package files end with .deb file extensions, but other Linux distributions use other package formats, such as RPM (Red Hat Package Manager). The software that oversees packages is called a package manager.
Posted in PHP5 | No Comments »
March 1st, 2008
CHAPTER 29 Installing Software One of the fun aspects of running any operating system is the ability to expand it to add in new software over time to improve your workflow or just for entertainment value. Linux is blessed in this regard, because tens of thousands of software titles are available to meet just about every need. However, if you ve tracked down the ideal software title, there s just one barrier to overcome: actually installing it on your system. Installing software under Ubuntu isn t the same as with Windows. Users are afforded a lot more power over what happens to their system, but this comes at the expense of needing to take a little time to understand the terminology and techniques. In this chapter, you ll learn the basics of software installation under Ubuntu. Then we ll take a closer look at how the Synaptic Package Manager works. Next, you ll learn how to install software from the command prompt. Finally, we ll cover installing from source. 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 use. The first thing to happen is that the software is compiled. This 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. 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. This is where packaging comes into the equation. Programs usually consist of many files. To make each program file individually available would present the risk of some getting lost or corrupted, and the program wouldn t work. Therefore, the files are usually combined into a single archive file, or package. In addition, third-party system files are added to ensure compatibility on all computers and 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, you just need to download the installer .exe file and run it once. No more work is necessary. Linux is a little more involved, largely because it never assumes that users want their environment to be simplistic and with limited options. However, most Linux distributions still embrace the paradigm of packaging installation files.
Posted in PHP5 | No Comments »
February 29th, 2008
PART 7 Keeping Your System Running
Posted in PHP5 | No Comments »
February 28th, 2008
410 CHAPTER 28 RUNNING MICROSOFT OFFICE UNDER UBUNTU Summary In this chapter, we looked at how you can use the Wine project to install and run various Windows programs under Ubuntu, including Microsoft Office. Because using Wine is not without problems, we looked at how it should be configured, and then walked through the steps needed to install Microsoft Office 2000. Then you saw how to install other Windows programs. In Part 7 of the book, starting with the next chapter, we look at the techniques you need to know to keep your Ubuntu system running smoothly. Chapter 29 explains how to install Linux software.
Posted in PHP5 | No Comments »