当前位置:   article > 正文

centos6.4下tuxedo11gR1安装及jolt连接测试_tuxedo11gr1_64

tuxedo11gr1_64

项目需要tuxedo环境,故花了半天搭建了一个tuxedo测试环境。
1、下载tuxedo

我这了选择的是tuxedo 11gR1,可以去oracle官网下载,我下载的是 tuxedo111130_64_Linux_01_x86.bin,linux系统64位版本


2、建用户和组
[root@tiger ~]# groupadd oracle

[root@tiger ~]# useradd oracle -g oracle


3、拷贝文件安装
进入/opt目录,建立tuxedo目录,更改目录属主
[root@tiger ~]# cd /opt
[root@tiger opt]# mkdir tuxedo
[root@tiger opt]# chmod -R 755 tuxedo/
[root@tiger opt]# chown -R oracle:oracle tuxedo/
[root@tiger opt]# 


上传tuxedo111130_64_Linux_01_x86.bin至/opt/tuxedo下,更改文件属主为oracle,完成后给oracle用户设置密码

[root@tiger tuxedo]# chown -R oracle:oracle tuxedo111130_64_Linux_01_x86.bin 
[root@tiger tuxedo]# ll
total 84012
-rw-r--r-- 1 oracle oracle 86027903 Feb 12 10:46 tuxedo111130_64_Linux_01_x86.bin
[root@tiger tuxedo]# chmod -R 755 tuxedo111130_64_Linux_01_x86.bin 
[root@tiger tuxedo]# ll
total 84012
-rwxr-xr-x 1 oracle oracle 86027903 Feb 12 10:46 tuxedo111130_64_Linux_01_x86.bin
[root@tiger tuxedo]# pwd oracle
/opt/tuxedo
[root@tiger tuxedo]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@tiger tuxedo]# 


之后的操作,会在oracle用户进行
[root@tiger tuxedo]# su oracle [oracle@tiger tuxedo]$ 
[oracle@tiger tuxedo]$ /tuxedo111130_64_Linux_01_x86.bin -i console
一以下是安装时的交互
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
strings: '/lib/libc.so.6': No such file
 
Launching installer...
 
Preparing CONSOLE Mode Installation...
 
===============================================================================
Choose Locale...
----------------
 
  ->1- English
 
CHOOSE LOCALE BY NUMBER: 1
===============================================================================
Tuxedo 11.1.1.3.0                 (created with InstallAnywhere by Macrovision)
-------------------------------------------------------------------------------
 
Command.run(): process completed before monitors could start.
 
 
 
===============================================================================
Introduction
------------
 
InstallAnywhere will guide you through the Tuxedo 11.1.1.3.0 installation.
 
 
 
It is strongly recommended that you quit all programs before continuing with 
this installation.
 
Enter "next' to proceed to the next screen. Enter "back" to modify the previous
screen.
 
You may cancel this installation at any time by typing "quit".
 
 
 
WARNING: "Quitting" creates an incomplete  Tuxedo 11.1.1.3.0 installation.You 
must re-install  Tuxedo 11.1.1.3.0. For more information, see "Preparing to 
Install the Oracle Tuxedo System" in the  Tuxedo 11.1.1.3.0 Installation Guide.
 
 
 
PRESS <ENTER> TO CONTINUE: 
 
 
 
===============================================================================
Choose Install Set
------------------
 
Please choose the Install Set to be installed by this installer.
 
  ->1- Full Install
    2- Server Install
    3- Full Client Install
    4- Jolt Client Install
    5- ATMI Client Install
    6- CORBA Client Install
 
    7- Customize...
 
ENTER THE NUMBER FOR THE INSTALL SET, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
   : 1
 
 
 
===============================================================================
Choose Oracle Home
------------------
 
 
    1- Create new Oracle Home
 
Enter a number: 1
Specify a new Oracle Home directory: /opt/tuxedo/app
 
 
 
===============================================================================
Choose Product Directory
------------------------
 
 
    1- Modify Current Selection (/opt/tuxedo/app/tuxedo11gR1)
    2- Use Current Selection (/opt/tuxedo/app/tuxedo11gR1)
 
Enter a number: 2
Install Samples (Y/N): Y
 
 
 
===============================================================================
Pre-Installation Summary
------------------------
 
Please Review the Following Before Continuing:
 
Product Name:
    Tuxedo 11.1.1.3.0
 
Install Folder:
    /opt/tuxedo/app/tuxedo11gR1
 
Link Folder:
    /home/oracle
 
Required Space:
    187 MB
 
Available Space:
    16923 MB
 
 
 
PRESS <ENTER> TO CONTINUE: 
 
 
 
===============================================================================
Ready To Install
----------------
 
InstallAnywhere is now ready to install Tuxedo 11.1.1.3.0 onto your system at 
the following location:
 
 
 
   /opt/tuxedo/app/tuxedo11gR1
 
PRESS <ENTER> TO INSTALL: 
 
 
 
===============================================================================
Installing...
-------------
 
 [==================|==================|==================|==================]
 [------------------|------------------|------------------|------------------]
 
 
 
===============================================================================
Configure tlisten Service
-------------------------
 
Password:         
Verify Password:         
Password Accepted! Please wait...
 
 
 
===============================================================================
SSL Installation Choice.
------------------------
 
Would you like to install SSL Support?
 
  ->1- Yes
    2- No
 
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:
   : 2
 
 
 
 
===============================================================================
Installation Complete
---------------------
 
Congratulations. Tuxedo 11.1.1.3.0 has been successfully installed to:
 
 
 
   /opt/tuxedo/app/tuxedo11gR1
 
PRESS <ENTER> TO EXIT THE INSTALLER:


至此,安装完成。
4、tuxedo配置
进入目录 /opt/tuxedo/app/tuxedo11gR1,更改文件 tux.env为755,执行如下命令:
    chmod  755 tux.env
[oracle@tiger tuxedo11gR1]$ source tux.env
[oracle@tiger tuxedo11gR1]$ env |grep TUX
TUXDIR=/opt/tuxedo/app/tuxedo11gR1      //如果查找到了,说明环境变量设置成功。
(此文件初始化tuxedo相关的环境变量,我是把此文件的内容加入到. bash_profile中去了,方便机器重启时使用)


5、配置一个服务(用自带的例子simpapp测试)
执行下面命令
[oracle@tiger atmi]$ cd /opt/tuxedo/app/tuxedo11gR1/samples/atmi
[oracle@tiger atmi]$ cd simpapp/
[oracle@tiger simpapp]$ ll
total 16
-rw-r----- 1 oracle oracle 2943 Feb 12 10:57 README
-rw-r----- 1 oracle oracle 1826 Feb 12 10:57 simpcl.c
-rw-r----- 1 oracle oracle 2155 Feb 12 10:57 simpserv.c
-rw-r----- 1 oracle oracle  886 Feb 12 10:57 ubbsimple
[oracle@tiger simpapp]$ 
备份 ubbsimple,新建一个ubbsimple,拷贝以下内容:
  1. # 2003 BEA Systems, Inc. All Rights Reserved.
  2. #ident "@(#) samples/atmi/simpapp/ubbsimple $Revision: 1.7 $"
  3. #Skeleton UBBCONFIG file for the TUXEDO Simple Application.
  4. #Replace the <bracketed> items with the appropriate values.
  5. *RESOURCES
  6. IPCKEY 123456
  7. #Example:
  8. #IPCKEY 123456
  9. DOMAINID simpapp
  10. MASTER simple
  11. MAXACCESSERS 900
  12. MAXSERVERS 10
  13. MAXSERVICES 20
  14. MODEL SHM
  15. LDBAL N
  16. *MACHINES
  17. DEFAULT:
  18. APPDIR="/opt/tuxedo/app/tuxedo11gR1/samples/atmi/simpapp"
  19. TUXCONFIG="/opt/tuxedo/app/tuxedo11gR1/samples/atmi/simpapp/tuconfig"
  20. TUXDIR="/opt/tuxedo/app/tuxedo11gR1"
  21. MAXWSCLIENTS=2
  22. #Example:
  23. # APPDIR="/home/me/simpapp"
  24. # TUXCONFIG="/home/me/simpapp/tuxconfig"
  25. # TUXDIR="/usr/tuxedo"
  26. "tiger" LMID=simple
  27. #Example:
  28. #beatux LMID=simple
  29. *GROUPS
  30. GROUP1
  31. LMID=simple GRPNO=1 OPENINFO=NONE
  32. JSLGRP LMID=simple GRPNO=2
  33. JREPGRP LMID=simple GRPNO=3
  34. *SERVERS
  35. DEFAULT:
  36. CLOPT="-A"
  37. simpserv SRVGRP=GROUP1 SRVID=1
  38. JSL SRVGRP=JSLGRP SRVID=755
  39. CLOPT="-A -- -n //192.168.109.66:8888 -m 5 -M 10 -x 5"
  40. JREPSVR SRVGRP=JREPGRP SRVID=302
  41. CLOPT="-A -- -W -P /opt/tuxedo/app/tuxedo11gR1/udataobj/jolt/repository/jrepository"
  42. *SERVICES
  43. TOUPPER

根据不同情况,调整内容。


编译UBBCONFIG

[oracle@tiger simpapp]$  tmloadcf -y ubbsimple


编译服务代码,设置环境变量
[oracle@tiger simpapp]$ buildserver -o simpserv -f simpserv.c -s TOUPPER
[oracle@tiger simpapp]$ export TUXCONFIG="/opt/tuxedo/app/tuxedo11gR1/samples/atmi/simpapp/tuconfig"


启动 tmboot -y
[oracle@tiger simpapp]$ tmboot -y
Booting all admin and server processes in /opt/tuxedo/app/tuxedo11gR1/samples/atmi/simpapp/tuconfig
INFO: Oracle Tuxedo, Version 11.1.1.3.0, 64-bit, Patch Level (none)
 
Booting admin processes ...
 
exec BBL -A :
        process id=28111 ... Started.
 
Booting server processes ...
 
exec simpserv -A :
        process id=28112 ... Started.
exec JSL -A -- -n //192.168.109.66:8888 -m 5 -M 10 -x 5 :
        process id=28113 ... Started.
exec JREPSVR -A -- -W -P /opt/tuxedo/app/tuxedo11gR1/udataobj/jolt/repository/jrepository :
        process id=28119 ... Started.
4 processes started.


可以看到已经启动成功,停止服务: tmshutdown -y


6、java通过jolt调用服务测试
新建一个java工程,拷贝/opt/tuxedo/app/tuxedo11gR1/udataobj/jolt/jolt.jar、/opt/tuxedo/app/tuxedo11gR1/udataobj/jolt/joltjse.jar两个jar包加入编译路径,测试类代码如下:
  1. package my.jolt.servlet;
  2. import bea.jolt.JoltDefinition;
  3. import bea.jolt.JoltMessage;
  4. import bea.jolt.JoltRemoteService;
  5. import bea.jolt.JoltSession;
  6. import bea.jolt.JoltSessionAttributes;
  7. import bea.jolt.JoltTransaction;
  8. public class Test {
  9. public static void main(String[] args) throws Exception {
  10. JoltSessionAttributes sattr = null;
  11. JoltRemoteService toupper = null;
  12. JoltTransaction trans = null;
  13. String userName = "";
  14. String userPassword = "";
  15. String appPassword = "";
  16. String userRole = "";
  17. String outstr;
  18. sattr = new JoltSessionAttributes();
  19. // 建立目标连接地址
  20. sattr.setString(sattr.APPADDRESS, "//192.168.109.66:8888");
  21. // TIMEOUT时间
  22. sattr.setInt(sattr.IDLETIMEOUT, 300);
  23. // 建立连接,初始化
  24. bea.jolt.JoltSession session = new JoltSession(sattr, userName,
  25. userRole, userPassword, appPassword);
  26. // 需要的总控
  27. toupper = new JoltRemoteService("TOUPPER", session);
  28. toupper.addString("STRING", "if i am ajfgfdgdf gdg");
  29. try{
  30. // 调用,返回
  31. toupper.call(null);
  32. JoltDefinition jd = toupper.getDefinition();
  33. JoltMessage jm = toupper.getOutputs();
  34. System.out.println("返回:" + jm.toString());
  35. }catch (Exception e) {
  36. e.printStackTrace();
  37. }finally{
  38. session.endSession();
  39. }
  40. }
  41. }


运行结果:
返回:STRING[0]S="IF I AM AJFGFDGDF GDG":


当然也可以建立web工程测试,/opt/tuxedo/app/tuxedo11gR1/samples/jolt/wls/servlet/simpapp目录下有例子代码,
tomcat部署可以参照:http://www.myexception.cn/software-architecture-design/895271.html









声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/461037
推荐阅读
相关标签
  

闽ICP备14008679号