この付録では、Oracle Collaboration Suiteコンポーネントを起動するスクリプトと停止するスクリプトについて説明します。 ここで示すスクリプトは、Solarisオペレーティング・システムに固有です。 他のプラットフォームで使用する場合は、スクリプトを変更する必要がある場合があります。
ここでは、次の内容について説明します。
A.4 Oracle9iAS Single Sign-OnおよびOracle Delegated Administration Serviceコンポーネント
A.5 Information StorageのOracle Real Application Clustersインスタンス
Oracle Collaboration Suiteコンポーネントの起動順序は、次のとおりです。
Infrastructureを起動します。
Oracle9iAS Single Sign-On ServerとOracle Delegated Administration Serviceを起動します。
Information Storageリスナーおよびデータベースを起動します。
Oracle Calendar ServerとOracle Filesドメイン・コントローラを起動します。
中間層ノードを起動します。
Oracle Collaboration Suiteシステムを停止する場合は、起動時とは逆の順序でコンポーネントを停止します。
各コンポーネントに対して、次の該当する環境変数を設定します。
ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH SHLIB_PATH(HP-UXのみ)また、Infrastructure、Oracle Calendar ServerおよびOracle Filesドメイン・コントローラには、さらに次の環境変数を設定する必要があります。
LD_PRELOAD LHOSTNAME シェルを変更する(例: 標準ユーザーからrootへ)と、LD_PRELOADは子にエクスポートされません。 このため、suコマンドを実行する場合は、必ず、適切なファイルを指定することによって環境を設定します。
この付録の例では、kshを使用する場合を示します。
この項では、Infrastructureコンポーネントを起動するスクリプトおよび停止するスクリプトを示します。
|
注意: 次のスクリプトにはパスワードが含まれているため、保護する必要があります。 |
起動
#!/bin/ksh
# If this is the initial startup following a cold failover, then
# supply the parameter "failover" when running this script
# For example startup failover
typeset -i fover=0
export ORACLE_HOME=/ocsinfra/app/oracle/product/infra/904
hostname=`hostname`
[[ $1 == "failover" ]] && fover=1
lsnrctl start
sqlplus "/ as sysdba" << !
startup
!
oidmon start
oidctl server=oidldapd configset=0 instance=1 start
sleep 15
# These steps are dependent on the osso.conf file being saved to
# osso.conf.hostname following the initial reregistration
# These are only necessary following a failover
# If the osso.conf was not saved, then use the reregister script
# from the 9iAS Infrastructure Improved Availability document.
if (($fover ))
then
echo "Starting for the first time after failover..."
echo "Will reset iAS password and copy the right osso.conf file"
sleep 5
resetiASpasswd.sh "cn=orcladmin" welcome1 welcome1 $ORACLE_HOME
cp -p $ORACLE_HOME/Apache/Apache/conf/osso/osso.hostname \
$ORACLE_HOME/Apache/Apache/conf/osso/osso.conf
else
echo "No need to reset password and replace osso.conf file"
fi
$ORACLE_HOME/opmn/bin/opmnctl start
$ORACLE_HOME/opmn/bin/opmnctl startproc type=ohs
$ORACLE_HOME/opmn/bin/opmnctl startproc type=custom gid=dcm-daemon
$ORACLE_HOME/opmn/bin/opmnctl startproc type=oc4j gid=OC4J_DAS1
停止
#!/bin/ksh # # Filename : stopall.sh # $ORACLE_HOME/opmn/bin/opmnctl stopall oidctl server=oidldapd configset=0 instance=1 stop sleep 15 # Increase this sleep if Oracle Internet Directory does not stop in 15 seconds oidmon stop sqlplus "/ as sysdba" <<! shutdown immediate ! lsnrctl stop echo "Check if anything is running..." ps -ef | grep -i ocsinfraSSO Server Middle Tiers
起動
$ORACLE_HOME/opmn/bin/opmnctl start $ORACLE_HOME/opmn/bin/opmnctl startproc type=ohs
停止
$ORACLE_HOME/opmn/bin/opmnctl stopproc type=ohs $ORACLE_HOME/opmn/bin/opmnctl stopall
この項では、Oracle9iAS Single Sign-OnおよびOracle Delegated Administration Serviceコンポーネントを起動するスクリプトと停止するスクリプトを示します。
起動
#!/bin/ksh $ORACLE_HOME/opmn/bin/opmnctl start $ORACLE_HOME/opmn/bin/opmnctl startproc type=ohs
停止
#!/bin/ksh $ORACLE_HOME/opmn/bin/opmnctl stopall
この項では、Information StorageのOracle Real Application Clustersインスタンスを起動するスクリプトおよび停止するスクリプトを示します。
起動
#!/bin/ksh lsnrctl start sqlplus "/ as sysdba" <<! startup !
停止
#!/bin/ksh sqlplus "/ as sysdba" <<! shutdown immediate ! lsnrctl stop
この項では、Oracle Calendar ServerおよびOracle Filesドメイン・コントローラ・コンポーネントを起動するスクリプトと停止するスクリプトを示します。
この項で示すスクリプトは、rootで実行する必要があります。
停止スクリプトでifsctl stopコマンドを実行すると、中間層を含むすべてのノードのすべてのOracle Filesプロセスが停止します。 中間層のOracle Filesプロセスを実行中にしておく場合は、Oracle Filesドメイン・コントローラを手動で停止する必要があります。
|
注意: 次のスクリプトにはパスワードが含まれているため、保護する必要があります。 |
起動
#!/bin/ksh # # Filename : startall.sh # Run this script as root with environment set # # If this is the initial startup following a cold failover, then # supply the parameter "failover" when running this script # For example, startup failover typeset -i fover=0 [[ $1 == "failover" ]] && fover=1 su - calendar << ! . /home/calendar/calendar.env if (($fover )) then echo "Starting for the first time after failover..." echo "Will reset iAS password" resetiASpasswd.sh "cn=orcladmin" welcome1 $ORACLE_HOME fi # echo "Starting calendar server .." $ORACLE_HOME/ocal/bin/unistart ! LD_PRELOAD=libloghost.so.1;export LD_PRELOAD $ORACLE_HOME/ifs/files/bin/ifsctl start << EOPASSWD ifs EOPASSWD echo "Check if anything is running..." ps -ef | grep -i calendar
停止
#!/bin/ksh # # Filename : stopall.sh # Run this script as root with environment set # su - calendar << ! echo "Stopping calendar server .." $ORACLE_HOME/ocal/bin/unistop -y ! LD_PRELOAD=libloghost.so.1;export LD_PRELOAD # This will shut down all Oracle Files processes on all nodes # To only stop the Oracle Files Domain Controller # kill the Oracle Files Domain Controller process manually $ORACLE_HOME/ifs/files/bin/ifsctl stop << EOPASSWD ifs EOPASSWD echo "Check if anything is running..." ps -ef | grep -i calendar
この項では、Oracle Collaboration Suite Middle-Tierを起動するスクリプトと停止するスクリプトを示します。 この項で示すスクリプトは、rootで実行する必要があります。
起動
#!/bin/ksh nohup $ORACLE_HOME/bin/tnslsnr LISTENER_ES -groupgid-useruid& $ORACLE_HOME/ifs/files/bin/ifsctl start <<EOPASSWD <ifs schema password> EOPASSWD #gidanduidare the group id and user id of the owner of the Middle Tier # software. In this example, ocsmid, and dba are the owner and group, respectively. su - ocsmid <<! . /home/ocsmid/ocsmid.env echo "Starting webcache .." webcachectl start echo "Starting opmn managed processes .." $ORACLE_HOME/opmn/bin/opmnctl startall echo "Starting em processes .." oesctl startup ocsmt1.oracle.com:um_system:smtp_in oesctl startup ocsmt1.oracle.com:um_system:smtp_out oesctl startup ocsmt1.oracle.com:um_system:imap oesctl startup ocsmt1.oracle.com:um_system:gc oesctl startup ocsmt1.oracle.com:um_system:list oesctl startup ocsmt1.oracle.com:um_system:pop oesctl startup ocsmt1.oracle.com:um_system:nntp_in oesctl startup ocsmt1.oracle.com:um_system:nntp_out oesctl startup ocsmt1.oracle.com:um_system:vs !
停止
#!/bin/ksh # This script is run as root. Will su to the Middle tier owner and shutdown the # components su - ocsmid << ! . /home/ocsmid/ocsmid.env oesctl shutdown ocsmt1.oracle.com:um_system:smtp_in oesctl shutdown ocsmt1.oracle.com:um_system:smtp_out oesctl shutdown ocsmt1.oracle.com:um_system:imap oesctl shutdown ocsmt1.oracle.com:um_system:gc oesctl shutdown ocsmt1.oracle.com:um_system:list oesctl shutdown ocsmt1.oracle.com:um_system:pop oesctl shutdown ocsmt1.oracle.com:um_system:nntp_in oesctl shutdown ocsmt1.oracle.com:um_system:nntp_out oesctl shutdown ocsmt1.oracle.com:um_system:vs echo "Starting webcache .." webcachectl start echo "Starting opmn managed processes .." $ORACLE_HOME/opmn/bin/opmnctl stopall lsnrctl stop LISTENER_ES ! $ORACLE_HOME/ifs/files/bin/ifsctl stop <<EOPASSWD <ifs schema password> EOPASSWD