My Agile Project

  • Increase font size
  • Default font size
  • Decrease font size
Home Documentation Howto How to install apache
Documentation

How to install apache

E-mail Print PDF

The article explain how to install Apache on a linux server.

  1. With root user, create a user apache with an home directory in /opt/apache :
    1. useradd -d /opt/apache apache
     
  2. With the apache user Get the last stable version of apache (exemple 2.2.11. Extract, configure, make and install it.

    1. su - apache
    2. tar xzvf httpd-2.2.11.tar.gz
    3. cd httpd-2.2.11
    4. ./configure --prefix=/opt/apache/v2211 --enable-ssl --enable-so
    5. make
    6. make install
     

  3. Modify httpd.conf file and replace daemon user by apache
    1. User apache
    2. Group apache
     
  4. Automatic start and stop for Linux Redhat. With root copy apachectl script in init.d directory.
    1. cp /opt/apache/v2211/bin/apachectl /etc/rc.d/init.d/apache
     
  5. With root user, edit it and add chkconfig and description comment line at the begining of the file.
    1. #!/bin/sh
    2. #
    3. # Comments to support chkconfig on RedHat Linux
    4. # chkconfig: 2345 64 36
    5. # description: Starts and stops Apache web server.
    6. #
     
  6. With root, chkconfig and start apache
    1. chkconfig --add apache
    2. service apache start
     
Last Updated on Wednesday, 10 June 2009 07:53