Download Apache 2.4 and dependent packages

Source: Internet
Author: User

Apache official website Download: http://httpd.apache.org/download.cgi

Because Apache relies on APR, Apr-util, and pcre, it needs to be downloaded:

APR + apr-util:http://apr.apache.org/download.cgi

Pcre:http://sourceforge.net/projects/pcre/files/pcre/

In this, I use the latest version of the current, Apache 1.4.6,apr 1.4.1,apr-util 2.4.1,perl 5.14.2,pcre 8.30

Install dependent APR and Apr-util installation

Decompress Apr and Apr-util

shell> sudo tar zxvf apr-1.4.6.tar.gz-c/opt/sourcesshell> sudo tar zxvf apr-util-1.4.1.tar.gz-c/opt/sources

Create the installation directory and create a soft link

shell> sudo mkdir/opt/software/develop/apr-1.4.6shell> sudo mkdir/opt/software/develop/apr-util-1.4.1shell > sudo ln-s/opt/software/develop/apr-1.4.6/usr/local/aprshell> sudo ln-s/opt/software/develop/apr-util-1.4.1 /usr/local/apr-util

Install Apr and Apr-util

Shell> cd/opt/sources/apr-1.4.6shell> sudo./configure--prefix=/usr/local/aprshell> sudo makeshell> sudo Make installshell> cd/opt/sources/apr-util-1.4.1shell> sudo./configure--prefix=/usr/local/apr-util-- with-apr=/usr/local/aprshell> sudo makeshell> sudo make install
Installing Pcre

First please make sure the system installed Perl,perl here no longer repeat, if necessary, please go to the official website to view the installation rules: http://www.cpan.org/src/README.html

Decompression Pcre

shell> sudo tar zxvf pcre-8.30.tar.gz-c/opt/sources

Create pcre installation directory and soft links

shell> sudo mkdir/opt/software/develop/pcre-8.30shell> sudo ln-s/opt/software/develop/pcre-8.30/usr/local/ Pcre

Installing Pcre

Shell> cd/opt/sources/pcre-8.30shell> sudo./configure--prefix=/usr/local/pcreshell> sudo makeshell> sudo make install
Installing Apache 2.4

Unzip Apache 2.4

shell> sudo tar zxvf httpd-2.4.2.tar.gz-c/opt/sources

Create Apache installation directory and soft links

shell> sudo mkdir/opt/software/develop/httpd-2.4.2shell> sudo ln-s/opt/software/develop/httpd-2.4.2/usr/ Local/apache2

Installing Apache

Shell> cd/opt/sources/httpd-2.4.2# Here Please configure the environment you want to build, I am here to configure the PHP environment shell> sudo./configure--prefix=/usr/local /apache2--enable-so--enable-rewrite=shared--with-mpm=prefork--with-apr=/usr/local/apr--with-apr-util=/usr/ Local/apr-util--with-pcre=/usr/local/pcreshell> sudo makeshell> sudo make install
Launch Apache

Start Apach with Apachectl

Shell> Sudo/usr/local/apache2/bin/apachectl Start

Check if there is an Apache process

shell> PS aux | grep httpd

If there is Apache process, then prove the success of the launch, the browser address bar input http://localhost Try it ~

After successful startup, you can copy the Apachectl to/ETC/INIT.D and start as a service.

shell> sudo cp/usr/local/apache2/bin/apachectl/etc/init.d/httpdshell> sudo service httpd start

Download Apache 2.4 and dependent packages

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.