Installing Apache on Linux (and nix) Systems

Installing Apache on Linux (and *nix) Systems

Installing the Apache Web server on a Linux box is much the same as installing Perl. But things can be a little trickier, and you don't have the nice GUI to work with. As far as I am concerned, this is just as well-GUIs just hide all of the details of what is really going on, and I prefer to see what is happening to my system rather than stare at a progress bar telling me to 'Please wait.'

The first step is to obtain the software.

  1. To get the latest version of Apache, head over to http://www.apache.org and click the "from here" link under the "Download!" section of the page. This takes you to a directory listing; click the "httpd" directory to get a listing of the Web server downloads. Inside of this subdirectory, find the release you are looking for. The current stable release is version 1.3.23-so I'll choose apache_1.3.23.tar.gz as the file to download.

  2. Move the file to a directory where you can unpack it, like so:

    mkdir temp mv apache_1.3.23.tar.gz temp cd temp tar -xzvf apache_1.3.23.tar.gz

    The following command creates a directory named apache_1.3.23:

    cd apache_1.3.23
  3. To configure Apache, enter the command ./configure followed by the prefix where you want it to be installed. For example:

    ./configure --prefix=/usr/local/apache

Once that has completed, you need to build the source.

  1. Build the distribution.

    make
  2. Then, as root, install the Apache Web server:

    make install

You have now installed the Apache Web server, but you need to do a few more things to get it working properly.

Next, you must make sure that your configuration file, httpd.conf, contains the proper directives so that you can run CGI programs.

  1. Look through the file; it will be at /usr/local/apache/conf/httpd.conf if you have installed using the preceding prefix.

    Look for:

    ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/

    And also for:

    AddHandler cgi-script .cgi

    If you want to have CGI programs outside of a ScriptAlias directory, this is optional.

  2. Finally, you need to check the <Directory> directive. Look for:

    <Directory /usr/local/apache/cgi-bin>     AllowOverride None     Options None     Order allow,deny     Allow from all </Directory>

    Make sure you change the directory to match where you have installed Apache.

  3. To start the Web server, go to the /usr/local/apache/bin subdirectory and type:

    ./apachectl start

You should now be up and running!



Perl Database Programming
Perl Database Programming
ISBN: 0764549561
EAN: 2147483647
Year: 2001
Pages: 175

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net