oracle软件克隆安装

2024年 6月 5日 92.8k 0

https://docs.oracle.com/en/database/oracle/oracle-database/23/racad/cloning-oracle-rac-to-nodes-in-a-new-cluster.html#GUID-9DEEF6F5-CA37-465E-9648-69A945614998
https://docs.oracle.com/en/database/oracle/oracle-database/23/ladbi/cloning-an-oracle-home.html
How to Clone an 11.2 Grid Infrastructure Home and Clusterware (Doc ID 1413846.1)
Cloning An Existing Oracle11g Release 2 (11.2.0.x) RDBMS Installation Using OUI (Doc ID 1221705.1)

1 首先备份源端的oracle软件:
[oracle@test 19.9.0]$ tar -cvf /home/oracle/source.tar .
目标端创建相关目录,修改oracle 环境变量 修改操作系统配置 安装相关rpm包,(参考安装文档此处不做记录)

2 将其传输到目标端然后解压
tar -xvf /tmp/source.tar

3 删除和修改部分文件
修改listener.ora文件
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
删除dbs 目录下的不需要的文件
设置oracle home变量
export ORACLE_HOME=/u01/app/oracle/product/23.0.0/dbhome_1
cd $ORACLE_HOME/bin
./orabasehome

4 运行以下命令以使用 Oracle 通用安装程序 (OUI) 克隆安装:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/u02/app/oracle" ORACLE_HOME="/u02/app/oracle/product/19.9.0/db_1" OSDBA_GROUP=dba OSOPER_GROUP=oper OSBACKUPDBA_GROUP=backupdba OSDGDBA_GROUP=dgdba OSKMDBA_GROUP=kmdba OSRACDBA_GROUP=racdba -defaultHomeName
碰到的问题:
安装过程中网络断了,清空ORACLE_HOME 再次恢复的时候,再次执行报错OUI-10197:Unable to create a new Oracle Home at,执行如下操作,删除安装信息后再次执行
[root@localhost oraInventory]# rm -rf *
[root@localhost oraInventory]# pwd
/u02/app/oraInventory
克隆日志如下:
oracle@localhost 19.9.0]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/u02/app/oracle" ORACLE_HOME="/u02/app/oracle/product/19.9.0/db_1" OSDBA_GROUP=dba OSOPER_GROUP=oper OSBACKUPDBA_GROUP=backupdba OSDGDBA_GROUP=dgdba OSKMDBA_GROUP=kmdba OSRACDBA_GROUP=racdba -defaultHomeName
[INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image.
You must use /u02/app/oracle/product/19.9.0/db_1/runInstaller script available to perform the Software Only install. For more details on image based installation, refer to help documentation.
Starting Oracle Universal Installer...
.................................................. 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 '/u02/app/oraInventory/logs/cloneActions2024-06-04_11-33-17PM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 95% Done.
As a root user, execute the following script(s):
1. /u02/app/oraInventory/orainstRoot.sh
2. /u02/app/oracle/product/19.9.0/db_1/root.sh
.................................................. 100% Done.

执行上面的脚本:
[root@localhost oraInventory]# /u02/app/oraInventory/orainstRoot.sh
Changing permissions of /u02/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u02/app/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost oraInventory]#
[root@localhost oraInventory]#
[root@localhost oraInventory]# /u02/app/oracle/product/19.9.0/db_1/root.sh
Check /u02/app/oracle/product/19.9.0/db_1/install/root_localhost_2024-06-04_23-40-21-173048772.log for the output of root script

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论