linux之apache下载以及httpd的安装
apache安装需要3个软件
apr wget https://downloads.apache.org/apr/apr-1.6.5.tar.gz
apr-util wget https://downloads.apache.org/apr/apr-util-1.6.1.tar.gz
apache wget http://archive.apache.org/dist/httpd/httpd-2.4.29.tar.gz
开始安装httpd
tar xf httpd-2.4.32.tar.gz解压
[root@localhost apache]# cd httpd-2.4.32/
编译
./configure --prefix=/usr/local/httpd --sysconfdir=/usr/local/httpd/etc/ --enable-so --enable-ssl --enable-cgi --enable-rewrite --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
报错
[root@localhost httpd-2.4.32]# yum install pcre-devel -y
报错ssl
yum install pcre-devel openssl-devel -y
make && make install
安装成功
如果apapche安装:collect2: error: ld returned 1报错
[root@localhost httpd-2.4.29]# cp -r apr-1.6.1 /usr/local/src/httpd-2.4.34/srclib/apr
[root@localhost httpd-2.4.29]# cp -r apr-util-1.6.1 /usr/local/src/httpd-2.4.34/srclib/apr-util