ubuntu 下Tuxedo 11 R1的安装过程
2011-09-24
一安装 tuxedo
1.新建立一个tuxedo的用户(这个是不是必须的了??等待验证,估计其他的用户名也行)
首先建立一个tuxedo用户,这里将其组加入到oracle相关的组中(这个是为了方便,因为我的系统中有oracle数据库,不加到这些里面估计也没事)
看一些tuxedo的组情况:(本着多多益善的原则 呵呵)
1.在opt下面建立个tuxedo的应用程序的安装目录,注意这个目录的用户和组都是tuxedo的了:
#mkdir /opt/tuxedo
#chown tuxedo:tuxedo /opt/tuxedo
#ls -l
2.安装tuxedo 。安装这个,用tuxedo 用户安装就行
tuxedo@ubuntu:~$ chmod u+x tuxedo_new.bin (这个bin文件名太长我改名了呵呵,这里添加可执行权限)
tuxedo@ubuntu:~$ file tuxedo_new.bin(这个用了查看这个bin文件是否真的可以执行)
tuxedo_new.bin: POSIX shell script text executable (这个说明这个是个shell文件)
tuxedo@ubuntu:~$ export LANG =en_US 这个暂时将界面用英文
l语言选择英文吧
l
l直接“next”
l这里全部安装就行“next”
这里选择create new oracle home
同时点击 “Browse” 将安装文件目录,选择到前面新建的/opt/tuxedo目录下
再点击OK ,完成后再 “next”就开始安装了
3、 检测是否成功
tuxedo@ubuntu:~$ tmadmin -v
INFO: Oracle Tuxedo, Version 11.1.1.2.0, 32-bit, Patch Level (none)
4看看安装目录下面有什么东西
3、 配置环境变量成功
修改tuxedo用户的.profile在后面添加下面的内容
tuxedo@ubuntu:~$source .profile (使环境变量生效)
注:这里注意的是TUXCONFIG 这个环境变量,这个当前猜想是使用命令 :tmloadcf -y ubbsimple后生成的二进制配置文件的名称
tuxedo@ubuntu:~$ tmloadcf -y ubbsimple
一 tuxedo的简单例子
这里使用tuxedo自带的例子进行测试
l进入目录/opt/tuxedo/tuxedo11gR1/samples/atmi
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1$ ls
bin help inventory lib samples udataobj
cobinclude include jre locale tux.env uninstaller
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1$ cd samples/
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples$ ls
atmi corba jolt
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples$ cd atmi/
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples/atmi$ ls
bankapp CSIMPAPP qsample simpapp ws xmlstockapp
creditapp libutrace rpcsimp STOCKAPP xmlfmlapp
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples/atmi$ cd simpapp/
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples/atmi/simpapp$ ls
README simpcl.c simpserv.c ubbsimple
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples/atmi/simpapp$
l拷贝目录下simpapp 文件夹到/home/tuxedo 即tuxedo的用户主目录下
tuxedo@ubuntu:/opt/tuxedo/tuxedo11gR1/samples/atmi$ cp -r simpapp/home/tuxedo
l进入simpapp下看看
tuxedo@ubuntu:~/simpapp$ ls
README simpcl.c simpserv.c ubbsimple
tuxedo@ubuntu:~/simpapp$
l查看Readme 文件看怎么配置和编译(部分内容如下)
前面已经将环境变量配置好了
You need to set and export several environment variables before using
TUXEDO or running any TUXEDO application:
TUXDIR- base directory of the TUXEDO software
PATH- must include $TUXDIR/bin
LD_LIBRARY_PATH- must include $TUXDIR/lib on systems that use
shared libraries (except HP-UX and AIX)
SHLIB_PATH - HP-UX only: must include $TUXDIR/lib
LIBPATH - AIX only: must include $TUXDIR/lib
TUXCONFIG- full pathname of binary tuxconfig file
l修改配置文件:ubbsimple,下面红色的是需要修改的
tuxedo@ubuntu:~/simpapp$ vi ubbsimple
# (c) 2003 BEA Systems, Inc. All Rights Reserved.
#ident "@(#) samples/atmi/simpapp/ubbsimple $Revision: 1.7 $"
#Skeleton UBBCONFIG file for the TUXEDO Simple Application.
#Replace the items with the appropriate values.
*RESOURCES
IPCKEY
#Example:
#IPCKEY 123456
DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR=""
TUXCONFIG=""
TUXDIR=""
#Example:
# APPDIR="/home/me/simpapp"
# TUXCONFIG="/home/me/simpapp/tuxconfig"
# TUXDIR="/usr/tuxedo"
LMID=simple
#Example:
#beatux LMID=simple
*GROUPS
GROUP1
LMID=simple GRPNO=1 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1 SRVID=1
*SERVICES
TOUPPER
下面是我机器上的配置的一个
先获取 hostname
下面的红色就是对应的修改
# (c) 2003 BEA Systems, Inc. All Rights Reserved.
#ident "@(#) samples/atmi/simpapp/ubbsimple $Revision: 1.7 $"
#Skeleton UBBCONFIG file for the TUXEDO Simple Application.
#Replace the items with the appropriate values.
*RESOURCES
#IPCKEY
#Example:
IPCKEY 123456
DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="/home/tuxedo/simpapp"
TUXCONFIG="/home/tuxedo/simpapp/tuxconfig"
TUXDIR="/opt/tuxedo/tuxedo11gR1"
#Example:
# APPDIR="/home/me/simpapp"
# TUXCONFIG="/home/me/simpapp/tuxconfig"
# TUXDIR="/usr/tuxedo"
# LMID=simple
ubuntu LMID=simple
#Example:
#beatux LMID=simple
*GROUPS
GROUP1
LMID=simple GRPNO=1 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1 SRVID=1
*SERVICES
TOUPPER
l再下面编译客户端和服务程序
tuxedo@ubuntu:~$ cd simpapp
tuxedo@ubuntu:~/simpapp$ clear
tuxedo@ubuntu:~/simpapp$ ls
README simpcl.c simpserv.c ubbsimple
tuxedo@ubuntu:~/simpapp$tmloadcf -y ubbsimple
tuxedo@ubuntu:~/simpapp$ ls
README simpcl.c simpserv.ctuxconfigubbsimple ULOG.092411
tuxedo@ubuntu:~/simpapp$buildclient -o simpcl -f simpcl.c
simpcl.c: In function 鈓ain?
simpcl.c:34: warning: incompatible implicit declaration of built-in function 鈋xit?
simpcl.c:40: warning: incompatible implicit declaration of built-in function 鈋xit?
simpcl.c:43: warning: incompatible implicit declaration of built-in function 鈙trlen?
simpcl.c:50: warning: incompatible implicit declaration of built-in function 鈋xit?
simpcl.c:57: warning: incompatible implicit declaration of built-in function 鈋xit?
simpcl.c:60: warning: incompatible implicit declaration of built-in function 鈙trcpy?
simpcl.c:71: warning: incompatible implicit declaration of built-in function 鈋xit?
tuxedo@ubuntu:~/simpapp$buildserver -o simpserv -f simpserv.c -s TOUPPER
tuxedo@ubuntu:~/simpapp$tmboot -y
Booting all admin and server processes in /home/tuxedo/simpapp/tuxconfig
INFO: Oracle Tuxedo, Version 11.1.1.2.0, 32-bit, Patch Level (none)
Booting admin processes ...
exec BBL -A :
process id=20900 ... Started.
Booting server processes ...
exec simpserv -A :
process id=20901 ... Started.
2 processes started.
tuxedo@ubuntu:~/simpapp$
tuxedo@ubuntu:~/simpapp$./simpcl abdcdsdsds
Returned string is: ABDCDSDSDS
tuxedo@ubuntu:~/simpapp$
tuxedo@ubuntu:~/simpapp$ tmshutdown -y
Shutting down all admin and server processes in /home/tuxedo/simpapp/tuxconfig
Shutting down server processes ...
Server Id = 1 Group Id = GROUP1 Machine = simple: shutdown succeeded
Shutting down admin processes ...
Server Id = 0 Group Id = simple Machine = simple: shutdown succeeded
2 processes stopped.
tuxedo@ubuntu:~/simpapp$
注:下图中的tuxconfig 感觉应该是.profile 中配置的
TUXCONFIG这个环境变量有关系
修改一下试试:报错了
tuxedo@ubuntu:~/simpapp$ tmloadcf -y ubbsimple
CMDTUX_CAT:111: ERROR: TUXCONFIG (/home/tuxedo/simpapp/tuxconfig) of machine ubuntu must be the same as the TUXCONFIG environment variable (/home/tuxedo/simpapp/tuxconfig1)
CMDTUX_CAT:867: ERROR: tmloadcf: Above errors found during syntax checking
tuxedo@ubuntu:~/simpapp$ cd ..
tuxedo@ubuntu:~$ tail .profile
TUXDIR=/opt/tuxedo/tuxedo11gR1
PATH=$PATH:$TUXDIR/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TUXDIR/lib
TUXCONFIG=/home/tuxedo/simpapp/tuxconfig1
export TUXDIR
export PATH
export LD_LIBRARY_PATH
export TUXCONFIG
tuxedo@ubuntu:~$