apache+weblogic集群部署手册1文档格式.docx
- 文档编号:15340456
- 上传时间:2022-10-29
- 格式:DOCX
- 页数:29
- 大小:1.52MB
apache+weblogic集群部署手册1文档格式.docx
《apache+weblogic集群部署手册1文档格式.docx》由会员分享,可在线阅读,更多相关《apache+weblogic集群部署手册1文档格式.docx(29页珍藏版)》请在冰豆网上搜索。
五、安装过程中常遇问题及解决方法25
一、apache和weblogic集群构建的概念
1.1、概述
一般来说一个Web应用都分为动态内容(jsp,servlet,CGI)和静态内容(图片,文档,HTML)两部分内容。
而在很多地方,我们都没有把动态和静态内容进行分离,来提高应用的整体性能。
因此我们提出以下方案来满足我们的需求。
1.2、apache代理+weblogic整合方式部署的两种方式
方式一:
Apache只做代理服务器,整个web应用都部署在Weblogic中。
方式二:
不仅让Apache做前端代理服务器,而且将静态页面部署在Apache里,动态页面部署在Weblogic里。
1.3、两种方式的区别
方式一是将所有请求都由Apache转发到指定的Weblogic服务器。
方式二实现了动态页面和静态页面分开,当客户端请求静态页面时,直接使用Apache处理请求并返回给客户端,而客户端请求动态页面时,由Apache转发到指定的Weblogic服务器。
二、apache代理服务器安装步骤
2.1、部署环境
2.1.1、系统版本号
[root@csii~]#uname-a
Linuxcsii2.6.18-164.el5#1SMPTueAug1815:
51:
54EDT2009i686i686i386GNU/Linux
resolv.conf
[root@csii~]#more/etc/redhat-release
RedHatEnterpriseLinuxServerrelease5.4(Tikanga)
2.1.2、字符集时间配置
设定系统语言环境:
/etc/sysconfig/i18n为zh_CN.GBK
vi/etc/sysconfig/i18n
LANG="
zh_CN.GBK"
SUPPORTED="
zh_CN.GBK:
zh:
zh_CN.GB2312:
zh_CN.UTF-8:
zh_CN:
en_US.UTF-8:
en_US:
sSYSFONT="
latarcyrheb-sun16"
检查服务器的时区与时间是否设定正确:
正确时区应设定为:
ChinastandardTime(CST)中国标准时间。
执行cat/etc/sysconfig/clock看是否有以下3行显示,如果不是的话则需要做下面的修改步骤(或者执行timeconfig)
ZONE="
Asia/Shanghai"
UTC=false
ARC=false
修改步骤:
#mv/etc/localtime/etc/localtime.bak
#I-sf/I/share/I/Asia/Ietc/localtime
将时区文件(/etc/sysconfig/clock)更改为以下内容:
ZONE=Asia/Shanghai
2.1.3、源码包选择
httpd-2.2.8.tar.gz
2.2、安装步骤
#tarzxvfhttpd-2.2.8.tar.gz
#cd/software/httpd-2.2.8
#./configure--prefix=/usr/local/apache2--enable-so--enable-mods-shared="
proxyproxy_httpproxy_connect"
#make&
&
makeinstall
#/usr/local/apache2/bin/apachectlstart/stop
#cp/usr/local/apache2/bin/apachectl/etc/rc.d/init.d/httpd
#ln-s/etc/rc.d/init.d/httpd/etc/rc.d/rc5.d/S85httpd
编辑apache启动停止脚本
[root@csiihttpd-2.2.8]#vi/etc/rc.d/init.d/httpd
#!
/bin/bash
#Program:
#httpd
#History:
#
#StartupscriptfortheApache2.0.XWebServer
#chkconfig:
3458515
#description:
ApacheisaWorldWideWebserver.Itisusedtoserve\
#HTMLfilesandCGI.
#Sourcefunctionlibrary.
./etc/rc.d/init.d/functions
if[-f/etc/sysconfig/httpd];
then
./etc/sysconfig/httpd
fi
INITLOG_ARGS="
"
apachectl=/usr/local/apache2/bin/apachectl
httpd=${HTTPD-/usr/local/apache2/bin/httpd}
prog="
httpd"
start()
{
ps-ef|grep"
$prog"
|grep-v"
grep"
start"
>
/dev/null
if["
$?
-eq"
1"
];
echo-n$"
Starting$prog:
"
daemon$httpd$OPTIONS
ret=$?
echo
["
$ret"
0"
]&
touch/var/lock/subsys/httpd
return0
else
echo"
httpdrunning"
fi
}
stop()
statushttpd>
/dev/null>
1
ret_status=$?
if[$ret_status-eq2];
rm-f/var/lock/subsys/httpd/var/run/httpd.pid
httpdstopped"
elif[$ret_status-eq3];
fiecho-n$"
Stopping$prog:
killproc$httpd
case"
$1"
in
start)
start
;
;
stop)
stop
status)
statushttpd
restart)
sleep2
*)
echo$"
Usage:
$prog{start|stop|restart|status}"
exit1
esac
到此结束编辑退出;
#chkconfig--level345httpd
#chkconfig--addhttpd
出现以下情况表示安装成功
[root@csiihttpd-2.2.8]#servicehttpdrestart
停止httpd:
[确定]
启动httpd:
2.3、配置代理转发服务器
将Linux32位的weblogic转发模块mod_wl_22.so,cpmod_wl_22_for_linux_32.so/usr/local/apache2/modules/mod_wl_22.so(注意给新模块加执行权限)目录下,编辑httpd.conf文件,加入如下行:
例1
LoadModuleweblogic_modulemodules/mod_wl_22.so
<
IfModulemod_weblogic.c>
WebLogicHost10.1.1.8
WebLogicPort8001
MatchExpression/csii1
/IfModule>
WebLogicPort8002
MatchExpression/csii2
WebLogicPort8003
MatchExpression/csii3
例2
Location/ent>
SetHandlerweblogic-handler
WebLogicHost38.19.7.17
/Location>
Location/per>
Sethandlerweblogic-handler
WebLogicport8003
Location/mgmt>
WebLogicPort8005
测试:
(1)启动Apache,命令如下:
#servicehttpdstart
(2)在浏览器中分别输入:
http:
//10.1.1.8/csii1
//10.1.1.8/csii2
//10.1.1.8/csii3
(3)页面显示:
Itworks!
(这里是装好weblogic情况下,否则没有那些端口服务当然访问不了)
(4)安装成功。
三、weblogic安装步骤
3.1、部署环境
3.1.1、系统版本号
3.1.2、部署安装包
jdk-6u24-linux-i586.bi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- apache weblogic 集群 部署 手册
![提示](https://static.bdocx.com/images/bang_tan.gif)