Install Apache using the source code in Linux

Source: Internet
Author: User

Environment: Ubuntu 10.04 + httpd-2.2.17

Download http://www.apache.org/dist/httpd/ files from httpd-2.2.17.tar.gz

Save to/root/download directory

Command list:

CD/root/download

Tar-zxvf httpd-2.2.17.tar.gz

CD httpd-2.2.17

 

./Configure -- prefix =/usr/local/apache2 -- enable-module = so -- enable-mod-shared = most

# If the following error occurs:

Configure: Error: mod_deflate has been requested but can not be built due to prerequisite failures

Run the following command:

Apt-Get install zlib1g-dev

 

 

Make

Make install

 

Start the service

/Usr/local/apache2/bin/apachectl start

If the following prompt appears:

Httpd: cocould not reliably determine the server's fully qualified domain name, using 127.0.1.1 for servername

In the/usr/local/apache2/CONF/httpd. conf file, add

Servername 127.0.0.1: 80

 

Configure Automatic Start upon startup

# Create a link file to/usr/local/apache2/bin/apachectl

Ln-S/usr/local/apache2/bin/apachectl/etc/init. d/apache2

# Load as a service

Update-rc.d (apache2 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.