I have been wondering if issuing a reboot command safely stops running LAMP processes like MySQL or Apache?
If it's installed as a service (most likely case), it should get the command to stop on the way down automatically.
If it's not, then you should stop them first.
Edit: Now that I have a few minutes at a computer, I'll expand on this a bit.
One way to view your available services is to use the
You can also use the
If the applications were installed during OS installation or via
If they were installed via some non-standard way and not as a service, then it would be best to stop them first, otherwise the OS will forcefully stop them before shutting down (
Sometimes (not on Linux, though) there's a difference between a reboot initiated by
They don't need to be stopped per se, but they need to know that they have to flush all current writes to disk and switch to read-only. It just so happens that stopping them prevents them from writing any more to the disk by default (since they no longer exist). Most shutdown processes stop any running daemons.