#解压安装 tar -zxvf ./httpd-2.4.43.tar.gz tar -zxvf ./apr-1.7.0.tar.gz tar -zxvf ./apr-util-1.6.1.tar.gz #编译安装apr cd ./apr-1.7.0/ ./configure --prefix=/usr/local/apr make make install #编译安装apr-util cd ./apr-util-1.6.1 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config make make install
在编译解决办法如下:apr-util时,会报错:
1 2 3 4 5 6 7 8 9
xml /apr_xml.c:35:19: fatal error: expat.h: No such file or directory #include <expat.h> ^ compilation terminated. make[1]: *** [xml/apr_xml.lo] Error 1 make[1]: Leaving directory `/data/jumper-cs/downloads/apr-util-1.6.1' make: *** [all-recursive] Error 1
解决办法如下:
1
yum install -y expat-devel
然后重新编译安装apr-util。最后编译apache:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# 如果没有安装pcre,先按照pcre wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.43.tar.gz tar -zxvf pcre-8.43.tar.gz cd pcre-8.43 ./configure --prefix=/usr/local/pcre make make install # 开始安装apache... cd httpd-2.4.43/ ./configure --prefix=/apache24 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ make make install
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.