After you unpack the binary package, there should be a file named
install-bindist.sh
in the top-level directory. To install
the Apache package, execute this script with a single parameter: the
location of the ServerRoot you want it to create. For example:
# cd /tmp # zcat apache_1.3.12-i386-whatever-linux2.tar.gz | tar xf - # cd apache_1.3.12 # ./install-bindist.sh /usr/local/web/apacheThis should install the binary and documentation as follows:
Directory tree | Location |
---|---|
|
Not installed |
|
/usr/local/web/apache |
|
/usr/local/web/apache/htdocs |
In other words, with the exception of the source code, the script
will install the Apache elements in the locations mentioned by
the assumptions at the beginning of
this article.
The source directory in the above example is still where you unpacked
it, at /tmp/apache_1.3.12/src/
.
Installing on Windows
Installing the prebuilt package on Windows is a snap. Once you’ve
downloaded it into some working directory (such as
C:TEMP
), just double-click on the package and away you
go. By default, it will use the directories mentioned in the
assumptions section of this article (that’s
why I assumed those particular locations), but you can change these
during the installation.
|
Checking the Configuration
By this point you should have an Apache binary application on your
system, just rarin’ to go and start serving files. Before you actually
turn it loose, though, you should make sure you’ve dotted all the eyes
and crossed all the teas.
Verifying the ServerName
For a Windows installation, edit the confhttpd.conf
file
under your ServerRoot directory. (Use whatever editor you like, as long
as it creates normal text files as output; Notepad works just fine.)
Look through the file for the word ‘ServerName
‘ at the
beginning of a line, and make sure that the second word on that line
is a valid hostname or IP address (such as localhost
,
foo.bar.com
, or 127.0.0.1
). If it isn’t,
Apache won’t start.
For the very best results, you should verify that the ServerName
directive in your httpd.conf
file matches your system’s
actual fully-qualified domain name. If your system is named
“www.foo.bar.com”, then that’s what you should put on the
ServerName
directive line.