Search This Blog

Tuesday, 17 January 2012

The Apache Web Server

Chapter 6: The Apache Web Server
For most people, the World Wide Web has become synonymous with the Internet. No discussion of
Internet services is complete without mention of web servers. Web servers have become an
essential part of every networked business—they are used to advertise products and offer services
to external customers as well as to coordinate and disseminate information within the organization.
Linux systems make excellent web servers. In fact, the Apache server software that comes with
Linux is the most widely used web server in the world. The daemon that Apache installs on a Linux
system to create a web server is the Hypertext Transport Protocol daemon (httpd). This chapter
describes how you can create your own web server with Apache and Linux by installing Apache and
running httpd. It provides all the information you need to understand a default Apache configuration
and to make the adjustments needed for an average server. For more advanced needs, see Linux, by Charles Aulds (Sybex, 2000).
Installing Apache
The Apache web server is part of most Linux distributions, and that includes the Red Hat Linux
distribution that we are using as an example. The Apache web server software is one of the
components that can be selected during the operating system installation. See Appendix A,
"Installing Linux," for a description of this procedure.
If Apache is not among the software you selected during the initial installation, you need to install it
now. The easiest way to install software is with a package manager. There are a couple that are
available, but the most popular (and the one used on our sample Red Hat system) is the RPM
Package Manager (RPM). In earlier chapters, we saw an example of the X−based Gnome RPM
tool. RPM can also be used from the command line to manage the installation of optional software.
Use the rpm command to install the software you need, remove software you don't want, and check
what software is installed in your system. rpm has many possible options, but most of them are for
the developers who build the packages you want to install. For a network administrator, rpm can be
reduced to three basic commands:
· rpm –i package: The –i option is used to install software.
· rpm –e package: The –e option is used to remove software.
rpm –q: The –q option is used to list a software package already installed in the computer.
Use –qa to list all installed packages.
·
To find the Apache package delivered with the distribution, mount the Linux distribution CD−ROM,
and look in the RPMS directory. Here is an example from our Red Hat system:
$ cd /mnt/cdrom/RedHat/RPMS
$ ls *apache*
apache−1.3.20−16.i386.rpm
apacheconf−0.8.1−1.noarch.rpm
This example assumes that the CD−ROM was mounted on /mnt/cdrom. It shows that two software
packages related to Apache are included in the Red Hat distribution. One is the web server
Apache Web Server Administration

No comments:

Post a Comment