Reverting apache installation?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
czamora
Forum Newbie
Posts: 8
Joined: Thu Feb 26, 2004 9:30 am

Reverting apache installation?

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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).
czamora
Forum Newbie
Posts: 8
Joined: Thu Feb 26, 2004 9:30 am

Post 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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.
Post Reply