下载gz包.
tar xzvf gz包名 解压
more INSTALL 查看一下安装步骤
./configure --prefix=/var/apache 指定安装目录
出错提示没有 apr,按提示下载放到srclib中.
再次configure,提示没有pcre,到提示官方下载,gz包,按提示安装完成(见pcre手工安装文章)
再次configure成功.
make生成,极慢......
再make install 安装完成
ln -s /var/apache/bin/apapchectl /etc/init.d/apache 链接到自动启动目录中
update-rc.d apache defaults 更新自动启动项
启动 apache start提示错误
../bin/apachectl
/var/apache/bin/httpd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
find / -name libpcre.so.0 查找文件,
ln -s /usr/local/lib/libpcre.so.0 /var/apache/lib/libpcre.so.0 链 接过来
再次运行提示
../bin/apachectl
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
进入conf/httpd.conf配置它们
再次运行root@chrd-mail:/var/apache/lib# ../bin/apachectl
httpd (pid 14117) already running
ok安装成功
reboot重启测试自动启动情况.
访问域名,ok,自动启动成功.