這篇文章將為大家詳細(xì)講解有關(guān)Oracle中Cloning $oracle_home如何克隆安裝oracle軟件,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
成都創(chuàng)新互聯(lián)一直在為企業(yè)提供服務(wù),多年的磨煉,使我們在創(chuàng)意設(shè)計,網(wǎng)絡(luò)營銷推廣到技術(shù)研發(fā)擁有了開發(fā)經(jīng)驗。我們擅長傾聽企業(yè)需求,挖掘用戶對產(chǎn)品需求服務(wù)價值,為企業(yè)制作有用的創(chuàng)意設(shè)計體驗。核心團(tuán)隊擁有超過10年以上行業(yè)經(jīng)驗,涵蓋創(chuàng)意,策化,開發(fā)等專業(yè)領(lǐng)域,公司涉及領(lǐng)域有基礎(chǔ)互聯(lián)網(wǎng)服務(wù)德陽機(jī)房服務(wù)器托管、成都App制作、手機(jī)移動建站、網(wǎng)頁設(shè)計、網(wǎng)絡(luò)整合營銷。
用途:Cloning an Oracle Home , 可以免去多臺機(jī)器重復(fù)安裝oracle軟件
1、停止相關(guān)進(jìn)程
[root@node1 bin]# ./crsctl stop cluster -all
2、打包 dbhome_1 目錄
[root@node1 11.2.0]# cd /u01/app/oracle/product/11.2.0/
[root@node1 11.2.0]# tar -zcvpf db_1.bak db_1/
[root@node1 11.2.0]# ls
db_1 db_1.bak
補(bǔ)充:
Create a ZIP file with the Oracle home (but not the Oracle base) directory.
# zip -r dbhome_1.zip /u01/app/oracle/product/11.2.0/dbhome_1
Do not include the admin, fast_recovery_area, and oradata directories that are under the Oracle base directory. These directories are created in the target installation later, when you create a new database there.
3、(如果是異機(jī)克?。?將ZIP文件復(fù)制到目標(biāo)計算機(jī)的相應(yīng)目錄。
4、 解壓 tar 包
# tar zxvf db_1.bak -C /app/oracle/product/11.2.0/
注意:
如果有多個節(jié)點則所有節(jié)點重復(fù)2、3、4步驟 。
5、 清除$ORACLE_HOME/network/admin下的*.ora
6、 跑 $ORACLE_HOME/perl/bin/perl clone.pl 腳本
node1-> $ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u01/app/oracle/" ORACLE_HOME="/app/oracle/product/11.2.0/db_1" OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName
./runInstaller -clone -waitForCompletion "ORACLE_BASE=/u01/app/oracle/" "ORACLE_HOME=/app/oracle/product/11.2.0/db_1" "oracle_install_OSDBA=dba" "oracle_install_OSOPER=oper" -defaultHomeName -defaultHomeName -silent -noConfig -nowait
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 6999 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-09-06_04-30-28AM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2017-09-06_04-30-28AM.log
.................................................................................................... 100% Done.
Installation in progress (Wednesday, September 6, 2017 4:31:02 AM CST)
.............................................................................. 78% Done.
Install successful
Setup in progress (Wednesday, September 6, 2017 4:33:11 AM CST)
Setup successful
End of install phases.(Wednesday, September 6, 2017 4:33:49 AM CST)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/app/oracle/product/11.2.0/db_1/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/app/oraInventory/logs/cloneActions2017-09-06_04-30-28AM.log' for more details.
-- 含義:
Use the following syntax:
$ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="target_oracle_base" ORACLE_HOME="target_oracle_home"
OSDBA_GROUP=OSDBA_privileged_group OSOPER_GROUP=OSOPER_privileged_group -defaultHomeName
補(bǔ)充:
Oracle Universal Installer starts, and then records the cloning actions in the cloneActionstimestamp.log file. This log file is typically located in /orainventory_location/logs directory.
7、 重建監(jiān)聽與dbca建庫
To configure the connection information for the new database, run Net Configuration Assistant:
$ cd $ORACLE_HOME/bin
$ ./netca
To create a new database for the newly cloned Oracle home, run Database Configuration Assistant:
$ cd $ORACLE_HOME/bin
$ ./dbca
關(guān)于“Oracle中Cloning $oracle_home如何克隆安裝oracle軟件”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學(xué)到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。