日期:2014-05-16  浏览次数:21029 次

Ubuntu下启动/重启/停止apache,mysql服务器
  1. //?Apache ??
  2. //Task:?Start?Apache?2?Server?/启动apache服务 ??
  3. #?/etc/init.d/apache2?start??
  4. //or ??
  5. $?sudo?/etc/init.d/apache2?start??
  6. //Task:?Restart?Apache?2?Server?/重启apache服务 ??
  7. #?/etc/init.d/apache2?restart??
  8. //or ??
  9. $?sudo?/etc/init.d/apache2?restart??
  10. //Task:?Stop?Apache?2?Server?/停止apache服务 ??
  11. #?/etc/init.d/apache2?stop??
  12. //or ??
  13. $?sudo?/etc/init.d/apache2?stop???
  14. //?Mysql ??
  15. /etc/init.d/mysql?start??
  16. /etc/init.d/mysql?stop??
  17. /etc/init.d/mysql?restart??
  18. //?httpd是Apache超文本传输协议(HTTP)服务器的主程序。被设计为一个独立运行的后台进程,它会建立一个处理请求的子进程或线程的池。 ??
  19. //?通常,httpd不应该被直接调用,而应该在类Unix系统中由?apachectl?调用 ??
  20. //?man?apache2?中介绍 ??
  21. //?apache2?is?the?Apache?HyperText?Transfer?Protocol?(HTTP)?server?program. ??
  22. //?It?is?designed?to?be?run?as?a?standalone?daemon?process.?When??used??like ??
  23. //?this?it?will?create?a?pool?of?child?processes?or?threads?to?handle?requests. ??
  24. //?In?general,?apache2?should?not?be?invoked?directly, ??
  25. //?but?rather?should?be?invoked?via?/etc/init.d/apache2?or?apache2ctl. ??
  26. //?The?default?Debian?config-uration?requires?environment?variables ??
  27. //?that?are?defined?in?/etc/apache2/envvars?and?are?not?available?if?apache2?is??started??directly. ??
  28. //?However,apache2ctl?can?be?used?to?pass?arbitrary?arguments?to?apache2. ??
  29. // ??
  30. //?apache2ctl?=?apache2?ConTroL ??
  31. // ??
  32. apache2ctl?-restart??
  33. apache2ctl?-stop??
  34. apache2ctl?-t??
  35. //?详细见?man?apache2??