日期:2014-05-17  浏览次数:20908 次

安装apache2.2.14
1、首先上传安装文件并解压

用到的命令:
guzip httpd-.tar.gz
tar xvf httpd-2.2.14.tar


2、却换到httpd-2.2.4目录。Cd httpd-2.2.4
3、执行./configure -C --enable-so --prefix /apache/apache2 --with-included-apr
……………………………………………………………………

creating test/Makefile
config.status: creating docs/conf/httpd.conf
config.status: creating docs/conf/extra/httpd-autoindex.conf
config.status: creating docs/conf/extra/httpd-dav.conf
config.status: creating docs/conf/extra/httpd-default.conf
config.status: creating docs/conf/extra/httpd-info.conf
config.status: creating docs/conf/extra/httpd-languages.conf
config.status: creating docs/conf/extra/httpd-manual.conf
config.status: creating docs/conf/extra/httpd-mpm.conf
config.status: creating docs/conf/extra/httpd-multilang-errordoc.conf
config.status: creating docs/conf/extra/httpd-ssl.conf
config.status: creating docs/conf/extra/httpd-userdir.conf
config.status: creating docs/conf/extra/httpd-vhosts.conf
config.status: creating include/ap_config_layout.h
config.status: creating support/apxs
config.status: creating support/apachectl
config.status: creating support/dbmmanage
config.status: creating support/envvars-std
config.status: creating support/log_server_status
config.status: creating support/logresolve.pl
config.status: creating support/phf_abuse_log.cgi
config.status: creating support/split-logfile
config.status: creating build/rules.mk
config.status: creating build/pkg/pkginfo
config.status: creating build/config_vars.sh
config.status: creating include/ap_config_auto.h
config.status: executing default commands
[bea@mylinux httpd-2.2.14]$



4、编译环境
# make


5、安装apache

[bea@mylinux httpd-2.2.14]$ make install


6、查看是否安装成功。切换到/apche/apche/bin目录。执行。./httpd –version可看到如下信息:
[root@mylinux bin]# ./httpd -version
Server version: Apache/2.2.14 (Unix)
Server built:   Mar  2 2010 13:12:38


7、切换到/apche/apche/conf目录编辑httpd.conf文件。在httpd.conf文件里的Dynamic Shared Object (DSO) Support
  </IfModule>添加:

<IfModule mod_weblogic.c>
Include conf/Weblogic.conf
LoadModule weblogic_module modules/mod_wl_22.so
<IfModule mod_weblogic.c>


8、上传Weblogic.conf到conf. Weblogic.conf文件内容为:

##### Weblogic.conf file
   WebLogicHost 192.168.0.55 
   WebLogicPort 8080
   MatchExpression *.jsp
   MatchExpression /portal/*
   MatchExpression /fortune/*
   MatchExpression /ClosingTime/*
   MatchExpression /ConfigItem/*
   MatchExpression *.html
   MatchExpression *.jpg
   MatchExpression *.gif
   MatchExpression *.css
   MatchExpression *.do
   WLLogFile /tmp/wlproxy.log

9、切换到/apche/apche/bin目录执行./httpd –t
[root@mylinux bin]# ./httpd -t
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.0.55 for ServerName
Syntax OK

报错的话,请在http.conf里添加ServerName  192.168.0.55:80


修改后:
[root@mylinux bin]# ./httpd -t
Syntax OK

启动和关闭Apache
安装完成后就可以启动Apache服务。Apache的启动关闭都是通过<Apache安装目录>        /bin目录下的apachectl命令进行管理的。启动Apache服务,如下所示。



./apachectl start



关闭Apache服务,如下所示。



./apachectl stop



重启Apache服务,如下所示。



./apachectl restart