zoukankan      html  css  js  c++  java
  • 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的工作

  • 相关阅读:
    StringBuffer和StringBuilder
    String类
    软件设计师考点总结(一)
    基于 Axis2的webService接口的基本开发步骤
    Linux学习Day10:LVM(逻辑卷管理器)
    Linux学习Day9:使用RAID(独立冗余磁盘阵列)
    Linux学习Day8:挂载硬盘设备、添加交换分区
    Linux学习Day7:用户身份与文件权限、su命令与sudo服务
    Linux学习Day6:编写Shell脚本、配置计划任务
    Linux学习Day5:Vim编辑器、配置网卡、配置Yum软件本地仓库
  • 原文地址:https://www.cnblogs.com/chinesern/p/8393535.html
Copyright © 2011-2022 走看看