Apache (httpd) installation
Apache is the name of a foundation, HTTPD is the package that we want to install, earlier its name is Apache
Apache official website www.apache.org
1. Download version 2.4 (this will be the version depends on the APR package)
Three packs to download (download to/usr/local/src)
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.29.tar.gz
wget http://mirrors.cnnic.cn/apache/apr/apr-1.6.3.tar.gz
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.6.1.tar.bz2
(Apr and Apr-util are a common library of functions, which allows httpd to be easily ported (from Linux to Windows) without caring for the underlying OS platform (yum download Apr and our httpd2.4 version are mismatched, so install the source package)
2. Unzip: Tar zxvf
(1) Tar zxvf httpd-2.4.29.tar.gz
(2) Tar zxvf apr-1.6.3.tar.gz
(3) Tar jxvf apr-util-1.6.1.tar.bz2 (because Apr-util is tar.bz2 decompression to use JXVF)
3. Installation:
Install Apr-->apr-util-->HTTPD First
(Because Apr-util relies on APR,HTTBD for Apr and Apr-util)
(1) Install Apr:
First enter into the APR directory:
cd/usr/local/src/apr-1.6.3
Then:./configure--prefix=/usr/local/apr
(You can use echo $ after executing the command. Check that the previous command was executed correctly)
Again: Make && makes install (making command is a compile operation)
(2) Installation Apr-util
First go to the directory:
cd/usr/local/src/apr-util-1.6.1
Then execute the. Configure (this is where the dependency package path should be added)
./configure--prefix=/usr/local/apr-util--with-apr=/usr/local/apr
Execute make && make install again
When this error occurs: A lookup is a expat development library (Yum install-y expat-devel)
Install expat-devel and perform make && make install
(3) Installing Apache (httpd)
First enter into the httpd directory
cd/usr/local/src/httpd-2.4.29
Then execute the. Configure--prefix
(To add two dependency packets Apr and Apr-util,--enable-so (can dynamically expand the module)
,--enable-mods-shared=most (Specify module for most))
./configure--prefix=/usr/local/apache2.4--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util-- Enable-so--enable-mods-shared=most
Error Pcre (pcre is a driver library for regular Expressions )
Yum List |grep Pcre
(Usually we install package name-devel\level package)
After installation, execute the command:
./configure--prefix=/usr/local/apache2.4--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util-- Enable-so--enable-mods-shared=most
Next: Make && make install
Error: Lack of XML, related libraries
After the installation process is re-executed, the successful
/view Apache-loaded modules
/usr/local/apache2.4/bin/httpd-m (HTTPT is a binary file)
(/usr/local/apache2.4/bin/apachectl-m is also able to see the loading module, in fact, here is the APACHECTL call httpd this file )
Start Apache after installation: (direct command line boot)
/usr/local/apache2.4/bin/apachectl start
See if success is turned on
LAMP (2) Apache (httpd) installation