CentOS 6编译配置httpd2.4的N种方法(6)

  文件里上面的内容不需要改动,我们只需要修改一下路径就可以了,也就是把

# Path to the apachectl script, server binary, and short-form for messages. apachectl=/usr/sbin/apachectl httpd=${HTTPD-/usr/sbin/httpd} prog=httpd pidfile=${PIDFILE-/var/run/httpd/httpd.pid} lockfile=${LOCKFILE-/var/lock/subsys/httpd} RETVAL=0 STOP_TIMEOUT=${STOP_TIMEOUT-10}

  修改为:

# Path to the apachectl script, server binary, and short-form for messages. apachectl=/app/httpd24/bin/apachectl httpd=${HTTPD-/app/httpd24/bin/httpd} prog=httpd pidfile=${PIDFILE-/app/httpd24/logs/httpd.pid} lockfile=${LOCKFILE-/var/lock/subsys/httpd24} RETVAL=0 STOP_TIMEOUT=${STOP_TIMEOUT-10}

  然后保存退出就可以了。
  接下来,就可以把这个服务添加到服务列表里了:

[root@centos6 init.d]# chkconfig --add httpd24 [root@centos6 init.d]# chkconfig httpd24 on [root@centos6 init.d]# chkconfig --list httpd24 httpd24 0:off 1:off 2:on 3:on 4:on 5:on 6:off

  这样,我们的httpd2.4版本就可以通过service来控制了。
  至此,我们的服务的主要功能就实现了。
  我们的实验圆满完成。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/845fbeb8abaf11d9f495b87678d872e2.html