Apache 2 Install and Upgrade Guide

Apache 2 upgrade – Apache 2 installation
Note: This how-to has worked fine on plesk and cpanel servers and numerous tests. I cannot guarentee it will work on yours and cannot take responsibility for the outcome. I do not recommend running this how-to on an ensim server.

Note: Text in green are commands that should be run from the root shell

FRESH INSTALL – Apache 2 installation
This part of the how-to is for a clean install only, for upgrades please scroll down.
Make a copy of your current httpd.conf incase you need to roll-back

cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf_back

Download The Apache Tar.Gz File
wget http://www.tux.org/pub/net/apache/d…d-2.0.47.tar.gz

Extract The File To Your Server
tar -xz -f httpd*

Move Into The Extracted Folder
cd httpd*

Run The Configuration File, (The bits following ./configure were custom wrote by me, you may customise these how you wish)
./configure –prefix=/usr/local/apache –with-php –with-mysql –with-susexec –enable-mods-shared=all –disable-info

Run The Make File
make

Run The Install Make File
make install

Apache 2.0 is now installed on your system
The four lines below are certain security measures that can be taken to hide the identity of apache. *These are optional*

Edit The http.conf File
pico -w /usr/local/apache/conf/httpd.conf

Disable Apache Signatures (Security)
Locate ServerSignature and change to off

Add the line below, after ServerSignature off
ServerTokens ProductOnly

Save httpd.conf
CTRL + X then “Y” then “enter” without the “‘s

Start Your New Apache
/usr/local/apache/bin/apachectl start

Your sites should now be working.
Please scroll down to the bottom of the page, after performing the commands above

Apache 2 Upgrade – Upgrading Apache
Make a copy of your current httpd.conf incase you need to roll-back
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf_back

Download The Apache Tar.Gz File
wget http://www.tux.org/pub/net/apache/d…d-2.0.47.tar.gz

Extract The File To Your Server
tar -xz -f httpd*

Move Into The Extracted Folder
cd httpd*

Run The Configuration File
./config.nice

Run The Make File
make

Run The Install Make File
make install

Start Apache
/usr/local/apache/bin/apachectl restart

All done, you should now have a successfully upgraded/installed apache configuration.

Similar Articles : How to install ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encoder, and Libog from sourceHow to install ffmpeg on CentOS or Redhat Enteprirse Linux the easy way (Using RPMs/Yum) Installing Pico on FreeBSDTurck MMCache for PHPApache 2 Install and Upgrade Guidelingerd – Setup and InstallationHowto mod_rewrite with ApacheGetting started with SSH TutorialHow to install PRM (Process Resource Monitor)How to install ionCube loaderApache Log Files ExplainedServer Loads ExplainedGuide to .htaccess tutorial and tipsOptimize and Tweak High-Traffic ServersCommon SSH Commands – Linux Shell CommandsUpgrade Guide From Red Hat 7.3 to 9.0,Changing Web Hosts? Step-By-Step GuideCustomizing PHP Safe ModeApache 2 PHP 4 and 5 (mod_php) on Linux – Apache2 PHP4 PHP5 InstallationFantastico Error: enc_restrictions.inc.php is protected by SourceGuardian and requires file ixed.lin.4.X.X.pxp, 4.3.7.pxp, 4.3.8.pxp, 4.3.9.pxp errorHow to Copy Files Across a Network/Internet in UNIX/LINUX (Redhat, Debian, FreeBSD, etc) – scp tar rsyncFixing rndc error in WHM/cPanel: rnd: connection failed: connection refusedwget – how to use tuturialcPanel Awstats Fix – Stoped Logging on single domainHow to Install Zend Optimizer/Encoder on cPanel/WHMUpgrading CentOS 3.3 to 3.4 using yumRedhat 7.3, 8.0, and 9.0 upgrade to CentOS 3 using yum (Red hat)Tutorial/HOW-TO: Kernel 2.6 Compilation with Grsecurity (grsec) – 2.6.5, 2.6.7, 2.6.8, 2.8.1, 2.6.9, 2.6.10, 2.6.11.6 Repairing a mySQL Database/Table – How to restore/repair/recoverFlood Protection/DoS/DDoS Apache 1.3 and 2.0 – mod_dosevasive (Avoiding Denial of Service Attacks)