tuxedo详细安装步骤.docx
- 文档编号:23920185
- 上传时间:2023-05-22
- 格式:DOCX
- 页数:31
- 大小:42.66KB
tuxedo详细安装步骤.docx
《tuxedo详细安装步骤.docx》由会员分享,可在线阅读,更多相关《tuxedo详细安装步骤.docx(31页珍藏版)》请在冰豆网上搜索。
tuxedo详细安装步骤
Tuxedo使用Non-XA模式连接Oracle数据库
实验的网络拓扑图:
软件安装环境:
3台主机都安装CentOS5.3操作系统,第1台主机作为Tuxedo的客户端,只安装Tuxedo客户端(IP:
192.168.1.61);第2台主机作为Tuxedo服务器安装TuxedoServer,还要连接Oracle服务器,还安装了OracleClient11gR2(IP:
192.168.1.66);第三台主机作为Oracle数据库服务器,只安装Oracle11gR2(IP:
192.168.1.81)。
实验目的:
了解Tuxedo使用Non-XA方式连接Oracle数据库。
通过客户端发送一个请求到Tuxedo服务器,再由Tuxedo服务器连接Oracle服务器,把客户端发送的信息写入数据库表。
实验步骤:
1.安装Tuxedo的演示程序SimpApp(使用主机1和主机2)
2.作一个Pro/C的Demo,来连接Oracle数据库(使用主机2和主机3)
3.把第1步和第2步合并到一起,完成该实验
4.测试并排错
安装前准备:
要使Tuxedo服务器,能连接到Oracle服务器。
Oracle服务器的实例名称为stone,在Tuxedo服务器上安装Oracle客户端后,建立一个服务,使其能够连接到Oracle数据库服务器。
在TuxedoServer(主机2)上,先建立网络服务,再连接到Oracle数据库服务器,使用hr用户,并建立一个测试表:
◆网络服务的名称为stone,结果为$ORACLE_HOME/network/admin目录下的tnsnames.ora文件
[oracle@myapache~]$cd/u01/app/oracle/product/11.2.0/client_1/network/admin/
[oracle@myapacheadmin]$ls
samples shrept.lst sqlnet10031011AM2455.bak sqlnet.ora tnsnames.ora
[oracle@myapacheadmin]$vitnsnames.ora
#tnsnames.oraNetworkConfigurationFile:
/u01/app/oracle/product/11.2.0/client_1/network/admin/tnsnames.ora
#GeneratedbyOracleconfigurationtools.
STONE=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.81)(PORT=1521))
)
(CONNECT_DATA=
(SERVICE_NAME=stone)
)
)
◆建立测试表
[oracle@myapache~]$sqlplushr/hr@stone
SQL*Plus:
Release11.2.0.1.0ProductiononWedMar1021:
17:
222010
Copyright(c)1982,2009,Oracle. Allrightsreserved.
Connectedto:
OracleDatabase11gEnterpriseEditionRelease11.2.0.1.0-Production
WiththePartitioning,OLAP,DataMiningandRealApplicationTestingoptions
SQL>createtablet_test1(
2 zjnumber,
3 namevarchar2(20)
4 );
Tablecreated.
SQL>insertintot_test1values(1,'aaa');
1rowcreated.
SQL>commit;
Commitcomplete.
SQL>select*fromt_test1;
ZJNAME
------------------------------
1aaa
SQL>
◆在主机2上还要把Oracle用户的环境变量设置好,使其能正确编译pro/c程序
[oracle@myapache~]$vi.bash_profile
设置好以下环境变量
#Userspecificenvironmentandstartupprograms
ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1
exportORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:
$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:
/lib:
/usr/lib:
/usr/local/lib
exportLD_LIBRARY_PATH
PATH=$PATH:
$ORACLE_HOME/bin
exportPATH
sttyerase^H
(完)
测试一下Pro/C是否正确
[oracle@myapache~]$proc
Pro*C/C++:
Release11.2.0.1.0-ProductiononThuMar1101:
16:
422010
Copyright(c)1982,2009,Oracleand/oritsaffiliates. Allrightsreserved.
Systemdefaultoptionvaluestakenfrom:
/u01/app/oracle/product/11.2.0/client_1/precomp/admin/pcscfg.cfg
(下面内容从略)
一、安装Tuxedo的演示程序SimpApp,并完成Tuxedo客户端访问服务器的配置
1.在主机2上安装Tuxedo10gR3Server
建议采用字符安装界面,在安装过程中选择安装上Sample,以便运行SimpApp例子
[root@myapache~]#cd/home/OraFile/
[root@myapacheOraFile]#unziptuxedo10gR3_32_Linux_01_x86.zip
[root@myapacheOraFile]#chmod+xtuxedo10gR3_32_Linux_01_x86.bin
[root@myapacheOraFile]#./tuxedo10gR3_32_Linux_01_x86.bin-iconsole
ExtractingtheJREfromtheinstallerarchive...
UnpackingtheJRE...
Extractingtheinstallationresourcesfromtheinstallerarchive...
Configuringtheinstallerforthissystem'senvironment...
Launchinginstaller...
(比较重要的地方)
ChooseOracleHome
------------------
1-CreatenewOracleHome
Enteranumber:
1
SpecifyanewOracleHomedirectory:
/bea
===============================================================================
ChooseProductDirectory
------------------------
1-ModifyCurrentSelection(/bea/tuxedo10gR3)
2-UseCurrentSelection(/bea/tuxedo10gR3)
Enteranumber:
1
SpecifyProductInstallationDirectory:
/bea/tux10 (为操作方便,把安装目录修改为:
/bea/tux10)
InstallSamples(Y/N):
Y (选择安装Samples)
2.在TuxedoServer上运行SimpApp例子
(1)把SimpApp例子拷贝到/home/myTuxeSrv目录下
[oracle@myapache~]$cp-R/bea/tux10/samples/atmi/simpapp//home/myTuxSrv/
再拷贝环境变量
[oracle@myapache~]$cp/bea/tux10/tux.env /home/myTuxSrv/simpapp/
[oracle@myapache~]$cd/home/myTuxSrv/simpapp/
[oracle@myapachesimpapp]$ls
README simpcl.c simpserv.c tux.env ubbsimple
[oracle@myapachesimpapp]$
(2)编辑simpapp的配置文件
[oracle@myapachesimpapp]$cpubbsimpleubb
[oracle@myapachesimpapp]$viubb
修改结果:
#Example:
IPCKEY
# TUXCONFIG="/home/me/simpapp/tuxconfig"
# APPDIR="/home/me/simpapp"
#Example:
TUXDIR="/bea/tux10"
# (c)2003BEASystems,Inc.AllRightsReserved.
#ident "@(#)samples/atmi/simpapp/ubbsimple $Revision:
1.5$"
#SkeletonUBBCONFIGfilefortheTUXEDOSimpleApplication.
#Replacethe
*RESOURCES
IPCKEY 123456
DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="/home/myTuxSrv/simpapp"
TUXCONFIG="/home/myTuxSrv/simpapp/tuxconfig"
TUXDIR="/bea/tux10"
myapache LMID=simple
*GROUPS
GROUP1
LMID=simple GRPNO=1PENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1SRVID=1
*SERVICES
TOUPPER
(配置文件完)
(3)修改环境变量文件tux.env
[oracle@myapachesimpapp]$vitux.env
在最后加入两行
TUXDIR=/bea/tux10;exportTUXDIR
JAVA_HOME=$TUXDIR/jre;exportJAVA_HOME
JVMLIBS=$JAVA_HOME/lib/i386/server:
$JAVA_HOME/jre/bin
PATH=$TUXDIR/bin:
$JAVA_HOME/bin:
$PATH;exportPATH
COBCPY=:
$TUXDIR/cobinclude;exportCOBCPY
COBOPT="-CANS85-CALIGN=8-CNOIBMCOMP-CTRUNC=ANSI-CSEXT=cbl";exportCOBOPT
SHLIB_PATH=$TUXDIR/lib:
$JVMLIBS:
$SHLIB_PATH;exportSHLIB_PATH
LIBPATH=$TUXDIR/lib:
$JVMLIBS:
$LIBPATH;exportLIBPATH
LD_LIBRARY_PATH=$TUXDIR/lib:
$JVMLIBS:
$LD_LIBRARY_PATH;exportLD_LIBRARY_PATH
WEBJAVADIR=$TUXDIR/udataobj/webgui/java;exportWEBJAVADIR
APPDIR=/home/myTuxSrv/simpapp;exportAPPDIR
TUXCONFIG=$APPDIR/tuxconfig;exportTUXCONFIG
(4)在服务器本地运行simpapp例子程序
使环境变量生效
[oracle@myapachesimpapp]$../tux.env
[oracle@myapachesimpapp]$ls
README simpcl.c simpserv.c tux.env ubb ubbsimple
[oracle@myapachesimpapp]$env|grepTUX
TUXCONFIG=/home/myTuxSrv/simpapp/tuxconfig
TUXDIR=/bea/tux10
[oracle@myapachesimpapp]$
编译ubb(生成tuxconfig)
[oracle@myapachesimpapp]$tmloadcf-yubb
[oracle@myapachesimpapp]$ls
README simpcl.c simpserv.c tuxconfig tux.env ubb ubbsimple ULOG.031010
编译simpserv.c文件和simpcl.c文件(生成可执行文件)
[oracle@myapachesimpapp]$buildserver-fsimpserv.c-osimpserv-sTOUPPER
(我这里有一些警告信息,不影响程序运行)
[oracle@myapachesimpapp]$buildclient-fsimpcl.c-osimpcl
[oracle@myapachesimpapp]$ls
README simpcl.c simpserv.c tux.env ubbsimple
simpcl simpserv tuxconfig ubb ULOG.031010
运行服务器端程序
[oracle@myapachesimpapp]$tmboot-y
Bootingalladminandserverprocessesin/home/myTuxSrv/simpapp/tuxconfig
INFO:
OracleTuxedo,Version10.3.0.0,32-bit,PatchLevel(none)
Bootingadminprocesses...
execBBL-A:
processid=11402...Started.
Bootingserverprocesses...
execsimpserv-A:
processid=11403...Started.
2processesstarted.
[oracle@myapachesimpapp]$
测试一下运行情况:
[oracle@myapachesimpapp]$./simpclhello_alei
Returnedstringis:
HELLO_ALEI
[oracle@myapachesimpapp]$
看到以上结果,程序在本地已经可以使用了
3.把客户端程序转移到主机1上运行
(1)在服务器端(主机2)先做一些设置,首先关闭服务程序
[oracle@myapachesimpapp]$tmshutdown-y
Shuttingdownalladminandserverprocessesin/home/myTuxSrv/simpapp/tuxconfig
Shuttingdownserverprocesses...
ServerId=1GroupId=GROUP1Machine=simple:
shutdownsucceeded
Shuttingdownadminprocesses...
ServerId=0GroupId=simpleMachine=simple:
shutdownsucceeded
2processesstopped.
[oracle@myapachesimpapp]$
(2)修改配置文件ubb,添加一些配置;并重新编译
[oracle@myapachesimpapp]$viubb
修改了以下内容(标红部分)
IPCKEY 123456
DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="/home/myTuxSrv/simpapp"
TUXCONFIG="/home/myTuxSrv/simpapp/tuxconfig"
TUXDIR="/bea/tux10"
myapache LMID=simple
MAXWSCLIENTS=5
*GROUPS
GROUP1
LMID=simple GRPNO=1PENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1SRVID=1
WSL SRVGRP=GROUP1SRVID=10
CLOPT="-A---n//192.168.1.66:
3200-m2-M5-x5"
*SERVICES
TOUPPER
(配置文件完)
重新编译生成配置文件tuxconfig
[oracle@myapachesimpapp]$ls
access.031010 simpcl simpserv stderr tuxconfig ubb ULOG.031010
README simpcl.c simpserv.c stdout tux.env ubbsimple
[oracle@myapachesimpapp]$rm-rftuxconfig (先删除)
[oracle@myapachesimpapp]$tmloadcf-yubb
[oracle@myapachesimpapp]$tmboot-y
Bootingalladminandserverprocessesin/home/myTuxSrv/simpapp/tuxconfig
INFO:
OracleTuxedo,Version10.3.0.0,32-bit,PatchLevel(none)
Bootingadminprocesses...
execBBL-A:
processid=13105...Started.
Bootingserverprocesses...
execsimpserv-A:
processid=13106...Started.
execWSL-A---n//192.168.1.66:
3200-m2-M5-x5:
processid=13107...Started.
3processesstarted.
[oracle@myapachesimpapp]$
[oracle@myapachesimpapp]$netstat-anp
可以看到WSL也已经侦听了
(3)在TuxedoClient(主机1)上运行simpapp的客户端程序
在Tuxedo客户端上,也要安装Tuxedo10gR3,但只安装Tuxedo的客户端就行了,其安装目录也是:
/bea/tux10;客户端程序在/home/myTuxClient/simpapp目录中运行。
先拷贝simpapp例子程序和tux.env环境变量文件
[root@tuxclient~]#cp-R/bea/tux10/samples/atmi/simpapp//home/myTuxClient/
[root@tuxclient~]#cp/bea/tux10/tux.env/home/myTuxClient/simpapp/
[root@tuxclient~]#cd/home/myTuxClient/simpapp/
[root@tuxclientsimpapp]#ls
README simpcl.c simpserv.c tux.env ubbsimple
[root@tuxclientsimpapp]#
修改tux.env环境变量,把WSL请求指向Tu
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- tuxedo 详细 安装 步骤
![提示](https://static.bdocx.com/images/bang_tan.gif)