博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
apache 2.4 配置php,apache 2.4 +php7安装手册
阅读量:4318 次
发布时间:2019-06-06

本文共 1683 字,大约阅读时间需要 5 分钟。

[root@httpd ~]# vim /etc/init.d/httpd#!/bin/bash## Startup script for the Apache Web Server## chkconfig: - 85 15# description: Apache is a World Wide Web server.  It is used to serve \#              HTML files and CGI.# processname: httpd# pidfile: /usr/local/apache2/logs/httpd.pid# config: /usr/local/apache2/conf/httpd.conf # Source function library.. /etc/rc.d/init.d/functions if [-f /etc/sysconfig/httpd ]; then. /etc/sysconfig/httpdfi # This will prevent initlog from swallowing up a pass-phrase prompt if# mod_ssl needs a pass-phrase from the user.INITLOG_ARGS="" # Path to the apachectl script, server binary, and short-form for messages.apachectl=/usr/local/apache/bin/apachectlhttpd=/usr/local/apache/bin/httpdpid=$httpd/logs/httpd.pidprog=httpdRETVAL=0  # The semantics of these two functions differ from the way apachectl does# things -- attempting to start while running is a failure, and shutdown# when not running is also a failure.  So we just do it the way init scripts# are expected to behave here.start() {echo -n $"Starting$prog:"daemon $httpd $OPTIONSRETVAL=$?echo[ $RETVAL = 0 ] && touch /var/lock/subsys/httpdreturn $RETVAL} stop() {echo -n $"Stopping$prog:"killproc $httpdRETVAL=$?echo[ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd $pid}reload() {echo -n $"Reloading$prog:"killproc $httpd -HUPRETVAL=$?echo}# See how we were called.case "$1" instart)start;;stop)stop;;status)status $httpdRETVAL=$?;;restart)stopstart;;condrestart)if [ -f $pid ] ; thenstopstartfi;;reload)reload;;graceful|help|configtest|fullstatus)$apachectl $@RETVAL=$?;;*)echo $"Usage:$prog {start|stop|restart|condrestart|reload|status"echo $"|fullstatus|graceful|help|configtest}"exit 1esac exit$RETVAL

转载地址:http://owgzs.baihongyu.com/

你可能感兴趣的文章
09湖州二模(自选模块不等式)
查看>>
Mybatis Batch 批量操作
查看>>
Ubuntu server搭建Java web服务器
查看>>
WSGI学习系列WSME
查看>>
java读取xml配置文件和properties配置文件
查看>>
HDU 4300 Contest 1
查看>>
POJ 3311
查看>>
Button MouseEvent颜色变化
查看>>
Volist标签
查看>>
浅谈模块化
查看>>
14个免费访客行为分析工具
查看>>
beego orm关联查询之多对多(m2m)
查看>>
(转)arguments.callee移除AS3匿名函数的侦听
查看>>
onNewIntent调用时机
查看>>
MYSQL GTID使用运维介绍(转)
查看>>
Fail to start neutron-server
查看>>
景安快运挂在磁盘-支持宝塔
查看>>
word中交叉引用不能更新的解决方法
查看>>
高性能HTTP加速器Varnish(概念篇)
查看>>
Linux 如何写makefile文件
查看>>