用SSH重启Apache

December 19, 2009 by SLJ | Category:Apache | No Comment Font size: AA   AA

最近,Bryan雇我把我的作品Yourcaddy.com开发成产品,可以带license的出售。作品完成之后Bryan开卖,地址在http://www.yelpclone.com。购买的人我这里看上去还可以,不能算少。于是有一个客户需要协助安装服务。于是我便去他的独立服务器上捣鼓了一下。我看着他的域名觉得无比兴奋! GEV.com 可谓价值连城!客户给的是一个FTP+SSH账户。下面就说一说在Windows下利用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

(以上路径根据安装时的路径而定)

Related Posts / 相关文章



Leave a Comment:

*
*
*
*
↑ Top