Controlling services in Ubuntu

Usually controlling services is a matter of issuing one of the following commands
Code:
sudo /etc/init.d/name_of_service stop
Code:
sudo /etc/init.d/name_of_service start
Code:
sudo /etc/init.d/name_of_service restart
Just replace "name_of_service" with "mysql" or "apache".
PHP is used in conjunction with Apache, so there isn't (as far as I know) a separate PHP service. If you make changes to your PHP setup, you'll need to restart Apache.
Installing Apache and MySQL will create startup entries in the /etc/rc.d directories.

You can check what's being started at boot by issuing the following command
Code:
dmesg
Among other things, there will be a list of services started. To change services starting automatically at boot, you can use the "update-rc.d" command. More info on this can be found in it's man page.

No comments: