Tuxedo 全shell指令碼安裝

2021-06-06 14:00:14 字數 3865 閱讀 7012

#!/bin/bash

#declare variable

libfolder=/opt/devlib

currentpath=$pwd

tuxedopath=$/tuxedo111120_32_linux_01_x86.bin

libpath=$/lib.tar

confpath=$/conf.tar

servicepath=$/service.tar

deftuxinstalldir=/opt/tuxedo11gr1

oracletnspath=$/network.tar

oracledef=/opt

export path=$path:/sbin

ip=$(ifconfig | sed -n '/bcast/p' | awk -f ':' '' | awk '')

if [ ! $? -eq 0 ];then

echo "get ip failed,please input ip"

read ip

fifunction ubbconfig()

')#    ip=$

i=1;

!= "ubbsimp" ] ; then

if [ $ != "tux.env" ] ; then            

let i+=10

fifi

if [ ! $? -eq 0 ] ; then

echo "service change mode to execute fail"

exit 601

fifi

}let i+=10

}function setenvironment()

')#    ip=$

}echo "do you want install tuxedo?"

export ps3="please selection:"

select tmpintuxedo in "install" "don't install"

dointuxedo=$reply

break

done

echo "do you want update library?"

select tmpuplib in "update" "don't update"

douplib=$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

fifi

fi#create public develop folder

if [ $uplib -eq  1 ] ;then

if [ ! -d "$" -o -e "$ " ]  ; then

mkdir -p "$"

if [ ! $? -eq 0 ]; then

echo "create public library folder fail."

exit 199

fifi

fi#check required files are exist at current directory

#check tuxedo server file

if [ $intuxedo -eq 1 ] ; then

if [ ! -f "$" ] ; then

echo "not find tuxedo install file:$"

exit 200

fifi

#check lib tar file

if [ $uplib -eq  1 ] ;then

if [ ! -f "$" ] ; then

echo "not find odbc install file:$"

exit 201

fifi

#check service file

if [ ! -f "$" ] ; then

echo "not find odbc install file:$"

exit 202

fi#check oracle network file

if [ ! -f "$" ] ; then

echo "not find odbc install file:$"

exit 203

fi#add execute access

if [ $intuxedo -eq 1 ] ; then

if [ ! -x "$" ] ; then

chmod u+x "$"

if [ ! $? -eq 0 ] ;then

echo "$ add execute access fail."

exit 300

fifi

fiif [ ! $? -eq 0 ] ; then

exit 301

fielse

fi#decompression file

#decompression libraries

if [ $uplib -eq  1 ] ;then

tar -vxf "$" -c "$"

if [ ! $? -eq 0 ] ;then

echo "decompression libraries fail"

exit 401

fifi

#decompression services

if [ ! $? -eq 0 ] ;then

echo "decompression tuxedo services fail"

exit 402

fi#command execute tuxedo

if [ $intuxedo -eq 1 ] ; then

sh "$" -i console

if [ ! $? -eq 0 ] ; then

echo "install tuxedo error."

exit 500

fiecho "tuxedo intall success"

fiecho "input tuxedo install directory()"

read tuxinstalldir

if [ -z $ ]; then

tuxinstalldir=$

fi#decompression network

if [ ! -d $ ] ; then

tar -vxf "$" -c "$"

if [ ! $? -eq 0 ] ;then

echo "decompression oracle network fail"

exit 403

fifi

echo "tuxedo directory is :$"

if [ ! $? -eq 0 ];then

echo "ubbconfig create fail"

exit 404

fiif [ ! $? -eq 0 ]; then

echo "carete tux.env fail"

exit 501

fifi

if [ ! $? -eq 0 ]; then

echo "set tux.env execute access fail"

exit 502

fi#解壓配置檔案

if [  $? -eq 0 ]; then

echo "install success."

exit 0

fifi

zookeeper集群shell指令碼全啟動

我們的zookeeper要全部都啟動,我們不可能一次啟動乙個bin zkserver.sh start。因為如果我們如果有100臺集群的zookeeper,這個時候每一台都單獨啟動很麻煩,這個時候我們就使用shell指令碼進行。這樣我們只需要在集群的乙個zookeeper上面執行乙個shell指令碼...

Shell指令碼 安卓應用許可權檢查

現在 google play 對應用許可權的管理非常嚴格,之前公司內有個版本就是因為新增了四個許可權導致停灰處理。所以,在每個版本發布之前很有必要檢查一下是否有新增許可權。安卓應用請求的所有許可權可以通過 aapt 命令檢視 在拿到應用的許可權列表後,即可對比兩個版本的許可權是否有變化,新增加或者新...

Shell指令碼(三) Shell指令碼入門

1 指令碼格式 指令碼以 bin bash開頭 指定解析器 2 第乙個shell指令碼 helloworld 1 需求 建立乙個shell指令碼,輸出helloworld 2 案例實操 atguigu hadoop101 datas touch helloworld.sh atguigu hadoo...