apache不支持chkconfig的解决方法
时间:2018-04-19 23:16:50
浏览:243次

| 1 | apache 作为linux启动就运行服务程序 |
| 2 |
|
| 3 | cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd |
| 4 | 但是在执行: |
| 5 |
|
| 6 | chkconfig --add httpd |
| 7 | chkconfig httpd on |
| 8 | 的时候出现错误: |
| 9 |
|
| 10 | service httpd does not support chkconfig |
| 11 | 解决办法: |
| 12 | 打开 vi /etc/rc.d/init.d/httpd |
| 13 | 在#!/bin/sh 下面加上 |
| 14 |
|
| 15 | #chkconfig: 2345 10 90 |
| 16 | #description: Activates/Deactivates Apache Web Server |
| 17 | |
| 18 |
|
| 19 | 加上上面这两行就可以,#必须有 |
| 20 | 其中:2345是设为要启动的运行级别,10是启动优先级,90是杀死进程的优先级,谁优先谁先挂的意思 |
- [上一篇]wdcp创建数据库老是提示mysqlroot
- [下一篇]php 导出extcel乱码,已解决!