httpd源码安装过程

1.先装编译器 命令为 yum install gcc gcc-c++
2.yum install expat-devel(XML解析)
3.上网找 apr apr-util pcre 源码包下载
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.7.0.tar.gz (apr)
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz(apr-utilc++

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz (pcre)

4.下载完源码包以后开始解压,指定目录到/usr/local/src
tar -xvf 压缩包 -C /usr/local/src
/usr/local/src : 存放源码包
5.分别进去源码包目录操做:
apr
./configure --prefix=/usr/local/apr
make
make install
apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make installshell

pcre
./configure --prefix=/usr/local/pcre
make
make installapache

httpd
./configure --prefix=/usr/local/apache24 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre
make
make install
configure探测操做系统目标环境 检查有没有cc或gcc configure是shell脚本 生成Makefile
make 报错, 解决问题,make clean,把生成 的中间文件删掉 再 makeide

安装pcre过程当中,遇到的问题:
1.检查有没有安装gcc-c++
2.yum install pcre-devel
3.如报错返回码为2,yum -y install libxml2-devel操作系统

相关文章
相关标签/搜索