Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to restart httpd, inetd, atalkd?

6 views
Skip to first unread message

Campbell-Lange

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

Hi to all.
I'd be grateful for help on how to restart httpd, inetd and atalkd
(particularly the latter) after making changes. The machine is used a
lot and I can't afford to keep on restarting it!
Please email me directly too - I receive the digest.
Thanks
Rory

--
Rory Campbell-Lange + The Campbell-Lange Workshop
London


** Sent via the linuxppc-user mail list. See http://lists.linuxppc.org/


rbo...@grn.georet.net

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

As root, run

/etc/rc.d/init.d/inet restart

C. Michael McCallum

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

* rbo...@grn.georet.net (rbo...@grn.georet.net) [000821 13:44]:

>
> As root, run
>
> /etc/rc.d/init.d/inet restart
>
>

If this is a "how do I restart them each boot" kind of thing:

go to /etc/rc.d/ . There you will find "run-level" directories (rc5.d is
for starting/stopping r-l 5 things). 'rc0.d/K15httpd', for example shuts
down httpd at RL 0. 'rc5.d/S85httpd' starts httpd at RL 5. Find the ones
that have httpd, inetd and atalkd. If you see one is a "K", and you want
the daemon to run at that RL, change it to a "S". If neither exists, copy
the corresponding script from /etc/rc.d/init.d to /etc/rc.d/rcX.d, or link
them.

Lets say I wanted to prevent httpd from starting at all. Currently, I have
(in /etc/rc.d):
./init.d/httpd
./rc0.d/K15httpd
./rc1.d/K15httpd
./rc2.d/K15httpd
./rc3.d/S85httpd
./rc4.d/S85httpd
./rc5.d/S85httpd
./rc6.d/K15httpd


I could mv rc5.d/S85httpd to rc5.d/K15httpd (and the rc3.d and rc4.d ones
also). Or I could just delete the init.d/httpd (though then you'd have
to re-install httpd if you ever wanted it back).

I'm sure this isn't 100% correct, but it works for me.

Cheers,

Mike


> Campbell-Lange wrote:
> >
> > Hi to all.
> > I'd be grateful for help on how to restart httpd, inetd and atalkd
> > (particularly the latter) after making changes. The machine is used a
> > lot and I can't afford to keep on restarting it!
> > Please email me directly too - I receive the digest.
> > Thanks
> > Rory
> >
> > --
> > Rory Campbell-Lange + The Campbell-Lange Workshop
> > London
> >
>

--
C. Michael McCallum | Elegant does not mean correct;
Associate Professor | it may simply mean that the
Chemistry, UOP | result is simple *and* wrong.
mmcc...@uop.edu | (209) 946-2393 | fax (209) 946-2607

Patrice LaFlamme

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

First, to simply restart a service:

/etc/rc.d/init/httpd restart

(and replace httpd with inet or atalkd for the other services...)

now, instead of fiddling with links in the /etc/rc.d/<runlevel>.d
directory tree, you can use the chkconfig utility.

Let's say you want to have httpd start every time you boot, in runlevels
3,4 and 5:

chkconfig --level 345 httpd on

Let's also say you want to disable atalkd in runlevel 4

chkconfig --level 4 atalkd off

(more options available... read the manpage :) but I rarely use the other
ones)

and so on. Much cleaner that manually setting the links, since chkconfig
will determine exactly what the link's name should be.

(I'm not sure if chkconfig is on LinuxPPC, but it's there on RedHat Linux
for x86 and ARM)

Cheers,
Patrix.

--
I live the way I type; fast, with a lot of mistakes

Keary Suska

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

Do that, and all of your network services will go down. Not only that it
will in no way restart the services you desire except for maybe inetd, but
see above point#1.

If you installed via RPM's you can use the SYS V rc (run control) scripts
found under /etc/rc.d/init.d/. Typically the control script has the same
name as the protocol (but there is no hard and fast rule, at least not one
that is recognized ;-). For httpd it would be "/etc/rc.d/init.d/http" (or
you could use apachectl in the bin directory of the Apache install
directory, usually /usr/local/apache). For atalkd it is
"/etc/rc.d/init.d/atalk". Simply pass the restart parameter to the script to
restart: "/etc/rc.d/init.d/atalk restart". If the script doesn't understand
restart, you can use a "stop" then "start". Both of the above should
understand "restart."

For inetd, it is more efficient (and prone to less headaches) to send a HUP
signal to the inetd process: "kill -HUP XXX" where XXX is the process id of
inetd as reported by ps. The inet script will restart the entire network
services system, which you don't need to do to simply restart inetd.

-K

"Do not meddle in the affairs of dragons, because you are crunchy and taste
good with ketchup."


> From: rbo...@grn.georet.net
> Date: Mon, 21 Aug 2000 16:34:07 -0400
> To: Campbell-Lange <campbel...@easynet.co.uk>
> Cc: linuxp...@lists.linuxppc.org
> Subject: Re: How to restart httpd, inetd, atalkd?
>
>
> As root, run
>
> /etc/rc.d/init.d/inet restart
>
>

> Campbell-Lange wrote:
>>
>> I'd be grateful for help on how to restart httpd, inetd and atalkd
>> (particularly the latter) after making changes. The machine is used a
>> lot and I can't afford to keep on restarting it!

** Sent via the linuxppc-user mail list. See http://lists.linuxppc.org/


C. Michael McCallum

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

* Ramprasad Rao (ra...@oddjob.uchicago.edu) [000821 14:23]:
>
> I've used the 'chkconfig' program to do this and it has worked for me
> successfully.
>
> # /sbin/chkconfig --list httpd
> httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

duh. I've actually used this once, and promptly forgot about it.
This is obviously the better method, so you don't have to clean up
after any mistakes!

Thanks,

Mike

--
C. Michael McCallum | Elegant does not mean correct;
Associate Professor | it may simply mean that the
Chemistry, UOP | result is simple *and* wrong.
mmcc...@uop.edu | (209) 946-2393 | fax (209) 946-2607

** Sent via the linuxppc-user mail list. See http://lists.linuxppc.org/


Ramprasad Rao

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

I've used the 'chkconfig' program to do this and it has worked for me
successfully.

# /sbin/chkconfig --list httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

To turn on httpd do
# /sbin/chkconfig httpd on
# /sbin/chkconfig --list httpd
httpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off

This of course will start it up the next time that run level comes around.
See 'man chkconfig' for more useful info.

Ramprasad

On Mon, 21 Aug 2000, C. Michael McCallum wrote:

> > As root, run
> >
> > /etc/rc.d/init.d/inet restart
> >
> >
>

> If this is a "how do I restart them each boot" kind of thing:
>
> go to /etc/rc.d/ . There you will find "run-level" directories (rc5.d is
> for starting/stopping r-l 5 things). 'rc0.d/K15httpd', for example shuts
> down httpd at RL 0. 'rc5.d/S85httpd' starts httpd at RL 5. Find the ones
> that have httpd, inetd and atalkd. If you see one is a "K", and you want
> the daemon to run at that RL, change it to a "S". If neither exists, copy
> the corresponding script from /etc/rc.d/init.d to /etc/rc.d/rcX.d, or link
> them.
>
> Lets say I wanted to prevent httpd from starting at all. Currently, I have
> (in /etc/rc.d):
> ./init.d/httpd
> ./rc0.d/K15httpd
> ./rc1.d/K15httpd
> ./rc2.d/K15httpd
> ./rc3.d/S85httpd
> ./rc4.d/S85httpd
> ./rc5.d/S85httpd
> ./rc6.d/K15httpd
>
>
> I could mv rc5.d/S85httpd to rc5.d/K15httpd (and the rc3.d and rc4.d ones
> also). Or I could just delete the init.d/httpd (though then you'd have
> to re-install httpd if you ever wanted it back).
>
> I'm sure this isn't 100% correct, but it works for me.
>
> Cheers,
>
> Mike
>
>

> > Campbell-Lange wrote:
> > >
> > > Hi to all.

> > > I'd be grateful for help on how to restart httpd, inetd and atalkd
> > > (particularly the latter) after making changes. The machine is used a
> > > lot and I can't afford to keep on restarting it!

> > > Please email me directly too - I receive the digest.
> > > Thanks
> > > Rory
> > >
> > > --
> > > Rory Campbell-Lange + The Campbell-Lange Workshop
> > > London
> > >
> >
>

Tobias Gogolin

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

Excuse me but all of these options are only cool for scripting these days
...

Better look for a program called 'ksysv'

It is the kind of tool that you wish was available for all configuration
needs

I suspect it must be part of some KDE development efforts
I found it with my mandrake 7.1 installation
And I wouldnt want to have to deal with any manual keyboard way anymore !
If it is not allready part of the LinuxPPC installation Please see if it
compiles (it should) and make sure to include it on future versons !!!

ksysv makes the setup and restarting of demons a drag and drop and click and
done kind of thing YEHA :)

cheers

Tobias


----- Original Message -----
From: "Patrice LaFlamme" <e...@patrix.org>
To: "C. Michael McCallum" <mmcc...@uop.edu>
Cc: "Linuxppc User List" <linuxp...@lists.linuxppc.org>
Sent: Monday, August 21, 2000 13:58
Subject: Re: How to restart httpd, inetd, atalkd?


>


> First, to simply restart a service:
>
> /etc/rc.d/init/httpd restart
>
> (and replace httpd with inet or atalkd for the other services...)
>
> now, instead of fiddling with links in the /etc/rc.d/<runlevel>.d
> directory tree, you can use the chkconfig utility.
>
> Let's say you want to have httpd start every time you boot, in runlevels
> 3,4 and 5:
>
> chkconfig --level 345 httpd on
>
> Let's also say you want to disable atalkd in runlevel 4
>
> chkconfig --level 4 atalkd off
>
> (more options available... read the manpage :) but I rarely use the other
> ones)
>
> and so on. Much cleaner that manually setting the links, since chkconfig
> will determine exactly what the link's name should be.
>
> (I'm not sure if chkconfig is on LinuxPPC, but it's there on RedHat Linux
> for x86 and ARM)
>
> Cheers,
> Patrix.
>
> --
> I live the way I type; fast, with a lot of mistakes
>

Aaron D. Marasco

unread,
Aug 21, 2000, 3:00:00 AM8/21/00
to

At 16:51 8/21/00, C. Michael McCallum wrote:

>I could mv rc5.d/S85httpd to rc5.d/K15httpd (and the rc3.d and rc4.d ones
>also). Or I could just delete the init.d/httpd (though then you'd have
>to re-install httpd if you ever wanted it back).

Much cleaner to rename the file in /init.d to something like httpd.disabled
- that is why all the links point there. If you want to use RedHat specific
tools, you can use chkconfig as noted by others.

- Aaron

__
Aaron D. Marasco
Aa...@Marasco.com
http://aaron.marasco.com

"[The Constitution preserves] the advantage of being armed which Americans
possess over the people of almost every other nation... [where] the
governments are afraid to trust the people with arms." - James Madison
(1751-1836), 4th US President

0 new messages