用chkconfig将自编译设置为系统服务的时候,httpd 服务不支持chkconfig。解决过程如下:
1.编辑/etc/init.d/httpd
#!/bin/bash
#chkconfig:345 61 61
#description:Apache httpd
2.配置
[root@localhost ~]# chkconfig --add httpd
[root@localhost ~]# chkconfig --list|grep httpd
httpd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
[root@localhost ~]# chkconfig --level 345 httpd on
[root@localhost ~]# chkconfig --list|grep httpd
httpd 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭
1.编辑/etc/init.d/httpd
#!/bin/bash
#chkconfig:345 61 61
#description:Apache httpd
2.配置
[root@localhost ~]# chkconfig --add httpd
[root@localhost ~]# chkconfig --list|grep httpd
httpd 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
[root@localhost ~]# chkconfig --level 345 httpd on
[root@localhost ~]# chkconfig --list|grep httpd
httpd 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭
编辑回复