zoukankan      html  css  js  c++  java
  • [原]在Solaris 10/09上静默安装和升级Oracle 10g和Oracle 11g(二)

    Oracle的静默安装最重要的是应答文件,可以通过 OUI 安装的时候录制应答文件,在 Oracle 10g 的安装文件目录有个 response 目录,里面放着应答文件的模板。

    # 解开安装文件压缩包
    [root@V890 /]$ su - ora10g
    Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
    [ora10g@V890 ~]$ ls
    10gr2          local.cshrc    local.login    local.profile
    [ora10g@V890 ~]$ cd 10gr2/
    [ora10g@V890 10gr2]$ ls
    10gr2_db_sol.cpio.gz
    [ora10g@V890 10gr2]$ gzip -dc 10gr2_db_sol.cpio.gz | cpio -idmv 
    [ora10g@V890 10gr2]$ cd response
    [ora10g@V890 response]$ ls -lth 
    总数 451
    -rwxr-xr-x   1 ora10g   oracle       25K 2005   8月 18 custom.rsp
    -rw-r--r--   1 ora10g   oracle       44K 2005   8月 18 dbca.rsp
    -rwxr-xr-x   1 ora10g   oracle      8.3K 2005   8月 18 emca.rsp
    -rwxr-xr-x   1 ora10g   oracle       69K 2005   8月 18 enterprise.rsp
    -rw-r--r--   1 ora10g   oracle      5.6K 2005   8月 18 netca.rsp
    -rwxr-xr-x   1 ora10g   oracle       69K 2005   8月 18 standard.rsp
    模板文件对于每一个参数都有相信的说明,包括其参数之间的依赖关系,填写起来不会太难的,我用的是 enterprise.rsp 这个文件作为模板的。
    [ora10g@V890 response]$ pwd
    /home/ora10g/10gr2/response
    [ora10g@V890 response]$ cp enterprise.rsp  ~/ 
    # 修改响应文件
    [ora10g@V890 ~]$ cat enterprise.rsp | grep -v "^#" | grep -v "^$"
    RESPONSEFILE_VERSION=2.2.1.0.0
    UNIX_GROUP_NAME="oracle"
    FROM_LOCATION="../stage/products.xml"
    NEXT_SESSION_RESPONSE="nextinstall_10g.rsp"
    ORACLE_HOME="/u01/app/ora10g/product/10.2.0/db_1"
    ORACLE_HOME_NAME="OraDbHome1"
    TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}
    DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}
    SHOW_SPLASH_SCREEN=false
    SHOW_WELCOME_PAGE=false
    SHOW_NODE_SELECTION_PAGE=false
    SHOW_SUMMARY_PAGE=false
    SHOW_INSTALL_PROGRESS_PAGE=false
    SHOW_CONFIG_TOOL_PAGE=false
    SHOW_XML_PREREQ_PAGE=false
    SHOW_ROOTSH_CONFIRMATION=true
    SHOW_END_SESSION_PAGE=false
    SHOW_EXIT_CONFIRMATION=false
    NEXT_SESSION=false
    NEXT_SESSION_ON_FAIL=false
    SHOW_DEINSTALL_CONFIRMATION=false
    SHOW_DEINSTALL_PROGRESS=false
    RESTART_SYSTEM=false
    RESTART_REMOTE_SYSTEM=false
    REMOVE_HOMES={"/u01/app/ora10g/product/10.2.0/db_1"}
    ORACLE_HOSTNAME=GDCASERVER
    SHOW_END_OF_INSTALL_MSGS=false
    COMPONENT_LANGUAGES={"en"}
    INSTALL_TYPE="EE"
    s_nameForDBAGrp="oracle"
    s_nameForOPERGrp="oracle"
    n_configurationOption=1
    s_ASMSYSPassword=""
    s_ASMSYSPasswordAgain=""
    n_dbType=1
    s_globalDBName="ora10g.v890"
    s_dbSid="ORA10G"
    s_dbRetChar="ZHS16GBK"
    b_loadExampleSchemas=false
    b_useDBControl=true
    b_receiveEmailNotification=false
    n_dbStorageType=1
    s_mountPoint="/u02/oradata/ora10g/ORA10G/"
    b_enableAutoBackup=false
    b_useFileSystemForRecovery=true
    s_dlgRBORecoveryLocation=/u01/app/ora10g/flash_recovery_area
    b_useSamePassword=true
    s_superAdminSamePasswd="oracle"
    s_superAdminSamePasswdAgain="oracle"
    sl_superAdminPasswds={"oracle","oracle","oracle","oracle"}
    sl_superAdminPasswdsAgain={"oracle","oracle","oracle","oracle"}
    n_performUpgrade=0
    n_upgradeDB=0
    s_dbOHSelectedForUpgrade=""
    s_dbSIDSelectedForUpgrade=""
    n_upgradeASM=0
    s_dbSelectedUsesASM="no"
    sl_upgradableSIDBInstances={}
    sl_upgradableRACDBInstances={}
    n_dbSelection=0
    b_stateOfUpgradeASMCheckbox=false
    b_stateOfUpgradeDBCheckbox=false
    b_oneClick=false
    s_dlgASMCfgRedundancyValue=""
    s_dlgASMCfgExistingFreeSpace="0"
    s_dlgASMCfgNewDisksSize=""
    s_dlgASMCfgAdditionalSpaceNeeded="0 MB"
    #
    # 
    # 万事具备只欠一条命令了
    # 开始静默安装
    [ora10g@V890 10gr2]$ ./runInstaller -silent -force -ignoreSysprereqs -responseFile /home/ora10g/enterprise.rsp 

    此时可以看到屏幕有提示信息,可以使用 tail -f 查看相应的日志文件。

    最后,屏幕会提示以 root 执行两个脚本。

    [root@V890 /]$ /u01/app/ora10g/oraInventory/orainstRoot.sh 
    [root@V890 /]$ /u01/app/ora10g/product/10.2.0/db_1/root.sh 

    执行完之后,Oracle 10gR2 就安装完成了,非常简单。查看相关进程可以发现 Oracle 已经启动了。

    [ora10g@V890 10gr2]$ ps -ef | grep ora_
      ora10g 25131     1   0 12:53:02 ?           0:00 ora_lgwr_ORA10G
      ora10g 26177     1   0 13:07:20 ?           0:00 ora_j000_ORA10G
      ora10g 25123     1   0 12:53:02 ?           0:00 ora_pmon_ORA10G
      ora10g 25129     1   0 12:53:02 ?           0:00 ora_dbw0_ORA10G
      ora10g 25135     1   0 12:53:02 ?           0:00 ora_smon_ORA10G
      ora10g 25145     1   0 12:53:03 ?           0:00 ora_d000_ORA10G
      ora10g 25125     1   0 12:53:02 ?           0:00 ora_psp0_ORA10G
      ora10g 25133     1   0 12:53:02 ?           0:01 ora_ckpt_ORA10G
      ora10g 25139     1   0 12:53:02 ?           0:01 ora_cjq0_ORA10G
      ora10g 25143     1   0 12:53:03 ?           0:01 ora_mmnl_ORA10G
      ora10g 25137     1   0 12:53:02 ?           0:00 ora_reco_ORA10G
      ora10g 25127     1   0 12:53:02 ?           0:01 ora_mman_ORA10G
      ora10g 26179 22937   0 13:07:23 pts/3       0:00 grep ora_
      ora10g 25151     1   0 12:53:08 ?           0:00 ora_qmnc_ORA10G
      ora10g 25147     1   0 12:53:03 ?           0:00 ora_s000_ORA10G
      ora10g 25141     1   0 12:53:02 ?           0:01 ora_mmon_ORA10G
      ora10g 25237     1   0 12:53:18 ?           0:00 ora_q000_ORA10G
      ora10g 25254     1   0 12:53:23 ?           0:00 ora_q001_ORA10G

    再看一下数据文件的情况:

    [ora10g@V890 10gr2]$ sqlplus / as sysdba
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 2 13:12:53 2010
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    
    SQL> select member from v$logfile;
    
    MEMBER
    --------------------------------------------------------------------------------
    /u02/oradata/ora10g/ORA10G/ora10g/redo03.log
    /u02/oradata/ora10g/ORA10G/ora10g/redo02.log
    /u02/oradata/ora10g/ORA10G/ora10g/redo01.log
    
    SQL> select name from v$controlfile;
    
    NAME
    --------------------------------------------------------------------------------
    /u02/oradata/ora10g/ORA10G/ora10g/control01.ctl
    /u02/oradata/ora10g/ORA10G/ora10g/control02.ctl
    /u02/oradata/ora10g/ORA10G/ora10g/control03.ctl
    
    SQL> select name from v$datafile ;   
    
    NAME
    --------------------------------------------------------------------------------
    /u02/oradata/ora10g/ORA10G/ora10g/system01.dbf
    /u02/oradata/ora10g/ORA10G/ora10g/undotbs01.dbf
    /u02/oradata/ora10g/ORA10G/ora10g/sysaux01.dbf
    /u02/oradata/ora10g/ORA10G/ora10g/users01.dbf

    自此 Oracle 10gR2 在 Solaris 上安装完成,从整个过程来看,只要准备好了应答文件,感觉上比图形安装界面要方便很多。

  • 相关阅读:
    python中类(class)和实例(instance)
    python面向对象
    python中初始化实例属性
    python之使用__future__(解决版本不同,不兼容问题)
    python中动态导入模块
    python之导入模块
    python中偏函数
    python中完善decorator
    python中编写带参数decorator
    python中编写无参数decorator
  • 原文地址:https://www.cnblogs.com/killkill/p/1754805.html
Copyright © 2011-2022 走看看