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.
Reverting apache installation?
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
When you ./configure the install for the new server do it with a prefix option.
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).
Code: Select all
./configure --prefix=/usr/local/apache-newJust 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).
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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:Thanks a lot!
It makes sense. I assume the 'make install' won't overwrite any files nor configurations used by the previous install?
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.czamora wrote:how do I write a new rc.d script?