Install Apache under Linux System (personal experience)

Source: Internet
Author: User

Before installing Apache, we need to install APR, and APR-related apr-util, and pcre these three things.

Apr is the Apache Portable runtime, Pcre is a Perl library, including a Perl-compatible regular expression library.

The installation of these three files is similar and will be detailed later.

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > My system is CentOS6.2 (ensure installed g++, the rear will say installation g++) , prepare four files:

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >                                              1.pcre-8.31.tar.bz2 

                                              2. apr-1.5.1.tar.gz

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >                                              3.pcre-8.30.tar.bz2

4.httpd-2.4.10.tar.bz2

I generally unpacked the installation package under the/usr/local/src/;

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >     Decompression Method tar-jxvf Pcre-8.31.tar.bz2

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >                  &NBSP;TAR-ZXVF apr-1.5.1.tar.gz

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >

First install Apr
#cd/usr/src/apr-1.4.6
#./configure--prefix=/usr/local/apr && make && make install


Next Install Apr-util
#cd/usr/src/apr-util-1.3.8
#./configure--prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config && make && make Install


Finally install the Pcre (if not installed g++, this step is not going to go on, the later will say how to install)
#cd/usr/src/pcre-8.30
#./configure--prefix=/usr/local/pcre && make && make install


Now that the preparations are complete, Apache can now be installed.

#cd/usr/src/httpd-2.4.3
#./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/-- With-pcre=/usr/local/pcre--enable-so--enable-rewrite && make && make install

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >

< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > So until now, if there is no error, then it proves that Apache is installed.

#service httpd start Apache, test 127.0.0.1 to the browser.

The next article describes the installation of g++. What questions can be sent to [email protected] Welcome to correct, common communication, less detours.

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.