Many times people need to do simple tasks such as restarting
Apache or
MySQL server, but the commands are unknown to them. Not everyone is a pro and one has to start somewhere. I was upgrading my server these days and as I am more a coder than a server administrator, I didn't remember the command for restarting the MySQL server :) . I'm using
Fedora Linux, so here below are the commands.
Restart the Apache Server
/etc/rc.d/init.d/httpd restart
Sometimes the above-mentioned command won't work (different configuration for instance), so then try the following command:
/usr/sbin/httpd -k restart
Basically you only need to find the httpd installation. To find it, type:
find / -name httpd
Restart the MySQL Server
/etc/init.d/mysqld restart
STOP or START Servers
Simply replace restart with start or stop depending on what you're going to do.
8 February 2010