Apache 2.4. 源码编译安装详解
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Apache 2.4. 源码编译安装详解相关的知识,希望对你有一定的参考价值。
1)、下载httpd软件包和解压
cd /usr/local/src wget http://apache.opencas.org//httpd/httpd-2.4.18.tar.gz tar zxvf httpd-2.4.18.tar.gz
2)、安装前的系统需求:
(1)APR and APR-Util
cd /usr/local/src wget http://apache.opencas.org//apr/apr-1.5.2.tar.gz wget http://apache.opencas.org//apr/apr-util-1.5.4.tar.gz tar zxvf apr-1.5.2.tar.gz tar zxvf apr-util-1.5.4.tar.gz mv /usr/local/src/apr-1.5.2 /usr/local/src/httpd-2.4.18/srclib/apr mv /usr/local/src/apr-util-1.5.4 /usr/local/src/httpd-2.4.18/srclib/apr-util
(2)PRCE
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz tar zxvf pcre-8.3.7.tar.gz cd pcre-8.3.7 ./configure make && make install
(3)GCC和各种编译工具
yum install make apr* autoconf automake gcc gcc-c++ zlib-devel openssl openssl-devel pcre-devel gd kernel keyutils patch perl kernel-headers compat* mpfr cpp glibc libgomp libstdc++-devel ppl cloog-ppl keyutils-libs-devel libcom_err-devel libsepol-devel libselinux-devel krb5-devel zlib-devel libXpm* freetype libjpeg* libpng* php-common php-gd ncurses* libtool* libxml2 libxml2-devel patch
3)、安装Apache
mkdir -p /usr/local/apache24 cd /usr/local/src/httpd-2.4.18 ./configure --prefix=/usr/local/apache24 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared--with-pcre make && make install
4)、启动
/usr/local/apache24/bin/apachectl -k start
参考:https://httpd.apache.org/docs/2.4/install.html
以上是关于Apache 2.4. 源码编译安装详解的主要内容,如果未能解决你的问题,请参考以下文章