1.1 Pre-preparation
Apt-get Install Lrzsz
Apt-get install gcc//yum install-y gcc gcc-c++
Apt-get Update
Apt-get Install Build-essential
1.2apr
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.5.2.tar.gz
Tar zxvf apr-1.5.2.tar.gz
CD APR-1.5.2/
./configure
Make
Make install
1.3apr-util
wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
Tar zxvf apr-util-1.5.4.tar.gz
CD apr-util-1.5.4/
./configure--WITH-APR=/USR/LOCAL/APR
Make
Make install
1.4pcre
wget http://ftp.exim.llorien.org/pcre/pcre-8.36.tar.gz
Tar zxvf pcre-8.36.tar.gz
CD pcre-8.36/
./configure
(Linux installation installation pcre-8.32
./configure--prefix=/usr/local/pcre The following error occurred
Configure:error:You need a C + + compiler for C + + support
Workaround: Yum install-y gcc gcc-c++)
(In the event of a failure, execute Apt-get install build-essential)
Make
Make install
1.5zlib
Place the installation package in the specified directory
Tar zxvf zlib-1.2.8.tar.gz
CD zlib-1.2.8/
./configure
(In the event of a failure, perform vim Makefile)
Make
Make install
1.6httpd-2.4.23
Place the installation package in the specified directory
Tar zxvf httpd-2.4.23.tar.gz
CD httpd-2.4.23/
./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr/bin/apr-1-config--WITH-APR-UTIL=/USR/LOCAL/APR /bin/apu-1-config--with-pcre=/usr/local/pcre/bin/pcre-config--with-zlib-1.2.8=/usr/local/zlib-1.2.8--enable-so
Make
Make install
Possible issues:
①./configure error Prompt E:unable to locate package crypto,e:unable to locate package Libssl
Then execute:
cp/usr/local/ssl/lib/libssl.so/usr/lib/
cp/usr/local/ssl/lib/libcrypto.so/usr/lib/
Re-execute
./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr/bin/apr-1-config--WITH-APR-UTIL=/USR/LOCAL/APR /bin/apu-1-config--with-pcre=/usr/local/pcre/bin/pcre-config--with-zlib-1.2.8=/usr/local/zlib-1.2.8--enable-so
Make
Make install
② prompts for zlib and pcre path problems, the
./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr/bin/apr-1-config--WITH-APR-UTIL=/USR/LOCAL/APR /bin/apu-1-config--enable-so
Make
Make install
HTTPD before installing the source code on a Linux system