LAMP+LNMP (iii) Apache (HTTPD) Overview and installation practices

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.