The installation of Apache and the resolution of the problem such as Apr

Source: Internet
Author: User

1) command to view Apache installation and its version number
$RPM-Q httpd
If an installed Apache is present, its information is listed

2) formally start Apache installation
2.1) Download the HTTPD package. Go to Apache's httpd official website Https://httpd.apache.org/download.cgi#apache24, find the required version of HTTPD,
The author chooses the httpd-2.4.20.tar.gz
2.2) Decompression httpd-2.4.20.tar.gz
Use the $tar zxvf httpd-2.4.20.tar.gz to extract the files to the current folder.
2.3) due to direct installation may cause some problems, the problem is as follows:
Checking for APR ... no
Configure:error:APR not found. Please read the documentation
So before installing, these modules can be installed, in the installation of httpd
2.3.1) Install Apr. Download apr-1.4.5.tar.gz by the following address
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz
Follow the steps below to install
1. Unzip with: $tar ZXVF apr-1.4.5.tar.gz
2. Go to the apr-1.4.5 folder and use the./configure--PREFIX=/USR/LOCAL/APR to configure
3. $make && make install for compilation
2.3.2) Install Apr-util. Download apr-util-1.3.12.tar.gz via the address below
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz
Follow the steps below to install
1. Unzip with: $tar ZXVF apr-util-1.3.12.tar.gz
2. Go to the Apr-util-1.3.12 folder and use the./configure--prefix=/usr/local/apr-with-apr=/usr/local/apr/bin/apr-1-config to configure
3. $make && make install for compilation
2.3.3) Install Pcre. Download Pcre-8.10.zip via the address below
wget Http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

Follow the steps below to install
1. Extract with: $unzip pcre-8.10.zip
2. Go to the Pcre-8.10 folder and use the./configure--prefix=/usr/local/pcre--disable-shared--with-pic to configure (./configure--prefix=/usr /local/pcre)
3. $make && make install for compilation
3) Compile and install Apache
1. Enter 2nd) step, unzip the httpd.2.4.20 folder,
2. Using the./configure--prefix=/usr/local/apache2--enable-so--with-apr=/usr/local/apr--with-apr-util=/usr/local/ apr-util/--with-pcre=/usr/local/pcre for configuration
3. $make && make install for compilation

The above steps are the basic steps for installing Apache, and some of the common problems that may arise are resolved

The installation of Apache and the resolution of the problem such as Apr

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.