Centos 6.2 binary installation apache2.4.3 configure: Error: Apr-util not found. Please read the documentation Solution

Source: Internet
Author: User
Tags fully qualified domain name

Centos 6.2 binary installation apache2.4.3 configure: Error: Apr-util not found. Please read the documentation Solution

I. Prepare the environment
1. Install gcc
[Root @ localhost/] # Yum install GCC gcc-C ++

2. Install Apr, APR-util
Download apr-1.4.6.tar.gzand apr-util-1.5.1.tar.gz, address: http://apr.apache.org, upload to/usr/local, installation directory/usr/local/APR and/usr/local/APR-util

A.install apr-1.4.6.tar.gz
[Root @ localhost local] # mkdir-P APR
[Root @ localhost local] # tar-zxf apr-1.4.6.tar.gz
[Root @ localhost local] # cd apr-1.4.6
[Root @ yahoo apr-1.4.6] #./configure -- prefix =/usr/local/APR
[Root @ yahoo apr-1.4.6] # Make
[Root @ yahoo apr-1.4.6] # make install

B .install apr-util-1.5.1.tar.gz
[Root @ localhost local] # mkdir-P Apr-util
[Root @ localhost local] # tar-zxf apr-util-1.5.1.tar.gz
[Root @ localhost local] # cd apr-util-1.5.1
[Root @ yahoo apr-util-1.5.1] #./configure -- prefix =/usr/local/APR-util-with-Apr =/usr/local/APR/bin/apr-1-config
[Root @ yahoo apr-util-1.5.1] # Make
[Root @ yahoo apr-util-1.5.1] # make install

3.install pcre-8.20.tar.gz
: Http://sourceforge.net/projects/pcre/files/pcre/, uploaded to/usr/local, installation directory is/usr/local/PCRE
[Root @ localhost local] # mkdir-P PCRE
[Root @ localhost local] # tar-zxf pcre-8.20.tar.gz
[Root @ localhost local] # cd pcre-8.20
[Root @ yahoo pcre-8.20] #./configure -- prefix =/usr/local/PCRE
[Root @ yahoo pcre-8.20] # Make
[Root @ yahoo pcre-8.20] # make install

II. Install Apache
1.download httpd-2.4.3.tar.gz, address: http://httpd.apache.org/, upload to/usr/local, installation directory is/usr/local/apache2

2. Installation
[Root @ localhost local] # mkdir-P/usr/local/apache2
[Root @ localhost local] # tar zxvf httpd-2.4.3.tar.gz
[Root @ localhost local] # cd httpd-2.4.3
[Root @ localhost httpd-2.4.3] #. /configure -- prefix =/usr/local/apache2 -- With-PCRE =/usr/local/PCRE -- With-Apr =/usr/local/APR -- With-Apr-util = /usr/local/APR-util
[Root @ localhost httpd-2.4.3] # Make
[Root @ localhost httpd-2.4.3] # Make instll
Access http: localhost in a browser and see it works !, It indicates that centos Apache is successfully installed. Congratulations!

3. Start
Method 1 [root @ localhost apache2] #/usr/local/apache2/bin/apachectl start

Method 2 [root @ localhost apache2] # service httpd start

Method 2 [root @ localhost apache2] #/etc/init. d/httpd start

3. Installation Problems
1. Configure: Error: no acceptable CC found in $ path
Solution: Yum install GCC gcc-C ++

2. Configure: Error: Apr not found. Please read the documentation.
Solution: Install the related software of Apache.
Install apr-1.4.6.tar.gz

3. Configure: Error: Apr-util not found. Please read the documentation
Solution: Install Apr-util
Install apr-util-1.5.1.tar.gz

4. Configure: Error: Apr version 1.3.0 or later is required
This is mainly because the APR version is too low. You should uninstall the old version.

5. startup error:
Ah00558: httpd: cocould not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'servername' directive globally to suppress this message
Solution: absolute path:/usr/local/apache2/bin/apachectl start

 

4. Important configuration file directory

/Etc/httpd/CONF/httpd. conf main configuration file
/Usr/lib/httpd/modules: Apache supports many modules, so the modules you want to use are stored in this directory by default.
/Var/log/httpd Apache default log
/Var/www/html cenos default home page Directory

5. Configure Apache and modify httpd. conf to enable Apache to use PHP.
Add the following parameters:
Addtype application/X-httpd-PHP. php
Addtype application/X-httpd-PHP-source. PHPs
Addtype image/X-icon. ICO

Directoryindex index. php index.html. var

Related Article

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.