Apache Installation From Source Code

April 30, 2008 Linux Services Config | admin @ 5:19 am

Apache Installation

Check what packages is requires for httpd with command and remove it : #rpm -q –whatrequires httpd

1. Remove any old packages if they exist and kill the processes.Apache
#rpm -e redhat-config-httpd
#rpm -e httpd
#ps aux | grep httpd
#killall httpd

2. Create a new directory for your source, move to that directory, and download your files.
#mkdir -p /usr/local/src/webserver
#cd /usr/local/src/webserver
#wget ‘apache source file from website .tar.gz’
#tar zxpf filename.tar.gz

3. Create your configure script.
#pico apache_install

4. Add the following to the script.
#cd /usr/local/src/webserver/apache_version
#make distclean

./configure –prefix=/usr/local/apache –enable-module=so –enable-rewrite=shared –enable-setenvif=shared –enable-mime=shared –enable-mime_magic=shared –enable-dir=shared –enable-auth=shared –enable-access=shared –enable-alias=shared –enable-status=shared –enable-userdir=shared –enable-vhost_alias=shared –enable-env=shared –enable-log_referer=shared –enable-log_config=shared –enable-log_agent=shared –enable-headers=shared –enable-speling=shared –enable-ssl=shared

5. Make the script executable.
#chmod +x apache_install

6. Build and install Apache.
#./apache_install
#cd /usr/local/src/webserver/apache_version*
#make
#make install

7. Link your control files.
#ln -s /www/bin/apachectl /usr/bin/apachectl
#ln -s /www/bin/apachectl /usr/sbin/apachectl

8. Start it up.
#apachectl start

Done for Apache Installation.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.