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 停止服务