В данном примере рассмотрим процесс клонирования бинаров оракла с сервера DEV на сервер TEST.
Сервер DEV:
Запаковываем директорию с бинарами Оракла и переносим на сервер TEST
dev:$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/orahome
dev:$ cd /u01/app/oracle/product/11.2.0
dev:$ tar -cvf orahome.tar orahome
dev$: scp -rp orahome.tar oracle@test:/u01/app/oracle/product/11.2.0/
Сервер TEST:
Распаковываем директорию
test:$ cd /u01/app/oracle/product/11.2.0
test:$ tar -xvf orahome.tar
Клонируем ORACLE HOME с помощью скрипта $ORACLE_HOME/clone/bin/clone.pl
test:$ cd /u01/app/oracle/product/11.2.0/orahome/clone/bin
test:$ perl clone.pl ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/orahome ORACLE_HOME_NAME=ORA_HOME11R2
./runInstaller -clone -waitForCompletion "ORACLE_BASE=/u01/app/oracle" "ORACLE_HOME=/u01/app/oracle/product/11.2.0/orahome" "ORACLE_HOME_NAME=ORA_HOME11R2" -silent -noConfig -nowait
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 13044 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2010-06-28_12-19-47PM. Please wait ...Oracle Universal Installer, Version 11.2.0.1.0 Production
Copyright (C) 1999, 2009, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/app/oracle/oraInventory/logs/cloneActions2010-09-28_12-19-47PM.log
.................................................................................................... 100% Done.
Installation in progress (Monday, June 28, 2010 12:20:29 PM WST)
.............................................................................. 78% Done.
Install successful
Linking in progress (Monday, June 28, 2010 12:21:06 PM WST)
Link successful
Setup in progress (Monday, June 28, 2010 12:23:34 PM WST)
Setup successful
End of install phases.(Monday, June 28, 2010 12:34:05 PM WST)
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/app/oracle/product/11.2.0/orahome/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/app/oracle/product/11.2.0/orahome/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:
The following configuration scripts need to be executed as the "root" user.
/u01/app/oracle/product/11.2.0/orahome/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of ORA_HOME11R2 was successful.
Please check '/u01/app/oracle/oraInventory/logs/cloneActions2010-06-28_12-19-47PM.log' for more details.
Запускаем скрипт root.sh под root.
# pwd
/u01/app/oracle/product/11.2.0/orahome
# ./root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/orahome
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Клонирование успешно завершено.