LINUX under source installation Apache

Source: Internet
Author: User

Operating system CentOS 7

Linux, the default Apache installation software, the path is as the development of software personnel's habits, in the development process will often not know to the required program path, so the manual installation program for the subsequent use will provide a great convenience

A: Prepare

1. Install Apr
: http://apr.apache.org/download.cgi

[Email protected]:/usr/local/src]# tar zxvf apr-1.5.2.tar.gz

[[Email protected]:/usr/local/src/apr-1.5.2]#./configure--PREFIX=/USR/LCOAL/APR

[[Email protected]:/usr/local/src/apr-1.5.2]# make

[[Email protected]:/usr/local/src/apr-1.5.2]# make install


2. Installing Apr-util
: http://apr.apache.org/download.cgi
[Email protected]:/usr/local/src]# tar zxvf apr-util-1.5.4.tar.gz
[[Email protected]:/usr/local/src/apr-util-1.5.4]#./configure--prefix=/usr/lcoal/apr-util--with-apr=/usr/lcoal/ Apr

[[Email protected]:/usr/local/src/apr-util-1.5.4]# make

[[Email protected]:/usr/local/src/apr-util-1.5.4]# make install


3. Installing Pcre
: http://pcre.org/
[Email protected]:/usr/local/src]# tar jxvf pcre-8.37.tar.gz
[[Email protected]:/usr/local/src/pcre-8.37]#./configure--prefix=/usr/lcoal/pcre

[[Email protected]:/usr/local/src/pcre-8.37]# make

[[Email protected]:/usr/local/src/pcre-8.37]# make install


Note: If you encounter problems when you install Pcre: Configure:error:You need a C + + compiler for C + + support.
Workaround:yum install-y gcc gcc-c++

II: Install Apache

: http://httpd.apache.org/
[Email protected]:/usr/local/src]# tar zxvf httpd-2.4.16.tar.gz
[Email protected]:/usr/local/src/httpd-2.4.16]#/configure--prefix=/usr/lcoal/apache--WITH-APR=/USR/LCOAL/APR- -with-apr-util=/usr/lcoal/apr-util--with-pcre=/usr/lcoal/pcre

[[Email protected]:/usr/local/src/httpd-2.4.16]# make

[[Email protected]:/usr/local/src/httpd-2.4.16]# make install

Three: Configuration

1. Start
[[email protected]:/usr/local/apache]#./bin/apachectl start

2. Boot up
Open File:/etc/rc.local
[[Email protected]:/]# vim/etc/rc.local

Added:/work/installed/apache/bin/apachectl start

OK, http://localhost OR http://ip.

LINUX under source installation Apache

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.