LAMP系列之Apache优雅重启、优雅关闭
1、优雅停止信号:WINCH
# /appl/apache/bin/apachectl-kgraceful-stop#
# elinks -dump http://192.168.137.3 #使用elinks访问测试
ELinks: 拒绝连接
2、优雅重启
信号:USR1 # /appl/apache/bin/apachectl -k gracefulhttpd not running, trying to start# ps aux |grep httpdroot 55950.00.3334203260 ? Ss 16:34 0:00 /appl/apache2.2.22/bin/httpd -k gracefuldaemon 55960.00.1319761296 ? S 16:34 0:00 /appl/apache2.2.22/bin/httpd -k gracefuldaemon 55970.00.1331521144 ? S 16:34 0:00 /appl/apache2.2.22/bin/httpd -k gracefuldaemon 55980.00.3 3776803900 ? Sl 16:34 0:00 /appl/apache2.2.22/bin/httpd -k gracefuldaemon 55990.00.3 3776803904 ? Sl 16:34 0:00 /appl/apache2.2.22/bin/httpd -k gracefuldaemon 56000.00.3 3776803908 ? Sl 16:34 0:00 /appl/apache2.2.22/bin/httpd -k gracefulroot 56830.00.0 103248 836 pts/1 S+ 16:34 0:00 grep httpd测试:# elinks -dump http://192.168.137.3 It works!3、Apache正常启动、关闭、重启
# /appl/apache/bin/apachectl -k stophttpd (no pid file) not running# elinks -dump http://192.168.137.3ELinks: 拒绝连接## /appl/apache/bin/apachectl -k start# elinks -dump http://192.168.137.3 It works!# /appl/apache/bin/apachectl -k restart# elinks -dump http://192.168.137.3 It works!
页:
[1]