Building and Installing Apache 2.0 Page 3
Download the authoritative guide: Data Center Guide: Optimizing Your Data Center Strategy
Download the authoritative guide: Cloud Computing: Using the Cloud for Competitive Advantage
user@host> ./configure [--prefix install-dir] [--with-mpm=MPM]
The first step,
./buildconf, creates the
./configure script. This script finds all of the config.m4 files
in the Apache tree, and creates the
Buildconf also runs Autoconf and Autoheader on the
configure.in file. Autoconf creates the
script, and Autoheader generates the
This file is used in the next step to help configure Apache 2.0. After creating
the top-level configure script,
Buildconf switches to the APR
subdirectory, and runs its
Buildconf script. This script runs
Autoconf and Autoheader on APR's
configure.in file. This creates a
./configure and a new file,
src/apr/include/apr_private.h.in. These files are also used in
configuring Apache. Finally, APR's
buildconf script switches to
src/lib/apr/shmem/unix/mm subdirectory and runs autoconf in
this directory. This creates MM's
./configure script, which is the
final subconfigure script used configuring the Apache server.
The second step actually configures the server. I have included the most
common arguments to
./configure, but there are many more. To
determine what all of the arguments are, run
This will provide a list of all of the arguments and a little documentation
about each argument. There is not much more documentation, but it will be
written before Apache 2.0 is finally released. The two arguments detailed above
determine where Apache will be installed and which MPM will be compiled. There
is one other argument that is very useful for developers,
--with-maintainer-mode". This argument configures
Apache to use very restrictive settings when compiling Apache.
To build Apache, run
make;make install. This is self
explanatory. The first step builds Apache, and the second installs it into the
directory specified in the configure command.
Configuring Apache 2.0
When Apache is installed it is a full installation. This includes a sample
configuration file and an index.html file in multiple languages. To test that
everything is working, we can now start Apache 2.0 and request a page. The
default configuration uses port 80, which means you can only start Apache if
you are logged in as root and you have no other web server running on this
machine. To change this, change to the directory where Apache 2.0 has been
installed and edit the file
conf/httpd.conf using your favorite
editor. Search for the string:
Change the default Port to some value higher than 1024. Save the file and exit the editor. Next run:
This is slightly different than Apache 1.3. In Apache 1.3 a script called
apachectl was automatically installted. This script was able to
start, stop, and restart the server. This script has not been written yet for
Apache 2.0, so we have to start and stop the server manually. The
apachectl script will be included with the final Apache 2.0, and
may be included with the next alpha or one of the beta versions.
The server should have been started now. You can determine this by checking
logs/httpd.pid file. If this file is there, the server has
been started. If it isn't there, check the error log,
logs/error_log. If there is a problem, this file is your best
chance to diagnose the problem.
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...