Deploy an Oracle include oraInventory

aaqwsh發表於2012-07-06

我們在部署oracle時經常用的是tar一個已經部署好的環境,然後在目標機器上解壓,解壓後還需進行後續的操作才算完成。

當然目標機器是有要求的,最好OS的版本一致,另外就是一些必要的包已經安裝好,可以參考:使用yum安裝oracle的包

 

以下是兩種方法:

 

1  11G裡直接提供了一個指令碼clone.pl

[oracle@db-74 db1]$ cd $ORACLE_HOME/clone/bin

[oracle@db-74 bin]$ ls -al

total 32

drwxr--r-- 2 oracle oinstall  4096 Sep 29  2011 .

drwxr--r-- 4 oracle oinstall  4096 Sep 29  2011 ..

-rwxr--r-- 1 oracle oinstall 17067 Mar 16  2011 clone.pl

-rwxr--r-- 1 oracle oinstall   838 Aug 18  2010 prepare_clone.pl

[oracle@db-74 bin]$ /u01/product/11203/db1/perl/bin/perl clone.pl ORACLE_BASE="/u01" ORACLE_HOME="/u01/product/11203/db1" INVENTORY_LOCATION="/u01/oraInventory" OSDBA_GROUP=dba -defaultHomeName

./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/u01" "ORACLE_HOME=/u01/product/11203/db1" "INVENTORY_LOCATION=/u01/oraInventory" "oracle_install_OSDBA=dba" -defaultHomeName  -defaultHomeName -silent -noConfig -nowait

Starting Oracle Universal Installer...

 

Checking swap space: must be greater than 500 MB.   Actual 32972 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-06-22_05-20-14PM. Please wait ...Oracle Universal Installer, Version 11.2.0.3.0 Production

Copyright (C) 1999, 2011, Oracle. All rights reserved.

 

You can find the log of this install session at:

 /u01/oraInventory/logs/cloneActions2012-06-22_05-20-14PM.log

.................................................................................................... 100% Done.

 

 

 

Installation in progress (Friday, June 22, 2012 5:20:27 PM CST)

...............................................................................                                                 79% Done.

Install successful

 

Linking in progress (Friday, June 22, 2012 5:20:35 PM CST)

Link successful

 

Setup in progress (Friday, June 22, 2012 5:21:32 PM CST)

Setup successful

 

End of install phases.(Friday, June 22, 2012 5:21:55 PM CST)

Starting to execute configuration assistants

The following configuration assistants have not been run. This can happen because Oracle Universal Installer was invoked with the -noConfig option.

--------------------------------------

The "/u01/product/11203/db1/cfgtoollogs/configToolFailedCommands" script. contains all commands that failed, were skipped or were cancelled. This file may be used to run these configuration assistants outside of OUI. Note that you may have to update this script. with passwords (if any) before executing the same.

The "/u01/product/11203/db1/cfgtoollogs/configToolAllCommands" script. contains all commands to be executed by the configuration assistants. This file may be used to run the configuration assistants outside of OUI. Note that you may have to update this script. with passwords (if any) before executing the same.

 

--------------------------------------

WARNING:A new inventory has been created in this session. However, it has not yet been registered as the central inventory of this system.

To register the new inventory please run the script. '/u01/oraInventory/orainstRoot.sh' with root privileges.

If you do not register the inventory, you may not be able to update or patch the products you installed.

The following configuration scripts need to be executed as the "root" user.

/u01/oraInventory/orainstRoot.sh

/u01/product/11203/db1/root.sh

To execute the configuration scripts:

    1. Open a terminal window

    2. Log in as "root"

    3. Run the scripts

   

The cloning of OraHome1 was successful.

Please check '/u01/oraInventory/logs/cloneActions2012-06-22_05-20-14PM.log' for more details.

 

2  relink + runInstaller:

./runInstaller -silent -ignoreSysPrereqs -attachHome ORACLE_HOME="/u01/product/11.2.0/db1" ORACLE_HOME_NAME="ora11g"

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/758322/viewspace-734776/,如需轉載,請註明出處,否則將追究法律責任。

相關文章