[clug] Starting services in ubuntu

David Gibson david at gibson.dropbear.id.au
Wed May 11 00:08:54 GMT 2005

On Wed, May 11, 2005 at 09:37:18AM +1000, Martin Pool wrote:
> On 11 May 2005, "Crosskey, Jason (DPS)" <Jason.Crosskey at aph.gov.au> wrote:
> > Does ubuntu have any commands like service and chkcfg in RH to start
> > services. I was trying to start apache using /etc/init.d/apache2 but
> > didn't work. I also couldn't find the start script in rc3.d. Do I need
> > to create a link the old way?
> It does not have a service command.   Just running 
>   /etc/init.d/apache2 start
> should do it; have a look in the apache error log and see if something
> is preventing it starting.  If all else fails do
>   sh -x /etc/init.d/apache2 start
> to get some debugging information
> I sometimes find it useful to define a service command like this:
>   $ sudo -s
>   # echo '/etc/init.d/$*' > /usr/local/bin/service
>   # chmod +x /usr/local/bin/service

And like Debian, from which it is derived, it has the update-rc.d
command which theoretically does something similar to chkconfig.
However, it's really designed for use from package scripts, not by the
user, and I, for one, have never figured out how to drive it usefully.

David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20050511/29a71ef7/attachment.bin

More information about the linux mailing list