How do I start, restart or stop Apache 2 web server & MySQL server under Ubuntu Linux operating systems?
/etc/init.d/apache2 is service script used to start / stop / restart the Apache2 service under Debian or Ubuntu Linux. You need to login as root or use sudo command restart Apache.
sudo -i
Enter your root password
Task: Start Apache 2 Server
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start
Task: Restart Apache 2 Server
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
Task: Stop Apache 2 Server
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
Task: Start MySQL Server
# /etc/init.d/mysql start
or
$ sudo /etc/init.d/mysql start
Task: Restart MySQL Server
# /etc/init.d/mysql restart
or
$ sudo /etc/init.d/mysql restart
Task: Stop MySQL Server
# /etc/init.d/mysql stop
or
$ sudo /etc/init.d/mysql stop
Amzad Hossain
how about ??
service apache2 stop|status|restart|start
service msyql stop|status|restart|start
Rolland Amaya
ranawd.wordpress.com’s done it once again. Amazing read.
brtsos
Try this program :
http://apache-switch.webuda.com/
“Apache-switch” is very easy to use. You can turn on, turn off or restart apache server.