/usr/local/apache
/usr/local/apache/bin/apachectl
netstat -anp | grep :80
netstat -anp | grep httpd
netstat -anp | grep tcp
netstat -anp | grep mysql
/etc/init.d/httpd status
/usr/local/apache/bin/apachectl restart
/usr/local/apache/bin/apachectl -k restart
操作 /usr/local/apache/bin/apachectl 和 service httpd 等效!——殊途同归
# --------------------------------------------------------------------
[user@project ~]# /usr/local/apache/bin/apachectl restart
[user@project ~]# /usr/local/apache/bin/apachectl stop
# /etc/init.d/httpd 这个httpd不是我们care的!
[user@project ~]# /etc/init.d/httpd status
Apache is running.
[user@project ~]# service httpd stop
stop apache... httpd (pid 3207?) not running
done
[user@project ~]# /usr/local/apache/bin/apachectl start
[user@project ~]# service httpd stop
stop apache... done
[user@project ~]# service httpd stop
stop apache... httpd (no pid file) not running
done
[user@project ~]# service httpd start
start apache... done
[user@project ~]# netstat -anp | grep httpd
tcp 0 0 :::80 :::* LISTEN 14871/httpd
# 启动Apache成功后,还要启动MySql,mysql服务名就是mysql,不是MySqld
[user@project ~]# service mysqld restart
mysqld: unrecognized service
[user@project ~]# service mysql restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL.. [ OK ]
[user@project ~]#