TUXEDO 自动安装第二版(静默安装)

tuxedo静默安装需要一个配置文件提供安装参数,在tuxedo8.1的时候需要的参数配置为

http://docs.oracle.com/cd/E13203_01/tuxedo/tux81/install/inssil.htm

Table 4-1 The installer.properties File  

For This Keyword . . .

Enter the Following Value . . .

INSTALLER_UI=

The mode of installation. The default is silent; do not modify this value.

USER_LOCALE=

A language code determining the language-specific message catalog installed during the installation. Besides en (the default) for English, you can set this value to ja (or ja_JP) for Japanese.

BEAHOME=

The full pathname of the BEA Home directory of your choice. For details about the BEA Home directory, see BEA Home Directory.

USER_INSTALL_DIR=

The full pathname of the product directory of your choice.

C_ldapName=

The fully qualified domain name of the Lightweight Directory Access Protocol (LDAP) server of your choice; for example, pcwiz.mydomain.com. (See Note at end of table.)

C_ldapPortID=

The port number through which the local machine communicates with the LDAP server; for example, 389.* (See Note at end of table.)

C_ldapBaseObj=

The distinguished name of the base object for search in the LDAP server; for example, o=beasys.com. (See Note at end of table.)

C_ldapFiltFile=

The full pathname of the LDAP filter file on your machine; for example, C:\bea\tuxedo8.1\udataobj\security\
bea_ldap_filter.dat
. (See Note at end of table.)

C_tlistenPassword=

A tlisten password of your choice. The password must be a string of alphanumeric characters in clear-text format that is no more than 80 characters in length. You will be prompted to enter this password when logging in to the BEA Tuxedo Administration Console.

USER_LIC_FILE=

The full pathname of the BEA Tuxedo 8.1 license file on your machine; pathname must end with lic.txt.

CHOSEN_INSTALL_SET=

The chosen installation set. You must set this value to one of the following options:

Note: The valid options are case sensitive and should be coded exactly as defined below for proper installation. If a valid option is not used, a faulty installation results.

  • Full Install for a full installation,

  • Server Install for server-only installation,

  • Full Client Install for full client installation,

  • ATMI (WS) Client Install for ATMI-client-only (/WS) installation,

  • CORBA Client for CORBA-client-only installation, or

  • Jolt Client Install for Jolt-client-only installation

No customizing of install sets is possible with silent-mode installation. For a description of install sets, see Install Sets.

BEAHOMES_NEW (Windows only)

The list of BEA home directories of the various BEA products installed on the machine. Prepend any new BEA home directories. Use a semicolon to separate entries. The list of existing BEA home directories are available in the BEAHOMELIST registry entry or from the file:

C:\bea\beahomelist

For example, given the following registry entry, c:\bea\tux\80;c:\tux

if you set the BEAHOME keyword in the template file to:

BEAHOME=D:\\bea\\tux\\80:

then you would also set BEAHOMES_NEW=D:\\bea\\tux\\80;c:\\bea\\tux\\80;c:\\tux



tuxedo版本大于10的时候需要的参数为:

http://docs.oracle.com/cd/E13161_01/tuxedo/docs10gr3/install/inssil.html

For This Keyword . . .
Enter the Following Value . . .
INSTALLER_UI=
(UNIX and Windows)
The mode of installation. The default is silent; do not modify this value.
ORACLEHOME=
(UNIX and Windows)
The full pathname of the Oracle Home directory of your choice. For details about the Oracle Home directory, see Oracle Home Directory.
USER_INSTALL_DIR=
(UNIX and Windows)
The full pathname of the product directory of your choice.
WARNING:Running a previous Tuxedo version in conjunction with Tuxedo 10g Release 3 (10.3) on a Windows system requires that the product directories for both versions do not have the same name.
INSTALL_SAMPLES
“yes” installs Tuxedo 10gR3 samples.
“no” does not install samples.
LDAP_HOSTNAME=
(UNIX & Windows)
The fully qualified domain name of the Lightweight Directory Access Protocol (LDAP) server of your choice; for example, pcwiz.mydomain.com. (See Note at end of table.)
LDAP_PORTID=
(UNIX & Windows)
The port number through which the local machine communicates with the LDAP server; for example, 389.* (See Note at end of table.)
TLISTEN_PORT
(Windows)
The port number through which the local machine communicates with the TLISTEN server; for example, 1357.
LDAP_BASE_OBJECT=
(Unix & Windows)
The distinguished name of the base object for search in the LDAP server; for example, o=beasys.com. (See Note at end of table.)
LDAP_FILTER_FILE=
(Unix & Windows)
The full pathname of the LDAP filter file on your machine; for example, C:\ oracle\tuxedo10gR3\ udataobj\security\
bea_ldap_filter.dat
. (See Note at end of table.)
TLISTEN_PASSWORD=
(Unix & Windows)
A tlisten password of your choice. The password must be a string of alphanumeric characters in clear-text format that is no more than 80 characters in length. You will be prompted to enter this password when logging in to the Oracle Tuxedo Administration Console.
CHOSEN_INSTALL_SET=
The chosen installation set. You must set this value to one of the following options:
Notes:The valid options are case sensitive and should be coded exactly as defined below for proper installation. Use of invalid options will result in improper installation.
Note:Spaces should not be included after the install set name. If there are spaces after the install set name, the installation process uses the default mode Full Install.
  • Full for a full installation
  • Server for server-only installation
  • Client for full client installation
  • ATMI for ATMI-client-only installation,
  • CORBA for CORBA-client-only installation
  • Jolt for Jolt-client-only installation
  • DNET for Tuxedo .NET Workstation client only installation (Windows platforms only.)
No customizing of install sets is possible with silent-mode installation. For a description of install sets, see Install Sets.
Notes:Keywords: LDAP_HOSTNAME, LDAP_PORTID, LDAP_BASE_OBJECT, LDAP_FILTER_FILE are optional.
Note:Include these keywords and their values only if you want to use Secure Sockets Layer (SSL) encryption. Otherwise, comment these lines out by preceding them with hash marks (#).
Note:Keywords: TLISTEN_PORT, and TLISTEN_PASSWORD are also optional
Note:Include these keywords and their values only if you select Server (server-only installation).

In the template files, comment lines are preceded by hash marks (#). The installer program does not read any line beginning with a hash mark.


根据以上的描述我们可以看我们的第二版程序


#!/bin/bash
#declare variable
libfolder=/opt/devlib
currentpath=$PWD
oraclehome=/opt
tuxedopath=${currentpath}/tuxedo111120_32_Linux_01_x86.bin
libpath=${currentpath}/lib.tar
prilibpath=${currentpath}/prilib.tar
odbcinipath=${currentpath}/odbc.tar
confpath=${currentpath}/conf.tar
servicepath=${currentpath}/service.tar
tuxapp=${currentpath}/tuxedo
deftuxinstalldir=$oraclehome/tuxedo11gR1
oracletnspath=${currentpath}/network.tar
oracledef=$oraclehome/config/oracle/
odbchome=$oraclehome/config/odbc
tuxfile=$currentpath/silence.conf
export PATH=$PATH:/sbin:/bin


function ERRTRAP()
{
	echo "[LINE $1] Error:command or function exited with status $?"
}
#trap 'ERRTRAP' ERR

ip=$(ifconfig | sed -n '/Bcast/p' | awk -F ':' '{print $2}' | awk '{print $1}')
if [ ! $? -eq 0 ];then
	echo "get ip failed,please input ip"
	read ip
fi
function ubbconfig()
{
	if [ -e ${tuxapp}/ubbsimp ]
	then
		rm -fr ${tuxapp}/ubbsimp
	fi
	if [ ! $? -eq 0 ]; then
		echo "remove file ${tuxapp}/ubbsimp fail."
		exit 600
	fi

        uid=$( id -u )
        gid=$( id -g )
        machinename=$( hostname )
        tuxapp=$1
        tuxdir=$2
#        ip=$(grep $(hostname) /etc/hosts| awk '{print $1}')
#	ip=${ip%::*}
        echo "*RESOURCES">>${tuxapp}/ubbsimp
        echo "IPCKEY    123457">>${tuxapp}/ubbsimp
        echo "DOMAINID  simpap">>${tuxapp}/ubbsimp
        echo "MASTER            simple">>${tuxapp}/ubbsimp
        echo "MAXACCESSERS      100">>${tuxapp}/ubbsimp
        echo "MAXSERVERS        50">>${tuxapp}/ubbsimp
        echo "MAXSERVICES       100">>${tuxapp}/ubbsimp
        echo "MODEL             SHM">>${tuxapp}/ubbsimp
        echo "LDBAL             Y">>${tuxapp}/ubbsimp
        echo "UID               ${uid}">>${tuxapp}/ubbsimp
        echo "GID               ${gid}">>${tuxapp}/ubbsimp
        echo "">>${tuxapp}/ubbsimp
        echo "*MACHINES">>${tuxapp}/ubbsimp
        echo "DEFAULT:">>${tuxapp}/ubbsimp
        echo "          APPDIR=\"${tuxapp}\"">>${tuxapp}/ubbsimp
        echo "          TUXCONFIG=\"${tuxapp}/tuxconfig\"">>${tuxapp}/ubbsimp
        echo "          TUXDIR=\"${tuxdir}\"">>${tuxapp}/ubbsimp
        echo "\"${machinename}\"  LMID=simple">>${tuxapp}/ubbsimp
        echo "	MAXWSCLIENTS=30">>${tuxapp}/ubbsimp
        echo "">>${tuxapp}/ubbsimp
        echo "*GROUPS">>${tuxapp}/ubbsimp
        echo "GROUP1">>${tuxapp}/ubbsimp
        echo "  LMID=simple     GRPNO=1 OPENINFO=NONE">>${tuxapp}/ubbsimp
        echo "*SERVERS">>${tuxapp}/ubbsimp
        echo "DEFAULT:">>${tuxapp}/ubbsimp
        echo "          CLOPT=\"-A\"">>${tuxapp}/ubbsimp
        i=1;
        for service in $( ls ${tuxapp} )
        {
		if [ -d ./${service} ] ; then
			echo "this is a directory.${service}"
			continue;
		fi
		if [ ${service} = "ubbsimp" -o ${service} = "lib" -o ${service} = "conf" -o ${service} = "tux.env" ] ;then
			continue;
		fi
		echo "\"${service}\" SRVGRP=\"GROUP1\" SRVID=${i}">>${tuxapp}/ubbsimp
		let i+=10
		if [ ! -x ${tuxapp}/${service} ]; then
			chmod u+x ${tuxapp}/${service}
		fi
		if [ ! $? -eq 0 ] ; then
			echo "service change mode to execute fail"
			exit 601
		fi
        }
	let i+=10
        echo "\"WSL\"   SRVGRP=\"GROUP1\"  SRVID=${i}">>${tuxapp}/ubbsimp
        echo "	CLOPT=\"-A -t -- -n //${ip}:20000 -m 10 -M 10 -x 1000 -I 1000 -N 60 -p 40000 -P 41000 -t 100 \"">>${tuxapp}/ubbsimp
        echo "">>${tuxapp}/ubbsimp
        echo "*SERVICES">>${tuxapp}/ubbsimp
}

function setenvironment()
{
	if [ -e ${tuxapp}/tux.env ]
        then
                rm -fr ${tuxapp}/tux.env
        fi
        if [ ! $? -eq 0 ]; then
                echo "remove file ${tuxapp}/tux.env fail."
                exit 700
        fi
	tuxapp=$1
	tuxdir=$2
	libdir=$3
# ip=$(grep $(hostname) /etc/hosts| awk '{print $1}')
#	ip=${ip%::*}
	echo "TUXDIR=${tuxdir}; export TUXDIR">>${tuxapp}/tux.env
	echo "APPDIR=${tuxapp};export APPDIR">>${tuxapp}/tux.env
	echo "JAVA_HOME=\$TUXDIR/jre; export JAVA_HOME">>${tuxapp}/tux.env
	echo "JVMLIBS=\$JAVA_HOME/lib/i386/server:\$JAVA_HOME/jre/bin">>${tuxapp}/tux.env
	echo "PATH=\$TUXDIR/bin:\$JAVA_HOME/bin:\$PATH:\${APPDIR}/lib; export PATH">>${tuxapp}/tux.env
	echo "COBCPY=:\$TUXDIR/cobinclude; export COBCPY">>${tuxapp}/tux.env
	echo "COBOPT=\"-C ANS85 -C ALIGN=8 -C NOIBMCOMP -C TRUNC=ANSI -C OSEXT=cbl\"; export COBOPT">>${tuxapp}/tux.env
	echo "SHLIB_PATH=\$TUXDIR/lib:\$JVMLIBS:\$SHLIB_PATH; export SHLIB_PATH">>${tuxapp}/tux.env
	echo "LIBPATH=\$TUXDIR/lib:\$JVMLIBS:\$LIBPATH; export LIBPATH">>${tuxapp}/tux.env
	echo "LD_LIBRARY_PATH=${libdir}:\$TUXDIR/lib:\$JVMLIBS:\$LD_LIBRARY_PATH:\${APPDIR}/lib; export LD_LIBRARY_PATH">>${tuxapp}/tux.env
	echo "WEBJAVADIR=\$TUXDIR/udataobj/webgui/java; export WEBJAVADIR">>${tuxapp}/tux.env
	echo "WSNADDR=//${ip}:20000 export WSNADDR">>${tuxapp}/tux.env
	echo "TUXCONFIG=\${APPDIR}/tuxconfig;export TUXCONFIG">>${tuxapp}/tux.env
	echo "LANG=C;export LANG">>${tuxapp}/tux.env
	echo "NLS_LANG=\"SIMPLIFIED CHINESE_CHINA.ZHS16GBK\" ;export NLS_LANG">>${tuxapp}/tux.env
	echo "ORACLE_HOME=${oracledef} ; export ORACLE_HOME ;export ORACLE_HOME">>${tuxapp}/tux.env
	echo "ODBCHOME=${odbchome} ; export ODBCHOME">>${tuxapp}/tux.env
	echo "ODBCINI=${ODBCHOME}/odbc.ini ; export ODBCINI">>${tuxapp}/tux.env
	echo "ODBCSYSINI=${ODBCHOME} ; export ODBCSYSINI">>${tuxapp}/tux.env
}

function SetSlientConfig()
{
	echo "begin set slient install configure"
	if [ ! -e $tuxfile ];then
		echo "INSTALLER_UI=silent" >> $tuxfile
		echo "ORACLEHOME=$oraclehome" >> $tuxfile
		echo "USER_INSTALL_DIR=$deftuxinstalldir" >> $tuxfile
		echo "INSTALL_SAMPLES=yes" >> $tuxfile
		echo "TLISTEN_PORT=3050" >> $tuxfile
		echo "TLISTEN_PASSWORD=oracle" >> $tuxfile
		echo "CHOSEN_INSTALL_SET=Full" >> $tuxfile
	fi
	echo "set slient install success"
}

function checkfileexist()
{
	if [ ! -f $1 ];then
		echo "can not find file $1"
		exit 200
	else
		echo "check file $1 success"
	fi
}

function CheckFolderOrCreate()
{
	if [ ! -d $1 ] ;then
		mkdir -p $1
		if [ $? -ne 0 ]; then
			echo "create folder $1 failed."
			exit 302
		fi
	fi
}

echo "do you want install tuxedo?"
export PS3="please selection:"
select tmpintuxedo in "install" "don't install"
do
	intuxedo=$REPLY
	break
done
echo "do you want update library?"
select tmpuplib in "update" "don't update"
do
	uplib=$REPLY
	break
done

if [ $intuxedo -eq 1 ] ; then

	if [ ! -x /opt -o ! -r  /opt -o ! -w /opt ] ; then
		sudo chmod 777 /opt
		if [ ! $? -eq 0 ]; then
        	        echo "chang access fail."
	                exit 198
		fi
	fi
fi
#create public develop folder
if [ $uplib -eq  1 ] ;then
	if [ ! -d "${libfolder}" -o -e "${libfolder} " ]  ; then
		mkdir -p "${libfolder}"
		if [ ! $? -eq 0 ]; then
			echo "create public library folder fail."
			exit 199
		fi
	fi
fi
#check required files are exist at current directory
#check tuxedo server file

if [ $intuxedo -eq 1 ] ; then
#	if [ ! -f "${tuxedopath}" ] ; then
#		echo "not find tuxedo install file:${tuxedopath}"
#		exit 200
#	fi
	checkfileexist ${tuxedopath}
fi
#check lib tar file
if [ $uplib -eq  1 ] ;then
#	if [ ! -f "${libpath}" ] ; then
#		echo "not find odbc install file:${libpath}"
#		exit 201
#	fi
	checkfileexist ${libpath}
fi
#check service file
	checkfileexist ${servicepath}
#if [ ! -f "${servicepath}" ] ; then
#	echo "not find odbc install file:${servicepath}"
#	exit 202
#fi

#check oracle network file
	checkfileexist ${oracletnspath}
#if [ ! -f "${oracletnspath}" ] ; then
#	echo "not find odbc install file:${oracletnspath}"
#	exit 203
#fi
	checkfileexist ${prilibpath}
#check private libraries file exist or not
#if [ ! -f "${prilibpath}" ] ; then
#	echo "cat not find private library install file:${prilibpath}"
#	exit 204
#fi

#check private odbc configure file exist or not
	checkfileexist ${odbcinipath}
#if [ ! -f "${odbcinipath}" ] ; then
#	echo "not find odbc install file:${odbcinipath}"
#	exit 203
#fi
#add execute access
if [ $intuxedo -eq 1 ] ; then
	if [ ! -x "${tuxedopath}" ] ; then
		chmod u+x "${tuxedopath}"
		if [ ! $? -eq 0 ] ;then
			echo "${tuxedopath} add execute access fail."
			exit 300
		else
			echo "change $tuxedopath mode success"
		fi
	fi
fi
#crate tuxedo application folder
CheckFolderOrCreate ${tuxapp}
result=$?
if [ $result -ne 0 ] ; then
	exit $result
fi
#remove tuxapp files and keep config not change
if  [ -d ${tuxapp}/conf ] ;then
	echo "${tuxapp}/conf"		
	confcount=$(ls -l ${tuxapp}/conf | wc -l)
	if [ $confcount -gt 0 ] ; then
		mv ${tuxapp}/conf ${tuxapp}/.conf
	fi
fi
rm -fr ${tuxapp}/*
if [ -d ${tuxapp}/.conf ]; then
	mv ${tuxapp}/.conf ${tuxapp}/conf
else
	CheckFolderOrCreate ${tuxapp}/conf
	if [ ! $? -eq 0 ] ;then
                echo "check or creat dirctory ${tuxapp}/conf fail"
                exit 400
        fi
	tar -vxf "${confpath}" -C "${tuxapp}/conf"
	if [ ! $? -eq 0 ] ;then 
        	echo "decompression private libraries fail"
	        exit 400
	fi
fi
#check if or not exit lib dirctory
CheckFolderOrCreate ${tuxapp}/lib
result=$?
if [ $result -ne 0 ] ; then
        exit $result
fi

tar -vxf "${prilibpath}" -C "${tuxapp}/lib"
if [ ! $? -eq 0 ] ;then
	echo "decompression private libraries fail"
        exit 400
fi

#decompression file
#decompression public libraries
if [ $uplib -eq  1 ] ;then
	tar -vxf "${libpath}" -C "${libfolder}"
	if [ ! $? -eq 0 ] ;then
		echo "decompression libraries fail"
		exit 401
	fi
	echo ${libfolder}
	chmod -R 777 ${libfolder} 
	if [ ! $? -eq 0 ] ;then
                echo "change libraries limits of authority fail"
                exit 402
        fi
fi
#decompression network config
CheckFolderOrCreate $oracledef
oracleconfig=$(ls -l ${oracletnspath} | wc -l)
if [ $oracleconfig -gt 0 ] ;then
	tar -vxf "${oracletnspath}" -C "${oracledef}"
	if [ ! $? -eq 0 ] ;then
	        echo "decompression oracle tns fail"
        	exit 402
	fi
	chmod -R 777 ${oracledef}
        if [ ! $? -eq 0 ] ;then
                echo "change oracle limits of authority fail"
                exit 402
        fi
fi
#decompression odbc config
CheckFolderOrCreate $odbchome
odbcconfig=$(ls -l ${odbcinipath} | wc -l)
if [ $odbcconfig -gt 0 ]; then
	tar -vxf "${odbcinipath}" -C "${odbchome}"
	if [ ! $? -eq 0 ] ;then
	        echo "decompression odbc configure fail"
        	exit 403
	fi
	chmod -R 777 ${oracledef}
        if [ ! $? -eq 0 ] ;then
                echo "change odbc limits of authority fail"
                exit 402
        fi
fi
#decompression services
tar -vxf "${servicepath}" -C "${tuxapp}"
if [ ! $? -eq 0 ] ;then
	echo "decompression tuxedo services fail"
	exit 404
fi

#command execute tuxedo
if [ $intuxedo -eq 1 ] ; then
	SetSlientConfig	
		sh "${tuxedopath}" -f $tuxfile
#	else
#		sh "${tuxedopath}" -i console
	if [ ! $? -eq 0 ] ; then
		echo "install tuxedo error."
		exit 500
	fi
	chmod -R 777 ${deftuxinstalldir}
        if [ ! $? -eq 0 ] ;then
                echo "change tuxedo limits of authority fail"
                exit 402
        fi
	echo "tuxedo intall success"
fi
#echo "input tuxedo install directory."
#echo -n "<ENTER=${deftuxinstalldir}>:"
#read tuxinstalldir
#TMOUT=3
#if [ -z ${tuxinstalldir} ]; then
#    tuxinstalldir=${deftuxinstalldir}
#fi
#echo "tuxedo directory is :${deftuxinstalldir}"
ubbconfig ${tuxapp} ${deftuxinstalldir}
if [ ! $? -eq 0 ];then
        echo "ubbconfig create fail"
        exit 404
else
	echo "ubbconfig create success"
fi

setenvironment ${tuxapp} ${deftuxinstalldir} ${libfolder}
if [ ! $? -eq 0 ]; then
        echo "carete tux.env fail"
        exit 501
else
	echo "create tux.env success"
fi

if [ ! -x ${tuxapp}/tux.env ]; then
	chmod u+x ${tuxapp}/tux.env
fi
if [ ! $? -eq 0 ]; then
        echo "set tux.env execute access fail"
        exit 502
else
	echo "set tux.env execute access success"
fi


#解压配置文件
echo "install success"





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值