The article explain how to install Apache on a linux server.
- With root user, create a user apache with an home directory in /opt/apache :
- useradd -d /opt/apache apache
- With the apache user Get the last stable version of apache (exemple 2.2.11. Extract, configure, make and install it.
- su - apache
- tar xzvf httpd-2.2.11.tar.gz
- cd httpd-2.2.11
- ./configure --prefix=/opt/apache/v2211 --enable-ssl --enable-so
- make
- make install
- Modify httpd.conf file and replace daemon user by apache
- User apache
- Group apache
- Automatic start and stop for Linux Redhat. With root copy apachectl script in init.d directory.
- cp /opt/apache/v2211/bin/apachectl /etc/rc.d/init.d/apache
- With root user, edit it and add chkconfig and description comment line at the begining of the file.
- #!/bin/sh
- #
- # Comments to support chkconfig on RedHat Linux
- # chkconfig: 2345 64 36
- # description: Starts and stops Apache web server.
- #
- With root, chkconfig and start apache
- chkconfig --add apache
- service apache start





