CentOS 7 Apache 2.4.23 installation configuration boot

Source: Internet
Author: User

Download Apache installation package httpd-2.4.23.tar.gz

: http://apache.fayea.com/httpd/

Apache Installation Requirements

Must install APR, Apr-util, pcre,gcc-c++ and other packages

Compile command: (in addition to specifying Apache installation directory, also install APR, Apr-util, Pcre, and specify parameters)

[Email protected] software]#Tar-ZXVF httpd-2.4. at.Tar. Gz[[email protected] software]# CD httpd-2.4. at[email protected] httpd-2.4. at]#./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/-- with-pcre=/usr/local/pcre Checking forChosen Layout ... Apachechecking forWorkingmkdir-p ... yeschecking for grepthat handlesLongLines And-e .../usr/bin/grepchecking for Egrep.../usr/bin/grep-echecking build system type ... x86_64-unknown-linux-gnuchecking Host system type ... x86_64-unknown-linux-gnuchecking target system type ... x86_64-unknown-linux-gnuconfigure:configure:Configuring Apache Portable Runtime library...configure:checking forAPR ... configure:error:the--with-apr parameter is incorrect. It must specify anInstallPrefix, a build directory, or an apr-configfile. [Email protected] httpd-2.4. at]#

There was a problem compiling Apache

http://apr.apache.org/download.cgi Download apr-1.5.2.tar.gz, apr-util-1.5.4.tar.gz
http://www.pcre.org/official website
Https://sourceforge.net/projects/pcre/files/pcre/Choose Pcre Download, do not pcre2
Download latest Version pcre-8.39.tar.gz

solving Apr problems

tar -zxvf apr-1.5. 2. Tar . Gz[[email protected] software]# CD Apr-1.5. 2/[[email protected] Apr-1.5.  2]#./configure--prefix=/usr/local/apr[[email protected] Apr-1.5.  2make[email protected] Apr-1.5.  2makeinstall

Solve apr-util problems

[Email protected] software]#Tar-ZXVF apr-util-1.5.4.Tar. Gz[[email protected] software]# CD Apr-util-1.5.4/[email protected] Apr-util-1.5.4]#./configure--prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config[[email protected] Apr-util-1.5.4]# Make[email protected] Apr-util-1.5.4]# Make Install

Solve pcre-config problems

tar -zxvf pcre-8.39. Tar . Gz[[email protected] software]# CD pcre-8.39[[email protected] pcre-8.39]#. Configure--prefix=/usr/local/pcre[[email protected] pcre-8.39make[email Protected] Pcre-8.39makeinstall

Compile httpd-2.4.23 again:

[Email protected] software]# CD httpd-2.4.  at [email protected] httpd-2.4. ] #./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/-- with-pcre=/usr/local/pcre [[email protected] httpd-2.4.  [email protected] httpd-2.4.  makeinstall

Start Apache:/usr/local/apache2/bin/apachectl Start
Stop Apache:/usr/local/apache2/bin/apachectl Stop
Restart Apache:/usr/local/apache2/bin/apachectl restart

The website is placed in the/usr/local/apache2/htdocs directory

In IE through http://localhost:80, if you see "It works!" displayed on the page The word, the Apache authentication is passed. If the index suffix of the Web site is in PHP format, modify the httpd.conf configuration file (/usr/local/apache2/conf) and add index.php to the DirectoryIndex.

# # Directoryindex:sets The file that Apache would serve if a directory# is requested.# <  dir_module>directoryindex index.html index.php</ifmodule  >

CentOS 7 Apache 2.4.23 installation configuration boot

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.