Oracle11gR2--克隆安裝數據庫軟件


1. 刪除oracle之前的產品信息

環境是前篇中通過靜默方式安裝的,這里只刪除產品信息,假設ORACLE_HOME目錄是從其他地方拷貝過來的

[oracle@localhost ContentsXML]$ pwd
/home/oracle/oraInventory/ContentsXML
[oracle@localhost ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.4.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb11g_home1" LOC="/home/oracle/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

#刪除LIST里的內容
[oracle@localhost ContentsXML]$ cat inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>11.2.0.4.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>

2. 執行克隆安裝命令

[oracle@localhost bin]$ pwd
/home/oracle/app/oracle/product/11.2.0/dbhome_1/clone/bin
[oracle@localhost bin]$ perl clone.pl ORACLE_BASE=$ORACLE_BASE ORACLE_HOME=$ORACLE_HOME  ORACLE_HOME_NAME=OraDb11g_home1 
./runInstaller -clone -waitForCompletion  "ORACLE_BASE=/home/oracle/app" "ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1" "ORACLE_HOME_NAME=OraDb11g_home1" -silent -noConfig -nowait 
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 3990 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-01-31_05-17-41PM. 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:
 /home/oracle/oraInventory/logs/cloneActions2018-01-31_05-17-41PM.log
.................................................................................................... 100% Done.



Installation in progress (Wednesday, January 31, 2018 5:18:39 PM CST)
..............................................................................                                                  78% Done.
Install successful

Linking in progress (Wednesday, January 31, 2018 5:18:46 PM CST)
Link successful

Setup in progress (Wednesday, January 31, 2018 5:19:52 PM CST)
Setup successful

End of install phases.(Wednesday, January 31, 2018 5:20:22 PM CST)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/home/oracle/app/oracle/product/11.2.0/dbhome_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 OraDb11g_home1 was successful.
Please check '/home/oracle/oraInventory/logs/cloneActions2018-01-31_05-17-41PM.log' for more details.

#root執行
[oracle@localhost bin]$ exit
logout
[root@localhost ~]# /home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /home/oracle/app/oracle/product/11.2.0/dbhome_1/install/root_localhost.localdomain_2018-01-31_17-21-55.log for the output of root script

3.總結

可以看到通過克隆的方式時間會快很多,因為文件已經實現copy,只剩下link的工作


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM