Web Hosting Talk







View Full Version : HOW-TO: Install/Upgrade Apache 2.0


AexiSolutions
01-17-2004, 08:42 AM
----------------------------------------
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 blue are commands that should be run from the root shell

FRESH INSTALL

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/dist/httpd/httpd-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

------------------------------------------------------------------------------------

UPGRADE

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/dist/httpd/httpd-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.

XYPHEN
01-17-2004, 11:41 AM
Is this supported with RedHat Linux Enterprise? and cPanel 8.x?

AexiSolutions
01-17-2004, 12:26 PM
Yes, But make sure you usen the upgrade method when using cPanel, as you already have apache installed and could loose your httpd.conf

<edit>signature removed</edit>

kckclass
01-20-2004, 05:02 PM
two weeks later I am still unable to get virtual hosting working. am I brain dead?

WHEN I get this to work THEN I will write the fattest doc of all time on this subject since the apache docs are inadequate based on what I've read and experienced thus far.


Stay tuned and in the meantime, anyone want to take a shot at this problem?

AexiSolutions
01-21-2004, 04:21 AM
I dont see how this how-to is innacurate seeing how it has worked for a good few hundred people. If you want to start another thread then go ahead, but dont advertise your own how-to in mine!.

<edit>signature removed</edit>

ClearlyTech
03-13-2004, 06:07 PM
I am running Plesk 7.0 with RedHat.

I can not find the .nice file anywhere.

Any ideas?


Regards,


ClearlyTech

AexiSolutions
03-28-2004, 06:37 AM
Make a copy of your httpd.conf file, and move it somewhere. Run the fresh installation over the top of your apache installation.

Then copy the httpd.conf back, never tried this on plesk. So im not sure whether you should be upgrading or not.

<edit>signature removed</edit>

wheimeng
04-07-2004, 07:24 PM
How well does it perform compared to 1.3.x series?

justbenice
04-08-2004, 01:18 AM
After fresh install apache 2 my cpanel box still show as apache 1.3.29 . It looklike apache 2 doesnt working .

hostbox
04-10-2004, 02:44 PM
The download link doesn't work.

AexiSolutions
04-10-2004, 02:46 PM
It wont, this is a very old how-to. Were on 2.0.48 or something now

<edit>signature removed</edit>

hostbox
04-10-2004, 08:54 PM
Originally posted by AexiSolutions
It wont, this is a very old how-to. Were on 2.0.48 or something now

Do you have a link to the newest? btw; does Cpanel update it?

<edit>signature removed</edit>

AexiSolutions
04-11-2004, 05:54 AM
Francisco, If your looking for a cPanel version.

You can find a buildapache 2 in layer1.cpanel.net, but be warned this is extremely "beta & alpha" work.

<edit>signature removed</edit>

profpatsy
09-26-2004, 09:13 PM
I am upgrading from apache 2.0.40, RedHat 9, and Plesk 7.

my version of apache is not located at: /usr/local/apache
it is instead found at: /etc/httpd

What changes to the listed steps should I make when upgrading?

Thank you,

flashwebhost
02-16-2005, 05:19 PM
if you are upgrading, you don't have to run ./configure ?

Will ./config.nice work like ./configure with previous default config values ?

profpatsy: i think if u install from rpm, it will get installed on /etc/httpd by default. I also got my apache installed on /etc/httpd on a fedora box, but i removed and installed apache manually, i think httpd.conf is the only important thing when u are upgrading.

basteel
11-29-2005, 09:21 PM
I am on Plesk 7.5 Reloaded VD server, and thus far, I have been using the version of apache installed by default. Due to a bug problem with this version I really need to upgrade to the newest version of Apache. I have read through all of the installation docs at the Apache website and browsed forums in search of an answer for several weeks now, but I'm stumped.

The upgrade process seems fairly straightforward, especially since I want to leave my settings exactly the same, but I do not have a config.nice file anywhere on my server - I have searched my entire server, but this file does not exist. I don't believe that RPMs generate a config.nice file, and if this is the case, is there a way to view or discover the original configuration options?

I should also state that I am fairly clueless when it comes to Unix in general, specifically RPMs. If someone can offer me any help or direction, so that I can follow through with this upgrade, I would greatly appreciate it.

mycroftx
12-03-2005, 08:43 PM
Nice tutorial.

mrsoftware
11-03-2007, 03:04 AM
hi
i'm using redhat9 with apache2.0 pre-installed its located in etc/httpd
i tried to upgrade to apache2.2 in
/usr/local/apache2/bin [installed apache path]
i had a problem..
after with removing old apache and running command
apachectl start return an command not found! i've checked the file is found & itried to reinstall more than one..
plz can anybody help?