Install Apache2.4.2 in Ubuntu12.04

Source: Internet
Author: User
For more information about Apache installation, see CompilingandInstalling. Ubuntu version: 12.04LTSApache version: Apachehttpd2.4.2 installation directory:/usr/local/development/httpd-2.4.2 source code Directory:/usr/local/src/httpd-2.4.21. Open the URL htt

For Apache installation instructions, see 《Compiling and Installing, Which makes it clearer.

Ubuntu version: 12.04 LTS

Apache version: Apache httpd 2.4.2

Installation Directory:/usr/local/development/httpd-2.4.2

Source Directory:/usr/local/src/httpd-2.4.2

 

1.Open URLHttp://httpd.apache.org/download.cgiDownload the corresponding apache(( this document selects the tar.gz source code version ).

2.Decompress the downloaded file/Usr/local/src/Httpd-2.4.2Directory.

3. Use the configure command to configure httpd.

sudo ./configure --prefix=/usr/local/development/http-2.4.2

4. configuration error. The Apache Portable Runtime library is missing. Download from http://apr.apache.org/AprAndApr-utilAnd decompress it/Usr/local/srsrc/httpd-2.4.2/srclibDirectory. Do not use the default decompressed directory name.

5. Carry-- With-Permission ded-apr option: reconfigure httpd.

sudo ./configure --prefix=/usr/local/development/http-2.4.2 --with-included-apr

6. There are still errors. This time, PCRE (Perl Compatible Regular Expressions) is missing ).

7. From the websiteHttp://www.pcre.org/Download and install PCRE.

Cd/usr/local/SrcSudo TarZxvf ~ /Download/pcre-8.30.Tar. Gzcd pcre-8.30/Sudo./Configure -- prefix =/usr/local/development/pcre-8.30Sudo MakeSudo Make Install

8. Configure httpd again with the -- with-pcre option. Oh, it's successful.

sudo ./configure --prefix=/usr/local/development/http-2.4.2 --with-included-apr --with-pcre=/usr/local/development/pcre-8.30

9. Compile and install httpd.

sudo makesudo make install

10.Configure apacheService, and then start.

cd /etc/init.dsudo ln -s /usr/local/development/http-2.4.2/bin/apachectlsudo /etc/init.d/apachectl start

11. The service is successfully started. Open your browser and try again.

12. Finally, we will configure to automatically start the apache service each time it is started.

sudo update-rc.d apachectl defaults

 

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.