mysql 啓動停止
service mysqld start;service mysqld stop。
查看mysql版本:mysql –version
查看mysql是否啓動:netstat -nat,如果有3306爲mysql端口,則啓動了。
查看php、mysql或者apache是否安裝的命令
如:rpm -q php、rpm -q mysql、rpm -q httpd
linux Web服務啓動 停止
service httpd start 啓動
service httpd restart 重新啓動
service httpd stop 停止服務
1.啓動Web服務
啓動Web服務的命令爲:
/etc/init.d/httpd start
2.停止Web服務
停止Web服務的命令爲:
/etc/init.d/httpd stop
3.重新啓動Web服務
重新啓動Web服務的命令爲:
/etc/init.d/httpd restart
Web服務使用TCP協議的80端口,如果Linux服務器開啓了防火牆功能,就需關閉防火牆功能或設置允許TCP協議的80端口通過。可以使用以下命令開放TCP協議的80端口。
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
如果apahce安裝目錄爲/usr/local/apache
啓動:
/usr/local/apache/bin/apachectl start
停止:
/usr/local/apache/bin/apachectl stop
重新啓動:
/usr/local/apache/bin/apachectl restart
重啓Apache時,不中斷當前的連接:
/usr/local/sbin/apachectl graceful
如果apache安裝成爲linux的服務的話,可以用以下命令操作:
service httpd start 啓動
service httpd restart 重新啓動
service httpd stop 停止服務