Chapter 1. Installing the software

Table of Contents
1.1. Installing the packages
1.2. Changes made to the system
1.3. Quick and Dirty Web Server
1.4. Apache documentation

In this chapter we will install the Apache web server package, and the packages on which it depends, and we'll briefly review the changes that doing so makes to the system. The details of this chapter are SLES-specific, but the general approach applies to any Linux system.

1.1. Installing the packages

We need to install the Apache package if we have not done so already. To do this we will have to be root. We either log in as root or su to root. If you su please be sure to use the - option to get the right environment.

$ /bin/su -
Password: password
# 

SLES's Apache package is called apache2. SLES comes with various tools which can install and update packages, including rpm, yast2, and rug. We will use rug, which can fetch packages, install them and resolve package interdependencies. We assume that the system is already configured with details of a suitable installation source.

# rug install apache2
Resolving Dependencies...

The following packages will be installed:
  apache2 2.2.3-16.2 (SLES10-Updates)
  apache2-prefork 2.2.3-16.2 (SLES10-Updates)
    apache2-prefork-2.2.3-16.2.i586[SLES10-Updates] needed by 
apache2-2.2.3-16.2.i586[SLES10-Updates]
    
  libapr1 1.2.2-13.2 (http://bes.csi.cam.ac.uk/install/SLES10-i386?ali...
    libapr1-1.2.2-13.2.i586[SUSE-Linux-Enterprise-Server-i386-10-0-200...
    
  libapr-util1 1.2.2-13.2 (http://bes.csi.cam.ac.uk/install/SLES10-i38...
    libapr-util1-1.2.2-13.2.i586[SUSE-Linux-Enterprise-Server-i386-10-...

Proceed with transaction? (y/N) y

Downloading Packages...

Transaction...

Transaction Finished

What happened here? First rug selected the most recent version of the apache2 package, and then it identified additional packages that will be needed by the one we explicitly asked it to install, so-called 'dependencies'. One of these, apache2-prefork, provides one particular flavour of the actual web server. Following confirmation from us, rug then downloaded and installed .

If we had access to the necessary package files, perhaps from a shared server or because we had already downloaded them, then we could have simply installed them using the rpm. However if we did that we'd have been responsible for selecting the most recent version of each package, and also for identifying and resolving the dependency issues.