SSH启动apache (转载)
首先工具用的是 SSH Secure Shell介绍几个Linux命令。
wherei1s 能找到你要找的东东在哪。 比如:
# whereis httpd
httpd: /usr/sbin/httpd.worker /usr/sbin/httpd /usr/sbin/httpd.event /etc/httpd
/usr/lib/httpd /usr/include/httpd /usr/share/man/man8/httpd.8.gz
找到httpd进程程序之所在
ps -ef|grep httpd
找到apachectl
whereis apachectl
重启apache
/usr/sbin/apachectl restart
检测conf文件有没有错
/usr/sbin/apachectl -t
对服务的操作:
# whereis service
service: /sbin/service /usr/share/man/man8/service.8.gz
或重启httpd服务
/sbin/service httpd restart
(以上路径根据安装时的路径而定)
Apache
service httpd start 启动
service httpd stop 关闭
service httpd restart 重新启动
/etc/init.d/httpd restart
页:
[1]