Install Apache_linux under the CentOS of linux+php+apache+oracle environment

Source: Internet
Author: User
Tags centos

The CentOS system is installed with basic Server. There are a number of missing components required before you install Apache, and here's a list of the components that need to be installed

Apache-aprapache-apr-utilperl-pcreapache

Website download Apache, download address: http://httpd.apache.org/download.cgi

Download the stable version of httpd-2.4.9.tar.gz and upload it to the server/usr/packages directory.

Install Apache:

# TAR-XVZF httpd-2.4.9.tar.gz

# cd httpd-2.4.9

#/configure--prefix=/usr/local/apache--enable-module=so- Enable-module=rewrite

Check the compilation Environment for errors:

Checking for APR ... no configure:error:APR not
found. Please read the documentation.

The reason for the lack of APR (Apache portable Runtime) is the need to download Apr and Apr-util.

Download Address: http://apr.apache.org/download.cgi

Download apr-1.5.1.tar.gz, apr-util-1.5.3.tar.gz

Install Apr:

# TAR-XVZF apr-1.5.1.tar.gz
# cd apr-1.5.1 #
. Configure
# make
# make install

Install Apr-util:

# TAR-XVZF apr-util-1.5.3.tar.gz
# cd apr-util-1.5.3
#. Configure--prefix=/usr/local/apr-util--with-apr=/ USR/LOCAL/APR
# make
# make install

Check the compilation environment again for an error:

Configure:error:pcre-config for Libpcre not found. PCRE is required and available from http://pcre.org/

Missing pcre, download address: http://sourceforge.net/projects/pcre/

Install Pcre:

# unzip-o pcre-8.35
# cd pcre-8.35
#/configure--prefix=/usr/local/pcre
# make
# make install


When you check the compilation environment again, add the parameters:

--with-apr=/usr/local/apr/--with-apr-util=/usr/local/apr-util/--with-pcre=/usr/local/pcre

No error:

# make
# make install

Installation completed.

This is my first time to install, the lack of association relationship components, the next installation directly installed components, the final installation of Apache, this will be smoother.

Start Apache

# cp/usr/local/apache/bin/apachectl/sbin/
# apachectl Start

Configure the Apache service to start when the system starts

# vi/etc/rc.d/rc.local

On the last line plus:/sbin/apachectl start

Modify Apache Default Site Directory

modifying/usr/local/apache/conf/httpd.conf files


Change into


Execute command
# apachectl Restart

The Apache configuration file is renewed ~ ~

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.