You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by ryan punt <rp...@good-sam.com> on 2006/03/13 15:29:37 UTC

[users@httpd] Re: [SPAM] Re: [users@httpd] Two versions of Apache

I don't have a Fedora install available right now, but I know that RedHat includes a util called chkconfig. This program allows you to deactivate daemons while leaving the init-script in place.

For example, if you wanted to leave the original version of apache installed, but didn't want it to start on boot, you could run the following:

# chkconfig --del apache

This will remove an run-level-specific links to /etc/rc.d/init.d/apache, which will keep the script from being executed on boot or halt. However, since the actual script is left in /etc/rc.d/init.d, it can be reactivated later by running:

# chkconfig --add apache

If you installed apache2 from a Fedora repository, I'd be very surprised if the init-script wasn't written to handle chkconfig, so the same rules should apply; if you run:

# chkconfig --add apache2

it should add the run-level-links for apache2 and apache2 should then start on boot. [replace apache2 with the name if your actual init script]

I'm pretty sure that SuSE also includes chkconfig, and Debian has update-rc.d. They're great tools, I'd definitely look into using them.

~rlp

>>> httpd2@karsites.net 3/13/2006 5:01 AM >>>

You might like to make a copy of your original boot script 
that is used to start apache. Then you can edit that, as 
already mentioned, and then uninstall the default apache 
that comes with your distro.

(It is also a good idea save/backup any altered system 
scripts like this in a safe place, so you can reinstall 
them if you do an OS reinstall or upgrade later.)

If you are not using the default apache, and it is still 
installed, you will find it is updated when you do a 
security update, which is a waste of time.

The same applies to other services that you install 
along side default installations, such as php or mysql.

An alternative way to start apache would be to add something 
like this to your boot.local script, but you will not get 
the nice information messages to say apache, mysql or 
whatever has started up at boot time.

Don't forget to add entries to your halt.local script to 
shut down the services that you start from boot.local.

contents of my boot.local script:

#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink <we...@suse.de>, 1996
#         Burchard Steinbild <fe...@suse.de>, 1996
#
# /etc/init.d/boot.local
#
# script with local commands to be executed from init on system startup
#
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.

# start the MySQL 5.0.18 server
/usr/local/mysql-5.0.18/bin/start-mysql-5.0.18

# start apache 2.2.0 web server
/usr/local/apache-2.2.0/bin/apachectl start


contents of halt.local:

#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
#
# Author: Werner Fink <we...@suse.de>, 1998
#         Burchard Steinbild, 1998
#
# /etc/init.d/halt.local
#
# script with local commands to be executed from init on system shutdown
#
# Here you should add things, that should happen directly before shuting
# down.

# stop the apache 2.2.0 web server
/usr/local/apache-2.2.0/bin/apachectl stop

# stop the MySQL 5.0.18 database server
/usr/local/mysql-5.0.18/bin/stop-mysql-5.0.18

You also could post your original apache boot script to the 
list, for us to tell you where it needs editing, if you 
prefer to use that method.

HTH

Keith


In theory, theory and practice are the same;
In practice they are not. 

On Mon, 13 Mar 2006, Roger wrote:

> To: users@httpd.apache.org, gfrank@neoservers.com 
> From: Roger <ro...@mirasol.co.za>
> Subject: [SPAM] Re: [users@httpd] Two versions of Apache
> 
> Thanks again, but what do i edit in that httpd file
> 
> On Mon, 2006-03-13 at 02:39 -0600, Graham Frank wrote:
> 
> > Check for the file /etc/rc.d./init.d/httpd
> > 
> > If it exists, then go ahead and edit it with any text editor and change the httpd path.  That way, it will start your custom apache instead of the one which came with your os.
> > 
> > -Graham
> > 
> > -----Original Message-----
> > 
> > From:  Roger <ro...@mirasol.co.za>
> > Subj:  [users@httpd] Two versions of Apache
> > Date:  Mon Mar 13, 2006 2:33 am
> > Size:  670 bytes
> > To:  users@httpd.apache.org 
> > 
> >        I installed Apache 2 on Fedora this Saturday.I have a problem, whenever i restart my machine, it starts up the default httpd service that comes with Fedora, meaning i have two versions running and i have to shut down the default httpd then go to 
> >  
> >  /usr/local/apache2/bin/apachectl start.
> >  
> >  I find this very cumbersome to do, how can i remove the default httpd so that whenever i start or run Linux, it uses the newer version!    
> > 
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org 
> > For additional commands, e-mail: users-help@httpd.apache.org 
> > 
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
   "   from the digest: users-digest-unsubscribe@httpd.apache.org 
For additional commands, e-mail: users-help@httpd.apache.org 

Re: [users@httpd] Two versions of Apache

Posted by ht...@karsites.net.
SuSE has a runlevel editor, where you use a GUI to edit 
which services are activated or not.

This also seems to pick up any scripts found in 
/etc/init.d/, as some home made scripts of mine appeared in 
the RLE, which was unexpected.

I tried deactivating the default RPM for Apache in the RLE, 
and this did the job. Only thing was, when I did an online 
update, because the Apache RPM was still on the system, I 
still found it was being updated, even though I was not 
going to use that any more. So, I just uninstalled it via 
YaST, which is the system administration tool in SuSE.

BTWFYI - SuSE uses the Redhat Package Manager from RedHat 
software from within YaST, as it's package management tool.

Keith

In theory, theory and practice are the same;
In practice they are not. 

On Mon, 13 Mar 2006, ryan punt wrote:

> To: users@httpd.apache.org
> From: ryan punt <rp...@good-sam.com>
> Subject: [users@httpd] Re: [SPAM] Re: [users@httpd] Two versions of Apache
> 
> I don't have a Fedora install available right now, but I know that RedHat includes a util called chkconfig. This program allows you to deactivate daemons while leaving the init-script in place.
> 
> For example, if you wanted to leave the original version of apache installed, but didn't want it to start on boot, you could run the following:
> 
> # chkconfig --del apache
> 
> This will remove an run-level-specific links to /etc/rc.d/init.d/apache, which will keep the script from being executed on boot or halt. However, since the actual script is left in /etc/rc.d/init.d, it can be reactivated later by running:
> 
> # chkconfig --add apache
> 
> If you installed apache2 from a Fedora repository, I'd be very surprised if the init-script wasn't written to handle chkconfig, so the same rules should apply; if you run:
> 
> # chkconfig --add apache2
> 
> it should add the run-level-links for apache2 and apache2 should then start on boot. [replace apache2 with the name if your actual init script]
> 
> I'm pretty sure that SuSE also includes chkconfig, and Debian has update-rc.d. They're great tools, I'd definitely look into using them.
> 
> ~rlp
> 
> >>> httpd2@karsites.net 3/13/2006 5:01 AM >>>
> 
> You might like to make a copy of your original boot script 
> that is used to start apache. Then you can edit that, as 
> already mentioned, and then uninstall the default apache 
> that comes with your distro.
> 
> (It is also a good idea save/backup any altered system 
> scripts like this in a safe place, so you can reinstall 
> them if you do an OS reinstall or upgrade later.)
> 
> If you are not using the default apache, and it is still 
> installed, you will find it is updated when you do a 
> security update, which is a waste of time.
> 
> The same applies to other services that you install 
> along side default installations, such as php or mysql.
> 
> An alternative way to start apache would be to add something 
> like this to your boot.local script, but you will not get 
> the nice information messages to say apache, mysql or 
> whatever has started up at boot time.
> 
> Don't forget to add entries to your halt.local script to 
> shut down the services that you start from boot.local.
> 
> contents of my boot.local script:
> 
> #! /bin/sh
> #
> # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
> #
> # Author: Werner Fink <we...@suse.de>, 1996
> #         Burchard Steinbild <fe...@suse.de>, 1996
> #
> # /etc/init.d/boot.local
> #
> # script with local commands to be executed from init on system startup
> #
> # Here you should add things, that should happen directly after booting
> # before we're going to the first run level.
> 
> # start the MySQL 5.0.18 server
> /usr/local/mysql-5.0.18/bin/start-mysql-5.0.18
> 
> # start apache 2.2.0 web server
> /usr/local/apache-2.2.0/bin/apachectl start
> 
> 
> contents of halt.local:
> 
> #! /bin/sh
> #
> # Copyright (c) 2002 SuSE Linux AG Nuernberg, Germany.  All rights reserved.
> #
> # Author: Werner Fink <we...@suse.de>, 1998
> #         Burchard Steinbild, 1998
> #
> # /etc/init.d/halt.local
> #
> # script with local commands to be executed from init on system shutdown
> #
> # Here you should add things, that should happen directly before shuting
> # down.
> 
> # stop the apache 2.2.0 web server
> /usr/local/apache-2.2.0/bin/apachectl stop
> 
> # stop the MySQL 5.0.18 database server
> /usr/local/mysql-5.0.18/bin/stop-mysql-5.0.18
> 
> You also could post your original apache boot script to the 
> list, for us to tell you where it needs editing, if you 
> prefer to use that method.
> 
> HTH
> 
> Keith
> 
> 
> In theory, theory and practice are the same;
> In practice they are not. 
> 
> On Mon, 13 Mar 2006, Roger wrote:
> 
> > To: users@httpd.apache.org, gfrank@neoservers.com 
> > From: Roger <ro...@mirasol.co.za>
> > Subject: [SPAM] Re: [users@httpd] Two versions of Apache
> > 
> > Thanks again, but what do i edit in that httpd file
> > 
> > On Mon, 2006-03-13 at 02:39 -0600, Graham Frank wrote:
> > 
> > > Check for the file /etc/rc.d./init.d/httpd
> > > 
> > > If it exists, then go ahead and edit it with any text editor and change the httpd path.  That way, it will start your custom apache instead of the one which came with your os.
> > > 
> > > -Graham
> > > 
> > > -----Original Message-----
> > > 
> > > From:  Roger <ro...@mirasol.co.za>
> > > Subj:  [users@httpd] Two versions of Apache
> > > Date:  Mon Mar 13, 2006 2:33 am
> > > Size:  670 bytes
> > > To:  users@httpd.apache.org 
> > > 
> > >        I installed Apache 2 on Fedora this Saturday.I have a problem, whenever i restart my machine, it starts up the default httpd service that comes with Fedora, meaning i have two versions running and i have to shut down the default httpd then go to 
> > >  
> > >  /usr/local/apache2/bin/apachectl start.
> > >  
> > >  I find this very cumbersome to do, how can i remove the default httpd so that whenever i start or run Linux, it uses the newer version!    
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org 
> > > For additional commands, e-mail: users-help@httpd.apache.org 
> > > 
> > 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org 
> For additional commands, e-mail: users-help@httpd.apache.org 
> 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org