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)