Manual installation of Apache under Linux detailed

Source: Internet
Author: User
Tags fully qualified domain name

Operating system: ubuntu12.04

Objective:
Linux, the default installation software, in the development process will often not know what path to find the required program, so the manual installation program for the subsequent use will provide very convenient. Here, take the example of installing Apache.


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

[Email protected]:/work/soft/apache]# tar jxvf apr-1.5.0. tar.bz2

[Email protected] @ubuntu:/work/soft/apache/apr-1.5.0]# /configure--prefix=/work/installed/apr

[Email protected] @ubuntu:/work/soft/apache/apr-1.5.0]# make

[[Email protected] @ubuntu:/work/soft/apache/apr-1.5.0]# make install


2, install Apr-util
:http://apr.apache.org/download.cgi
[Email protected]:/work/soft/apache]# tar jxvf apr-util-1.5.3. tar.bz2

[Email protected] @ubuntu:/work/soft/apache/apr-util-1.5.3]# /configure--prefix=/work/installed/apr-util-- with-apr=/work/installed/apr

[Email protected] @ubuntu:/work/soft/apache/apr-util-1.5.3]# make

[[Email protected] @ubuntu:/work/soft/apache/apr-util-1.5.3]# make install


3, install Pcre
: http://pcre.org/
[Email protected]:/work/soft/apache]# tar jxvf pcre-8.35. tar.bz2

[Email protected] @ubuntu:/work/soft/apache/pcre-8.35]# /configure--prefix=/work/installed/pcre

[Email protected] @ubuntu:/work/soft/apache/pcre-8.35]# make

[[Email protected] @ubuntu:/work/soft/apache/pcre-8.35]# make install


Note : If you encounter problems when you install Pcre: Configure:error:You need a C + + compiler for C + + support.
workaround :sudo apt-get install build-Essential


Second, install Apache
: http://httpd.apache.org/
[Email protected]:/work/soft/apache]# tar jxvf httpd-2.4.9.tar.bz2

[Email protected] @ubuntu:/work/soft/apache/httpd-2.4.9]# /configure--prefix=/work/installed/apache-- WITH-APR=/WORK/INSTALLED/APR--with-apr-util=/work/installed/apr-util--with-pcre=/work/installed/pcre

[Email protected] @ubuntu:/work/soft/apache/httpd-2.4.9]# make

[[Email protected] @ubuntu:/work/soft/apache/httpd-2.4.9]# make install



Three, configure
1. Modify the configuration file
Otherwise, there will be a problem:
AH00558:httpd:Could not reliably determine the server ' s fully qualified domain name, using 127.0.1.1. Set the ' ServerName ' directive globally to suppress this message
Workaround:
[[Email protected]:/work/installed/apache]#sudo gedit conf/httpd.conf
Put
ServerName www.example.com:80
Switch
ServerName localhost:80


2, start
[[Email protected]:/work/installed/apache]#./bin/apachectl Start


3, boot up
Open File:/etc/rc.local
[[Email protected]:/]#sudo gedit/etc/rc.local

Add to:/work/installed/apache/bin/apachectl Start


Four, reference file
1,http://blog.csdn.net/chenxiaohua/article/details/2047757
2,http://blog.163.com/hlz_2599/blog/static/142378474201182811611382/

Manual installation of Apache under Linux detailed

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.