Test environment: UbuntuServer14.101. Installation preparation a) cd/usr/local/srcb) sudowgethttp: // pai.bit.edu.cn/apache/apr/apr-1.5.1.tar.gzc)
Test environment: Ubuntu Server 14.10
1. Installation preparation
A) cd/usr/local/src
B) sudo wget http://mirror.bit.edu.cn/apache/apr/apr-1.5.1.tar.gz
C) sudo wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
D) sudo wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.4.12.tar.gz
2. install necessary tools
Sudo apt-get install libpcre3 libpcre3-dev openssl libssl-dev
3. decompress and configure
A) tar-zxvf httpd-2.4.12
B) tar-zxvf arp-1.5.1
C) tar-zxvf arp-util-1.5.4
D) cp-rf apr-1.5.1 httpd-2.4.12/srclinb/apr
E) cp-rf apr-util-1.5.4 httpd-2.4.12/srclinb/apr-util
F. cd httpd-2.4.12/
G) sudo./configure.
-- Prefix =/usr/local/apache
-- With-apr =/usr/local/apr
-- With-apr-util =/usr/local/apr-util
-- With-pcre =/usr/local/pcre
-- With-defined ded-apr
-- With-ssl
-- Enable-ssl
-- Enable-module = so
-- Enable-rewrite
-- Enable-cgid
-- Enable-cgi # Configuration
Note: check errors during apache installation
Checking for APR-util... No
Configure: error: APR-util not found. Please read the specified mention.
You need to install pcre in the/usr/local directory
# Tar-zxvf pcre-8.32.tar.gz
# Cd pcre-8.32
#./Configure -- prefix =/usr/local/pcre
# Make
# Make install
H) sudo make-j4
I) sudo make install
4. simple configuration after installation
A) sudo cp build/rpm/httpd. init/etc/init. d/httpd
B) sudo chmod 755/etc/init. d/httpd
C) sudo ln-fs/usr/local/apache // etc/httpd
D) sudo ln-fs/usr/local/apache/bin/httpd/usr/sbin/httpd
E) sudo ln-fs/usr/local/apache/bin/apachectl/usr/sbin/apachectl
F) sudo ln-fs/usr/local/apache/logs/var/log/httpd
G) sudo ln-s/usr/local/apache/conf/httpd. conf/etc/
5. Simple Test
A) modify the./apache/conf/httpd. cof configuration file.
I. Find Listen 80, open the comment, and change it to 0.0.0.0: 8081,80, which may be occupied by other services.
Ii. Add index. php to DirectoryIndex
Iii. Remove the following two Annotations:
1. # include conf/extra/httpd-mpm.cof
2. # include conf/extra/httpd-default.cof
Iv. Find ServerName and open the comment to change the ServerName value to the corresponding IP address.
B) Save the changes to the httpd. cof file and start the apache service.
I. sudo apachectl start
Ii. netstat-ant check whether the httpd service is started
C) if It works normally, use IP: 8081 to access It works! Success.
------------------------------------- I am a split line -------------------------------------
How does Apache Rewrite in Ubuntu enable http://www.linuxidc.com/Linux/2010-10/29027.htm?
Several highlights of http://www.linuxidc.com/Linux/2015-01/111914.htm after Apache 14.04 upgrade to 2.2 in Ubuntu 2.4
Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04Http://www.linuxidc.com/Linux/2013-06/86250.htm
Compile and install LAMP (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12) http://www.linuxidc.com/Linux/2013-03/80333p3.htm in CentOS 5.9
Source code construction of Web Server Architecture in RedHat 5.4 LAMP environment and application PHPWind http://www.linuxidc.com/Linux/2012-10/72484p2.htm
LAMP source environment to build WEB Server Linux + Apache + MySQL + PHP http://www.linuxidc.com/Linux/2013-05/84882.htm
-------------------------------------- Split line --------------------------------------
Apache details: Click here
Apache: Click here
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-05/117656.htm