One: Why to compile the installation
There are serious vulnerabilities in previous versions, and you want to use the features of the new version.
Two: how to compile and install apache2.4
To prepare before compiling:
The HTTPD program relies on Apr and Apr-util
Apr: Equivalent to httpd running virtual machine, can be applied to a variety of platforms.
1) To compile the installer, you must install the set of packages that are compiled and installed.
CENTOS6 development-related package groups: Development Tools Server Platform Development Desktop Platform Development
2) Get the package groups necessary to compile the installation
Apr; Apr-util; httpd
3) compile and install Apr
Tar XF apr-1.5.0.tar.bz2 CD apr-1.5.0 If you want to get help with compiling the installation, you can do so after entering this directory./configure--help | Less learns to view compiled installation information. The options in the Configure contain the-H help information. -V version information. -Q exits the message. --prefix= prefix specifies the path to the installation, and the default installation path is shown later. Specifies the path location of the installation--prefix=/usr/local/apr./configure--prefix=/usr/local/apr at this point into the compile and install inspection phase. Make && make install enters the installation phase
4) Compile and install Apr-util
Tar XF apr-util CD apr-util view Help information optional packages describes what information is dependent on installing this package. --WITH-APR = path describes where to rely on the APR installation path. ./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR
5) Compile and install httpd
./configure--prefix=/usr/local/apache--sysconfdir=/etc/httpd--enable-so--enable-ssl--enable-cgi-- Enable-rewrite--with-zlib--with-pcre--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/-- Enable-shared=all--with-mpm=event--enable-modules=most--prefix: Specify the path of the installation--sysconfdir: Specify the path to the main profile--enable-so: Specify that you want to install the dynamic load module--enable-ssl: Specify that you want to install the SSL module--enable-cgi: Specify install CGI module--enable-rewrite: Specify installation URL path rewrite module--with-zlib: Rely on zlib Compress package--with-pcre: Rely on Prel's pcre package--WITH-APR: Rely on Apr module--with-apr-util: Apr-util module--enable-shared: Install all MPM modules--with-mpm= Event: The default boot event module--enable-modules=most: Installs most of the default modules.
6) After the compilation is complete, add the startup item
Startup file location in/usr/local/apached2.4/bin/apachectl if you want to add to the global startup file, you can edit the/etc/profile.d/httpd24.shexport path=/usr/local/ Apache2.4/bin: $PATHsource/etc/profile.d/httpd24.sh
Characteristics of httpd2.4
1) mpm in run fashion load:--enable-mpm-shared=all--with-mpm={prefork|worker|event} 2) Support event MPM 3) Support asynchronous read/write 4) in each module and Directories using different log level 5) not requested configuration 6) Enhanced Expression Analyzer 7) millisecond-level keepalive 8) FQDN-based virtual machines
Compile the contents of the installation directory:
Bin Buildhtdocs: Default installed page document cgi-bin:error: Error page logs: Log man:man document
This article is from the "Slayer" blog, make sure to keep this source http://slayer.blog.51cto.com/4845839/1668619
Compiling the installation Web service