oracle 12C 软件克隆安装

环境 12C R1+linux+ASM


将已安装的12CR1的oracle_home的tar成包,传至目标主机的指定目录,然后tar包解tar。


然后开始安装:
cnsh281336:test> $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/paic/stg/oracle/rdbms" ORACLE_HOME="/paic/stg/oracle/rdbms/12c/12.1.0.2.160119" OSDBA_GROUP=dba OSOPER_GROUP=oinstall -defaultHomeName  -O'"CLUSTER_NODES={cnsh281335,cnsh281336}"' -O'"LOCAL_NODE=cnsh281336"'
 
./runInstaller -clone -waitForCompletion "ORACLE_BASE=/paic/stg/oracle/rdbms" "ORACLE_HOME=/paic/stg/oracle/rdbms/12c/12.1.0.2.160119" "oracle_install_OSDBA=dba" "oracle_install_OSOPER=oper" -defaultHomeName "CLUSTER_NODES={cnsh281335,cnsh281336}" "LOCAL_NODE=cnsh281336" -silent -paramFile /paic/stg/oracle/rdbms/12c/12.1.0.2.160119/clone/clone_oraparam.ini 
Starting Oracle Universal Installer...
 
Checking Temp space: must be greater than 500 MB.  Actual 10187 MB   Passed
Checking swap space: must be greater than 500 MB.  Actual 20479 MB   Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-03-15_03-46-08PM. Please wait ...You can find the log of this install session at:
 /oracle_grid/app/oraInventory/logs/cloneActions2017-03-15_03-46-08PM.log
..................................................  5% Done.
..................................................  10% Done.
..................................................  15% Done.
..................................................  20% Done.
..................................................  25% Done.
..................................................  30% Done.
..................................................  35% Done.
..................................................  40% Done.
..................................................  45% Done.
..................................................  50% Done.
..................................................  55% Done.
..................................................  60% Done.
..................................................  65% Done.
..................................................  70% Done.
..................................................  75% Done.
..................................................  80% Done.
..................................................  85% Done.
..........
Copy files in progress.
 
Copy files successful.
 
Link binaries in progress.
 
Link binaries successful.
 
Setup files in progress.
 
Setup files successful.
 
Setup Inventory in progress.
 
Setup Inventory successful.
 
Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/oracle_grid/app/oraInventory/logs/cloneActions2017-03-15_03-46-08PM.log' for more details.
 
Setup Oracle Base in progress.
 
Setup Oracle Base successful.
..................................................  95% Done.
 
As a root user, execute the following script(s):
 
 
Execute /paic/stg/oracle/rdbms/12c/12.1.0.2.160119/root.sh on the following nodes: 
[cnsh281336]
 
 
..................................................  100% Done.
 
验证软件:
cnsh281336:test> sqlplus / as sysdba
 
SQL*Plus: Release 12.1.0.2.0 Production on Wed Mar 15 15:47:08 2017
 
Copyright (c) 1982, 2014, Oracle. All rights reserved.
 
Connected to an idle instance.
 
SQL> exit
Disconnected
 
使用root执行脚本,修改权限
[root@cnsh281336 ~]# sh /paic/stg/oracle/rdbms/12c/12.1.0.2.160119/root.sh
Check /paic/stg/oracle/rdbms/12c/12.1.0.2.160119/install/root_cnsh281336_2017-03-15_16-19-12.log for the output of root script
[root@cnsh281336 ~]# cd /paic/stg/oracle/rdbms/12c/12.1.0.2.160119/bin
[root@cnsh281336 bin]# ls -lh oracle
-rwsr-s--x 1 toracle oinstall 310M Mar 15 15:46 oracle
[root@cnsh281336 bin]#
[root@cnsh281336 bin]# chgrp asmadmin oracle
[root@cnsh281336 bin]# chmod 6751 oracle



官方文档参考:

Cloning an Oracle Home

Perform the following to clone an Oracle home:

1.Verify that the installation of Oracle Database to clone is successful.

You can do this by reviewing the installActionsdate_time.log file for the installation session, which is typically located in the /orainventory_location/logs directory.

If you install patches, then check their status using the following:
$ cd $ORACLE_HOME/OPatch


Include $ORACLE_HOME/OPatch in $PATH
$ opatch lsinventory



2.Stop all processes related to the Oracle home. See "Stopping Existing Oracle Processes" for more information about stopping the processes for an Oracle home.


3.Create a ZIP or TAR file with the Oracle home (but not the Oracle base) directory.

For example, if the source Oracle installation is in the /u01/app/oracle/product/12.1.0/dbhome_1, then you zip the dbhome_1 directory by using the following command:
# zip -r dbhome_1.zip /u01/app/oracle/product/12.1.0/dbhome_1


You can also use the TAR command, for example:
# tar -cvf dbhome_1.tar /u01/app/oracle/product/12.1.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.


4.Copy the ZIP or TAR file to the root directory of the target computer. If you use File Transfer Protocol (FTP), then transfer the ZIP or TAR file in binary mode only.


5.Extract the ZIP or TAR file content using the following command:
# unzip -d / dbhome_1.zip

# tar -xvf dbhome_1.tar


6.Repeat steps 4 and 5 for each computer where you want to clone the Oracle home, unless the Oracle home is on a shared storage device.


7.On the target computer, change the directory to the unzipped Oracle home directory, and remove all the .ora (*.ora) files present in the unzipped $ORACLE_HOME/network/admin directory.


8.From the $ORACLE_HOME/clone/bin directory, run the clone.pl file for the unzipped Oracle home. Use the following syntax:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="target_oracle_base" ORACLE_HOME="target_oracle_home"
OSDBA_GROUP=OSDBA_privileged_group OSOPER_GROUP=OSOPER_privileged_group -defaultHomeName


For example:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/u01/app/oracle/" ORACLE_HOME="/u01/app/oracle/product/12.1.0/dbhome_1"
OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName


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.


9.To configure the connection information for the new database, run Net Configuration Assistant:
$ cd $ORACLE_HOME/bin
$ ./netca


10.To create a new database for the newly cloned Oracle home, run Database Configuration Assistant:
$ cd $ORACLE_HOME/bin
$ ./dbca





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值