Apache compilation and Installation

Source: Internet
Author: User

Lab environment:

Centos6.3

2.6.32-431.20.3.el6.i686


Packages used:

APR 1.5.1

Apr-util 1.5.3

Httpd-2.4.9


Procedure:

Step 1: Extract, compile, and install apr1.5.1 Based on the dependency

# Tar xf apr-1.5.1.tar.bz2-C/home

# D/home/apr-1.5.1

#./Configure -- prefix =/usr/local/APR

# Make & make install


Step 2: unzip, compile and install the apr-util-1.5.3

# Tar xf aprutil-1.5.3.tar.gz-C/home

# D/home/apr-util-1.5.3

#./Configure -- prefix =/usr/local/APR-util -- With-Apr =/usr/local/APR

# Make & make install


Step 3: unzip, compile and install the httpd-2.4.9

# Tar xf httpd-2.4.9.tar.bz2-C/home

# D/home/httpd-2.4.9

#. /Configure -- prefix =/usr/local/Apache -- sysconfdir =/etc/httpd24 -- enable-so -- enable-CGI -- enable-Rewrite -- With-zlib -- With-PCRE -- -Apr =/usr/local/APR -- With-Apr-util =/usr/local/APR-util -- enable-modules = most -- enable-MPMs-shared = all -- -MPM = event -- With-OpenSSL =/usr/local/OpenSSL

# Make & make install


Step 4: simple configuration and startup of httpd

CD/usr/local/Apache/

Ln-SV/usr/local/Apache/include/usr/include/httpd

Vim/etc/profile. d/httpd. sh \ declare path execution path

Exprot Path =/usr/local/Apache/bin: $ path

: WQ

/Etc/profile. d/httpd. sh \ execute the script

Apachectl start

CP/etc/rc. d/init. d/httpd/etc/rc. d/init. d/httpd24 \ modify the startup service file

Vim/etc/rc. d/init. d/httpd24

Apachectl =/usr/local/Apache/bin/apachectl

Httpd =$ {httpd-/usr/local/Apache/bin/httpd}

Pidfile =$ {pidfile-/usr/local/Apache/logs/httpd. PID}

: WQ

Service httpd stop

Service httpd24 start


Step 5: For more information about Apache configuration, see other documents.

this article from the "drop not Acacia tears throw red beans" blog, please be sure to keep this source http://beijgh.blog.51cto.com/8272564/1433395

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.