阿里狼 发表于 2018-11-26 08:35:01

apache2.4.2 编译安装

Apache 编译安装


httpd-2.4.2.tar.gz
apr-1.4.6.tar.gz
apr-util-1.4.1.tar.gz
pcre-8.30.tar.gz


参考:http://hi.baidu.com/ziiip/blog/item/107d760d7cdac1a22fddd4f4.html
         http://878045653.blog.51cto.com/2693110/636498
         http://shenlan.blog.51cto.com/55742/458848


# ./configure --prefix=/usr/local/apache
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... no
configure: error: APR not found.Please read the documentation.
#


yum install gcc cc

报错1:configure: error: APR not found. Please read the documentation.
安装apr软件
http://apr.apache.org/
APR 1.4.6

报错2:configure: error: APR-util not found. Please read the documentation
APR-util 1.4.1

报错3:configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
安装pcre
http://pcre.org/
https://sourceforge.net/projects/pcre/files/pcre/

安装pcre报错:
libtool: ignoring unknown tag CXX
libtool: unrecognized option `-DHAVE_CONFIG_H'
Try `libtool --help' for more information.
make: *** Error 1
make: Leaving directory `/usr/local/directadmin/custombuild/pcre-7.8'
make: *** Error 2

yum install gcc-c++   解决pcre安装问题。




安装apache
# ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre

# make
# make install

# /usr/local/apache2/bin/apachectl -k start
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
#


配置文件注释掉这一行
nano httpd.conf

访问





页: [1]
查看完整版本: apache2.4.2 编译安装