`
zhengjunwei2007_163.com
  • 浏览: 126492 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

SSH启动apache (转载)

阅读更多
首先工具用的是 SSH Secure Shell

介绍几个Linux命令。

wherei1s 能找到你要找的东东在哪。 比如:
[root@s1 ~]# 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

对服务的操作:
[root@s1 ~]# 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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics