For more information about Apache installation, see CompilingandInstalling. Ubuntu version: 12.04LTSApache version: Apachehttpd2.4.2 installation directory:/usr/local/development/httpd-2.4.2 source code Directory:/usr/local/src/httpd-2.4.21. Open the URL htt
For Apache installation instructions, see 《Compiling and Installing, Which makes it clearer.
Ubuntu version: 12.04 LTS
Apache version: Apache httpd 2.4.2
Installation Directory:/usr/local/development/httpd-2.4.2
Source Directory:/usr/local/src/httpd-2.4.2
1.Open URLHttp://httpd.apache.org/download.cgiDownload the corresponding apache(( this document selects the tar.gz source code version ).
2.Decompress the downloaded file/Usr/local/src/Httpd-2.4.2Directory.
3. Use the configure command to configure httpd.
sudo ./configure --prefix=/usr/local/development/http-2.4.2
4. configuration error. The Apache Portable Runtime library is missing. Download from http://apr.apache.org/AprAndApr-utilAnd decompress it/Usr/local/srsrc/httpd-2.4.2/srclibDirectory. Do not use the default decompressed directory name.
5. Carry-- With-Permission ded-apr option: reconfigure httpd.
sudo ./configure --prefix=/usr/local/development/http-2.4.2 --with-included-apr
6. There are still errors. This time, PCRE (Perl Compatible Regular Expressions) is missing ).
7. From the websiteHttp://www.pcre.org/Download and install PCRE.
Cd/usr/local/SrcSudo TarZxvf ~ /Download/pcre-8.30.Tar. Gzcd pcre-8.30/Sudo./Configure -- prefix =/usr/local/development/pcre-8.30Sudo MakeSudo Make Install
8. Configure httpd again with the -- with-pcre option. Oh, it's successful.
sudo ./configure --prefix=/usr/local/development/http-2.4.2 --with-included-apr --with-pcre=/usr/local/development/pcre-8.30
9. Compile and install httpd.
sudo makesudo make install
10.Configure apacheService, and then start.
cd /etc/init.dsudo ln -s /usr/local/development/http-2.4.2/bin/apachectlsudo /etc/init.d/apachectl start
11. The service is successfully started. Open your browser and try again.
12. Finally, we will configure to automatically start the apache service each time it is started.
sudo update-rc.d apachectl defaults