Apache
实现
weblogic
集群配置
字体
: 小 中 大 | 打印
发表于
: 2008-4-15 20:09
作者
: ibmaix
来源
:
中国信息网
Apache
实现
weblogic
集群配置
<!--[if !vml]--> <!--[endif]-->
1
、在两个不同的服务器分别创建
domian
,并部署应用程序,要求每个
domain
能单独正常运行。
A
、创建
domain
在
bea
的安装目录下
weblogic81commonbin
目录中找到
config.cmd
文件,双击出现
BEA Weblogic Configuration Wizard
窗口
,创建或扩展配置
<!--[if !vml]--> <!--[endif]-->
选择
“
新建
WebLogic
配置”点击下一步,如下图
<!--[if !vml]--> <!--[endif]-->
选择“
Basic Weblogic Server Domain
”
配置模板,进入下一步,
<!--[if !vml]--> <!--[endif]-->
默认设置,点击“下一步”
<!--[if !vml]--> <!--[endif]-->
设置
user name
、
password
,下一步进入配置服务器启动模式和
java jdk
。
<!--[if !vml]--> <!--[endif]-->
选择相应的模式,若选择生产模式需要设置相应的启动密码。在选择
sun JDK
,点击下一步进入创建
Weblogic
配置界面,如下图
<!--[if !vml]--> <!--[endif]-->
点击浏览将
domain
创建到
D:Applications
目录下
,点击创建完成
domain
的创建工作。
B
、配置数据源和部署应用程序
<!--[if !vml]--> <!--[endif]-->
图
1
应用程序目录结构
1
、配置
ClassPath
在
D:Applicationsmydomain
目录下找到
startWeblogic.cmd
用文本编辑器打开
,在文件中
set SERVER_NAME=myserver
后面插入下面内容,
echo *************************************************** echo *
设置应用程序的
ClassPath
路径
* echo * Set webapp classpath * set APP_PATH=D:Applications set APP_CLASSPATH_CONFIG=%APP_PATH%APPConfig
set APP_CLASSPATH=%APP_CLASSPATH_CONFIG% echo * Set gis classpath * set GIS_PATH=%APP_PATH% set GIS_CLASSPATH_CONFIG=%GIS_PATH%GISConfig
set GIS_CLASSPATH=%GIS_CLASSPATH_CONFIG% echo ***************************************************
set CLASSPATH=%APP_CLASSPATH%;%GIS_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%jrelibrt.jar;%WL_HOME%serverlibwebservices.jar;%CLASSPATH%
|
删除下面的内容:
set CLASSPATH=%WEBLOGIC_CLASSPATH%;%POINTBASE_CLASSPATH%;%JAVA_HOME%jrelibrt.jar;%WL_HOME%serverlibwebservices.jar;%CLASSPATH%
删完了,进入第二步。
2
、启动
weblogic
在
D:Applicationsmydomain
目录下找到
startWeblogic.cmd
启动
weblogic
。
3
、配置数据源和部署应用程序
首先进入
Weblogic
控制台,点击
这里[url]http://localhost:7001/console[/url]
就可以了。输入在创建
domain
时的设置的管理用户及密码。如下图
<!--[if !vml]--> <!--[endif]-->
<!--[if !vml]--> <!--[endif]-->
好了吗?
找到
“
服务配置”―
> ”JDBC”
―
> ”
连接缓冲池
“
进入
JDBC
连接缓冲池管理页面,如下图。
<!--[if !vml]--> <!--[endif]-->
配置新的
JDBC
连接缓冲池,这里就不多说了。
然后就是配置数据源,这里也不多说了。
最后就是部署应用程序
WebApp
、
WebGIS
、
mapxtreme471
、
WelcomeApp
部署完后测试程序是否正常运行(
web
、
gis
)。
Ok
进入下面的步骤。
2
、安装
apache
,安装相对稳定的版本。如果安装后测试能否正常启动,可以通过访问
[url]http://loaclhost[/url]
进行测试。下面是
apache
的安装过程:
<!--[if !vml]--> <!--[endif]-->
点击
Next
,进入下图界面,
<!--[if !vml]--> <!--[endif]-->
选择
I accept the terms in the license agreement
项
Next
。默认设置一路回车,进入下图界面。
<!--[if !vml]--> <!--[endif]-->
<!--[if !vml]--> <!--[endif]-->
Next
,下面的才采用默认配置,可以更改安装目录,然后
next
进行安装。安装完成后可以,通过
[url]http://localhost[/url]
测试。是否成功安装。
<!--[if !vml]--> <!--[endif]-->
3
、将
bea
安装目录
weblogic81/server/bin
下的
mod_wl_20.so
文件
copy
到
apache
安装目录下
Apache2/modules/
目录下
<!--[if !vml]--> <!--[endif]-->
<!--[if !vml]--> <!--[endif]-->
4
、
Apache
中增加
Weblogic
模块
在
apache2
的安装目录下找到
conf
目录如图
<!--[if !vml]--> <!--[endif]-->
为了防止出错,修改前先备份。在
httpd.conf
中添加下面的几行,
LoadModule weblogic_module
modules/mod_wl_20.so
#############################
<IfModule mod_weblogic.c>
WebLogicCluster 192.168.0.100:7001,192.168.0.52:7001
MatchExpression *.jsp
MatchExpression *.*
MatchExpression *
</IfModule>
################################
重启
apache
。
注:
192.168.0.100:7001,192.168.0.52:7001
分别是两台
weblogic
服务器的
ip
及端口。
5
、修改
AppConfig
下边的
gisServer.properties
文件,将
serverip
改为
apache
的地址,
serverport
改为
apache
的端口。
6
、修改
GisConfig
下边的
cabletech_gis_system.properties
文件,将
serverIP
、
mapServerIP
改为
apache
的
id
地址,
serverPort
、
mapServerPort
改为
apache
的端口。
集群部署后出现的问题:
<!--[if !supportLists]-->1
、
<!--[endif]-->
上传文件有可能找不到。
解决办法:
win
将现有(
A
机子)的
upload
目录共享。在另一台机子(
B
机子)上找到共享的
upload
目录,如图
<!--[if !vml]--><!--[endif]-->
在
upload
上右击点击“映射网络驱动器
…
”
会出来下面的对话框
<!--[if !vml]--><!--[endif]-->
选择驱动器,我选的是
Y
;点击完成,
OK
。
还有一步,修改下
B
机子上的名为
gisServer.properties
的配置文件,将下面这行
uploadroot=d:upload
改为:
uploadroot=y:
好了,
ok
。
Linux
环境:待续
<!--[if !supportLists]-->2
、
<!--[endif]-->
查看在线人员登陆
ip
问题。
通过配置
Apache
可以解决。