Page 1 of 1

Reverting apache installation?

Posted: Mon May 29, 2006 10:36 am
by czamora
Hi,

I want to try and install the httpd web server from source on a pc which already has a running server (apache 2.0). As it is a producion server, I want to be sure I can go back to the current, working web server if something goes wrong with my new installation. So I plan to install to a differente path. But I'm not sure how I would need to procede, after having 'make install'ed the new server, in order to go back to the previous server.



Any hints would be appreciated.

Posted: Mon May 29, 2006 11:47 am
by Chris Corbyn
When you ./configure the install for the new server do it with a prefix option.

Code: Select all

./configure --prefix=/usr/local/apache-new
Now rather than the default of things going in /usr/sbin/apachectl etc they go in /usr/local/apache-new/sbin/apachectl

Just stop the current server and start the new one from the new install path (use apachectl rather than an rc.d script - or write a new rc.d script).

Posted: Mon May 29, 2006 1:54 pm
by czamora
Thanks a lot!
It makes sense. I assume the 'make install' won't overwrite any files nor configurations used by the previous install?

I think I'll try first running from apachectl, but once I'm confident it works, how do I write a new rc.d script?

Posted: Mon May 29, 2006 2:16 pm
by Chris Corbyn
czamora wrote:Thanks a lot!
It makes sense. I assume the 'make install' won't overwrite any files nor configurations used by the previous install?
Providing you specify the --prefix option no it won't go near your other install. You can have several versions installed in different places. I have two apache installations, but that's because they run on two different IP addresses with two different PHP versions (one runs PHP6 out of CVS).
czamora wrote:how do I write a new rc.d script?
Just copy one of your other ones (the apache one would be good). They'll usually be in /etc/rc<run level>.d/ or in some distro's they'll be easier to find in /etc/init.d/. Once you've copied it, just change the paths and stuff. They're pretty simple at heart, although some have loads of checking code iin there - all they do is run the command to start/stop/restart the service.