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.
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.