dcsimg

Apache Guide: The Newbie's Guide to Installing Apache Page 2

By Rich Bowen (Send Email)
Posted Jul 3, 2000


You'll find that the Apache documentation is very complete, and very helpful, if you know where to look. Following the above instructions will give you a usable installation of Apache to get you started, and this is probably the way that you want to install it the first time.

For example, if you wanted to install Apache in /home/httpd (not that you would, but if you did ...) you would type:

        ./configure --prefix=/home/httpd
        make
        make install
        /home/httpd/bin/apachectl start

configure will tell you that it is creating some makefiles. Both make and make install produce a great deal of output, describing what they are doing to build Apache. And at the end of the process, you will see a short message from the Apache Software Foundation thanking you for using Apache server.


Longer form - using configure

The command above - configure - takes a look at your system, and figures out how things are set up, so that it knows how the compilation process will need to be done. This ranges from figuring out how long a long integer is on your particular system to determining what compiler you are using.

As you saw in the above example, you can pass certain parameters to configure to influence the way that it will install Apache. For a complete list of what parameters you can specify, you should again see the file INSTALL, located in the top directory of wherever you unpacked the tar file. For a more indepth discussion of using configure, see the file README.configure


Enabling DSO support

One configure trick that is worth mentioning specially is enabling DSO support. DSOs (Dynamic Shared Objects) are a way to compile Apache modules (and other things) so that they can be loaded into the server at run time, rather than building them directly into the Apache executable. This lets you decide to load, or not load, particular modules, without having to recompile Apache.

To build Apache with DSO support, and make most of the available Apache modules ready to use, type the following command:


        ./configure --prefix=/path/to/apache                 --enable-module=most                 --enable-shared=max

(Note: You can type that all on one line. The \ indicates that the command line is continued on the next line. This syntax is supported on most Unix operating systems.)

In this case ''most'' means all of the modules that are shipped with Apache, leaving out those that are considered experimental, or which don't run on all platforms.

You will then need to enable, or disable, various module, by uncommenting, or commenting out, LoadModule lines in httpd.conf - the main Apache configuration file.


mod_perl, mod_php, and other stuff

README.configure contains instructions for configuring a lot of other useful things too, such as mod_perl and mod_php. These are modules that are not included in the Apache distribution, and so you will need to download separately.


Really long form - using Configure

Page 2 of 3


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.