7iuyk 发表于 2015-10-12 11:15:32

linux平台下apache的源码安装和将apache服务配置成系统服务

linux平台下apache的源码安装和将apache服务配置成系统服务

安装apache服务
下载apache源码包
#         tar -zxvf http-2.2.29.tar.gz
#        cd http-2.2.29
#        ./configure --prefix=/usr/local/apache--enable-so --enable-cgi
#        make
#        make install

配置成系统服务:
#cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
#cp /usr/local/apache/bin/apachectl /usr/local/bin/httpd

创建符号链接
#ln -s /etc/init.d/httpd/etc/rc.d/rc5.d/S61httpd
#ln -s /etc/init.d/httpd/etc/rc.d/rc4.d/S61httpd
#ln -s /etc/init.d/httpd/etc/rc.d/rc3.d/S61httpd

打开/etc/init.d/httpd文件在#!/bin/bash下面加入
#chkconfig:345 61 61
#description:Apache

执行chkconfig --list |grep httpd就会出现httpd服务开机运行在345级别
注册服务 chkconfig --add httpd
设置启动级别 chkconfig --levels 345 httpd on

页: [1]
查看完整版本: linux平台下apache的源码安装和将apache服务配置成系统服务