Install package httpd-2.2.29.tar.bz2 (can go to the website to view the latest version:http://httpd.apache.org/security_report.html)
TAR-JXVF httpd-2.2.29.tar.bz2
CD httpd-2.2.29
[Email protected] httpd-2.2.29]#/configure--prefix=/usr/local/apache
If a compilation error occurs, you will need to install GCC RPM-IVH gcc-4.4.7-11.el6.x86_64.rpm (prompting for additional packages)
To report this reliance
Libmpfr.so.1 is needed by cpp-4.4.4-13.el6.i686
Libppl.so.7 is needed by cloog-ppl-0.15.7-1.2.el6.i686
Libppl_c.so.2 is needed by cloog-ppl-0.15.7-1.2.el6.i686
The two packages are missing ...
mpfr-2.4.1-6.el6.x86_64.rpm
ppl-0.10.2-11.el6.x86_64.rpm
After the two are installed, you can install CPP and CLOOG-PPL, and then you can install GCC ...
[[email protected] httpd-2.2.29]# make
..... Compiler
[[email protected] httpd-2.2.29]# make install
..... Installation
Start
[Email protected] httpd-2.2.29]# Cd/usr/local/apache/bin
[[email protected] bin]#./httpd-k start
If the error:
ServerName Error occurred
Modify/usr/local/apache/conf/httpd.conf
Join ServerName 127.0.0.1:80
As follows
#ServerName www.example.com:80
ServerName 127.0.0.1:80
[[email protected] bin] #ps-ef |grep httpd
Daemon 11894 11890 0 15:05? 00:00:00./httpd-k Start
Daemon 11895 11890 0 15:05? 00:00:00./httpd-k Start
Daemon 11900 11890 0 15:05? 00:00:00./httpd-k Start
Verifying http://localhost (Installation host)
If it ' s work! appears is successful.
Shut down
[[email protected] bin]#./httpd-k stop
Configuring the connection Tomcat needs to join the module Mod_proxy (Reference document: http://blog.csdn.net/shw2004/article/details/5781302)
Actual operation
(
[Email protected] proxy]# Cd/usr/local/src/soft/apache/httpd-2.2.29/modules/proxy
[Email protected] proxy]#/usr/local/apache/bin/apxs-c-i-a mod_proxy.c proxy_util.c
[Email protected] proxy]#/usr/local/apache/bin/apxs-c-i-a mod_proxy_connect.c proxy_util.c
[Email protected] proxy]#/usr/local/apache/bin/apxs-c-i-a mod_proxy_ftp.c proxy_util.c
[Email protected] proxy]#/usr/local/apache/bin/apxs-c-i-a mod_proxy_http.c proxy_util.c
[Email protected] proxy]#/usr/local/apache/bin/apxs-c-i-a mod_proxy_ajp.c ajp*.c
[Email protected] proxy]#/usr/local/apache/bin/apxs-c-i-a mod_proxy_balancer.c proxy_util.c
Configure httpd.conf
[Email protected] proxy]# cd/usr/local/apache/conf/
[Email protected] conf]# VI httpd.conf
--Add the following paragraph at the end of the document
<virtualhost *:80>
Proxypreservehost on
proxypass/http://target_host:prot/
proxypassreverse/http://target_host:port/
Proxypassreversecookiepath//
</VirtualHost>
)
Note: Target_host and port are required for Apache to convert Tomcat hosts and ports, this link will be able to access the normal.
Restart HTTPD Service (Apache)
Installing Apache on Linux (httpd)