service httpd restart(start、stop)的问题
2010-07-23 16:02
441 查看
终于可以了....
[root@firewall init.d]# more httpd
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo -n "Starting httpd: "
***********************
# daemon httpd
/usr/local/apache/bin/apachectl start
***********************
echo
touch /var/lock/subsys/httpd
;;
stop)
echo -n "Shutting down http: "
killproc httpd
echo
rm -f /var/lock/subsys/httpd
rm -f /var/run/httpd.pid
;;
status)
status httpd
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading httpd: "
killproc httpd -HUP
echo
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
*************************
在末修改前,改变进程状态时提示信息如下:
[root@firewall init.d]# ./httpd stop
Shutting down http: [ OK ]
[root@firewall init.d]# ./httpd start
Starting httpd: execvp: No such file or directory
[FAILED]
root@firewall init.d]# chkconfig --level 35 httpd on
service httpd does not support chkconfig
之后:
我参考了其它RH7.2系统上其它版本的apache的/etc/rc.d/init.d/httpd文件,
只将
# daemon httpd (将这行注销掉)
/usr/local/apache/bin/apachectl start (换成这行)
然后:
[root@firewall init.d]# chkconfig --level 35 httpd on
就可以了...
请问daemon httpd 中的daemon代表什么..,后台?
本文出自 “Holy” 博客,请务必保留此出处http://holy2010.blog.51cto.com/1086044/357175
[root@firewall init.d]# more httpd
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /var/run/httpd.pid
# config: /etc/httpd/conf/access.conf
# config: /etc/httpd/conf/httpd.conf
# config: /etc/httpd/conf/srm.conf
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
echo -n "Starting httpd: "
***********************
# daemon httpd
/usr/local/apache/bin/apachectl start
***********************
echo
touch /var/lock/subsys/httpd
;;
stop)
echo -n "Shutting down http: "
killproc httpd
echo
rm -f /var/lock/subsys/httpd
rm -f /var/run/httpd.pid
;;
status)
status httpd
;;
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading httpd: "
killproc httpd -HUP
echo
;;
*)
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0
*************************
在末修改前,改变进程状态时提示信息如下:
[root@firewall init.d]# ./httpd stop
Shutting down http: [ OK ]
[root@firewall init.d]# ./httpd start
Starting httpd: execvp: No such file or directory
[FAILED]
root@firewall init.d]# chkconfig --level 35 httpd on
service httpd does not support chkconfig
之后:
我参考了其它RH7.2系统上其它版本的apache的/etc/rc.d/init.d/httpd文件,
只将
# daemon httpd (将这行注销掉)
/usr/local/apache/bin/apachectl start (换成这行)
然后:
[root@firewall init.d]# chkconfig --level 35 httpd on
就可以了...
请问daemon httpd 中的daemon代表什么..,后台?
本文出自 “Holy” 博客,请务必保留此出处http://holy2010.blog.51cto.com/1086044/357175
相关文章推荐
- service httpd restart(start、stop)的问题
- 【android】在Service的onStartCommand()中调用stopself()应该注意的问题
- Linux Start Restart and Stop The Cron or Crond Service
- upstart启动的进程调用stop命令会杀掉其内部启动的service的问题
- Linux添加nginx为系统服务(service nginx status/start/stop/restart)
- 把Nginx加为系统服务(service nginx start/stop/restart)
- Linux Start Restart and Stop The Cron or Crond Service
- 把Nginx加为系统服务(service nginx start/stop/restart)
- 关于运行mysql_install_db命令导致sudo systemctl start /restart mariadb.service启动失败问题
- Linux Start Restart and Stop The Cron or Crond Service
- 添加nginx为系统服务(service nginx start/stop/restart)
- 把Nginx加为系统服务(service nginx start/stop/restart)
- 【android】在Service的onStartCommand()中调用stopself()应该注意的问题
- 添加nginx为系统服务(service nginx start/stop/restart)
- 添加nginx为系统服务(service nginx start/stop/restart)
- 添加nginx为系统服务(service nginx start/stop/restart)
- 添加nginx为系统服务(service nginx start/stop/restart)
- Linux 配置tomcat以service方式 start stop restart 运行
- 添加nginx为系统服务(service nginx start/stop/restart)
- 制作Nginx控制脚本实现:service nginx restart|reload|stop|start