First, Apache overview
Apache is the name of a foundation, he developed the HTTPD program, and later because httpd used more people, we are accustomed to use Apache to refer to the HTTPD program.
Apache has many versions of the popular 2.2, 2.4, the latest is 2.4.9ga.
Apache uses a and PHP, MySQL, Apr and so on to match the problem, generally have the following several combinations.
httpd2.4.29+apr1.6.3+apr.util1.6.1
Second, Apache installation practice
0. Preparatory work
Yum install-y gcc #编译器, wait.
Yum install-y bzip2 #处理bz2格式的压缩包
Yum install-y expat-devel #解决apr-util installation Error
Yum install-y pcre-devel #解决httpd链接apr时报错 * *
1. Download the package
cd/usr/local/src/#先cd到该目录
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.gz
wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.bz2
2. Unpack the Package
TAR-ZXVF apr-1.6.3.tar.gz
TAR-JXVF apr-util-1.6.1.tar.bz2 #注意要先yum安装bzip2包
TAR-ZXVF httpd-2.4.29.tar.gz
3. Install Apr
CD apr-1.6.3/
./configure--PREFIX=/USR/LOCAL/APR
echo $? #查看是否正确安装完毕
Make && make install
echo $?
4, Installation Apr-util
cd/usr/local/src/apr-util-1.6.1
./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR
echo $?
Make && make install
echo $?
5, installation httpd
CD httpd-2.4.29/
./configure--prefix=/usr/local/apache2.4--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util-- Enable-so--enable-mods-shared=most #链接httpd与apr和apr-util, installing mods
echo $?
Make && make install #这一步会比较漫长.
echo $?
LAMP+LNMP (iii) Apache (HTTPD) Overview and installation practices