1、首先上传安装文件并解压
用到的命令:
guziphttpd-.tar.gz
tarxvfhttpd-2.2.14.tar
2、却换到httpd-2.2.4目录。Cdhttpd-2.2.4
3、执行./configure-C--enable-so--prefix/apache/apache2--with-included-apr
……………………………………………………………………
creatingtest/Makefile
config.status:creatingdocs/conf/httpd.conf
config.status:creatingdocs/conf/extra/httpd-autoindex.conf
config.status:creatingdocs/conf/extra/httpd-dav.conf
config.status:creatingdocs/conf/extra/httpd-default.conf
config.status:creatingdocs/conf/extra/httpd-info.conf
config.status:creatingdocs/conf/extra/httpd-languages.conf
config.status:creatingdocs/conf/extra/httpd-manual.conf
config.status:creatingdocs/conf/extra/httpd-mpm.conf
config.status:creatingdocs/conf/extra/httpd-multilang-errordoc.conf
config.status:creatingdocs/conf/extra/httpd-ssl.conf
config.status:creatingdocs/conf/extra/httpd-userdir.conf
config.status:creatingdocs/conf/extra/httpd-vhosts.conf
config.status:creatinginclude/ap_config_layout.h
config.status:creatingsupport/apxs
config.status:creatingsupport/apachectl
config.status:creatingsupport/dbmmanage
config.status:creatingsupport/envvars-std
config.status:creatingsupport/log_server_status
config.status:creatingsupport/logresolve.pl
config.status:creatingsupport/phf_abuse_log.cgi
config.status:creatingsupport/split-logfile
config.status:creatingbuild/rules.mk
config.status:creatingbuild/pkg/pkginfo
config.status:creatingbuild/config_vars.sh
config.status:creatinginclude/ap_config_auto.h
config.status:executingdefaultcommands
4、编译环境
#make
5、安装apache
[[email protected]]$makeinstall
6、查看是否安装成功。切换到/apche/apche/bin目录。执行。./httpd–version可看到如下信息:
[root@mylinuxbin]#./httpd-version
Serverversion:Apache/2.2.14(Unix)
Serverbuilt:Mar2201013:12:38
7、切换到/apche/apche/conf目录编辑httpd.conf文件。在httpd.conf文件里的DynamicSharedObject(DSO)Support
</IfModule>添加:
<IfModulemod_weblogic.c>
Includeconf/Weblogic.conf
LoadModuleweblogic_modulemodules/mod_wl_22.so
<IfModulemod_weblogic.c>
8、上传Weblogic.conf到conf.Weblogic.conf文件内容为:
#####Weblogic.conffile
WebLogicHost192.168.0.55
WebLogicPort8080
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@mylinuxbin]#./httpd-t
httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,using192.168.0.55forServerName
SyntaxOK
报错的话,请在http.conf里添加ServerName192.168.0.55:80
修改后:
[root@mylinuxbin]#./httpd-t
SyntaxOK
启动和关闭Apache
安装完成后就可以启动Apache服务。Apache的启动关闭都是通过<Apache安装目录>/bin目录下的apachectl命令进行管理的。启动Apache服务,如下所示。
./apachectlstart
关闭Apache服务,如下所示。
./apachectlstop
重启Apache服务,如下所示。
./apachectlrestart