Before installing Apache, we need to install APR, and APR-related apr-util, and pcre these three things.
Apr is the Apache Portable runtime, Pcre is a Perl library, including a Perl-compatible regular expression library.
The installation of these three files is similar and will be detailed later.
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > My system is CentOS6.2 (ensure installed g++, the rear will say installation g++) , prepare four files:
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > 1.pcre-8.31.tar.bz2
2. apr-1.5.1.tar.gz
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > 3.pcre-8.30.tar.bz2
4.httpd-2.4.10.tar.bz2
I generally unpacked the installation package under the/usr/local/src/;
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > Decompression Method tar-jxvf Pcre-8.31.tar.bz2
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > &NBSP;TAR-ZXVF apr-1.5.1.tar.gz
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >
First install Apr
#cd/usr/src/apr-1.4.6
#./configure--prefix=/usr/local/apr && make && make install
Next Install Apr-util
#cd/usr/src/apr-util-1.3.8
#./configure--prefix=/usr/local/apr-util-with-apr=/usr/local/apr/bin/apr-1-config && make && make Install
Finally install the Pcre (if not installed g++, this step is not going to go on, the later will say how to install)
#cd/usr/src/pcre-8.30
#./configure--prefix=/usr/local/pcre && make && make install
Now that the preparations are complete, Apache can now be installed.
#cd/usr/src/httpd-2.4.3
#./configure--prefix=/usr/local/apache2--with-apr=/usr/local/apr--with-apr-util=/usr/local/apr-util/-- With-pcre=/usr/local/pcre--enable-so--enable-rewrite && make && make install
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " >
< Span style= "Font-family:tahoma, Arial, ' song Body '; Font-size:14px;line-height:25px;text-indent:28px;background-color:rgb (255,255,255); " > So until now, if there is no error, then it proves that Apache is installed.
#service httpd start Apache, test 127.0.0.1 to the browser.
The next article describes the installation of g++. What questions can be sent to [email protected] Welcome to correct, common communication, less detours.