httpd: unrecognized service

将apache安装为系统服务

# cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd

然后 vi /etc/rc.d/init.d/httpd 添加(#!/bin/sh下面)

# chkconfig: 2345 50 90

# description: Activates/Deactivates Apache Web Server

最后,运行chkconfig把Apache添加到系统的启动服务组里面:

# chkconfig --add httpd

# chkconfig httpd on
然后再service httpd start

你可能感兴趣的:(service)