# ps -ef|grep tomcat
查看tomcat进程。
[root@localhost zhanghc]# ps -ef|grep tomcat root 12505 1 55 17:44 pts/3 00:00:01 /usr/local/jdk1.6.0_26/bin/java -Djava.util.logging.config.file=/usr/local/apache-tomcat-6.0.32/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/usr/local/apache-tomcat-6.0.32/endorsed -classpath /usr/local/apache-tomcat-6.0.32/bin/bootstrap.jar -Dcatalina.base=/usr/local/apache-tomcat-6.0.32 -Dcatalina.home=/usr/local/apache-tomcat-6.0.32 -Djava.io.tmpdir=/usr/local/apache-tomcat-6.0.32/temp org.apache.catalina.startup.Bootstrap start root 12518 12485 0 17:44 pts/3 00:00:00 grep --color=auto tomcat
有一个tomcat进程存活。为12505。如果要杀死这个进程使用命令
# kill -9 12505
# ps -ef|grep httpd
apache进程。
[root@localhost zhanghc]# service httpd restart 停止 httpd: [确定] 正在启动 httpd: [确定] [root@localhost zhanghc]# service httpd stop 停止 httpd: [确定] [root@localhost zhanghc]# service httpd start 正在启动 httpd: [确定]