zoukankan      html  css  js  c++  java
  • Oracle11gR2--静默安装数据库软件

    1.安装相关的包(略)

    2.建oracle用户 组

      groupadd oinstall --$ORACLE HOME/rdbms/lib/config.c
      groupadd dba
      chattr -i /etc/passwd /etc/shadow
      useradd -g oinstall -G dba oracle
      passwd oracle
      chattr +i /etc/passwd /etc/shadow
    

    3.系统参数调整(略)

    [root@localhost oracle]# cat /etc/sysctl.conf
    [root@localhost oracle]# cat /etc/security/limits.conf 
    

    4.环境变量设置

     export ORACLE_BASE=/home/oracle/app
     export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
     export ORACLE_SID=orcl
     export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
     export LANG="en_US.UTF-8"
     export NLS_LANG=american_AMERICA.UTF8
     export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
    

    5.静默安装之编辑response文件(注意:11gR2以后最好是在模板的基础上做)

    cd /home/oracle/app/database/response
    vi db_install_new.rsp 
    
    
    oracle.install.option=INSTALL_DB_SWONLY       #只安装数据库软件
    UNIX_GROUP_NAME=dba                           #Oracle用户用于安装软件的组名
    
    
    [oracle@localhost ~]$ cat /etc/oraInst.loc 
    INVENTORY_LOCATION=/u01/app/oraInventory
    
    #相关目录
    INVENTORY_LOCATION=/home/oracle/oraInventory  #oracle产品清单目录
    ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1  #oracle安装目录
    ORACLE_BASE=/home/oracle/app                                 #oracle基础目录
    
    #安装版本
    oracle.install.db.InstallEdition=EE
    
    #用户组设置
    oracle.install.db.DBA_GROUP=dba               #oracle用户用于授权OSDBA权限的组名  
    oracle.install.db.OPER_GROUP=oinstall         #oracle用户用于授权OSPRR权限的组名  
    
    #延迟安全检查
    DECLINE_SECURITY_UPDATES=true
    
    [oracle@localhost ~]$ cat /etc/oraInst.loc 
    

    6.开始静默安装

    [oracle@localhost database]$  ./runInstaller -silent -responseFile /home/oracle/app/database/response/db_install_new.rsp -ignoreSysPrereqs
    Starting Oracle Universal Installer...
    
    Checking Temp space: must be greater than 120 MB.   Actual 29365 MB    Passed
    Checking swap space: must be greater than 150 MB.   Actual 4016 MB    Passed
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-01-29_08-57-06PM. Please wait ...[oracle@localhost database]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.
       CAUSE: Some of the optional prerequisites are not met. See logs for details. /home/oracle/oraInventory/logs/installActions2018-01-29_08-57-06PM.log
       ACTION: Identify the list of failed prerequisite checks from the log: /home/oracle/oraInventory/logs/installActions2018-01-29_08-57-06PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
    You can find the log of this install session at:
     /home/oracle/oraInventory/logs/installActions2018-01-29_08-57-06PM.log
    The installation of Oracle Database 11g was successful.
    Please check '/home/oracle/oraInventory/logs/silentInstall2018-01-29_08-57-06PM.log' for more details.
    
    As a root user, execute the following script(s):
    		1. /home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh
    
    
    [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-30_14-21-01.log for the output of root script
    
    
    [oracle@localhost database]$ exit
    登出
    [root@localhost oracle]# /u01/app/oracle/product/12.2.0/dbhome_1/root.sh
    

    7.验证:

    [root@localhost ~]# su - oracle
    [oracle@localhost ~]$ sqlplus  / as sysdba
    
    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jan 31 15:01:32 2018
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    Connected to an idle instance.
  • 相关阅读:
    java中计算两个时间差
    增强for循环用法
    SQLServer类型与Java类型转换问题解决
    有关SQL模糊查询
    js 弹出div窗口 可移动 可关闭 (转)
    登陆sqlserver及修改端口号 (转)
    C#判断IP地址是否合法函数-使用正则表达式-2个 (转)
    c#图像处理入门(-bitmap类和图像像素值获取方法) 转
    MongoDB C#驱动中Query几个方法 (转)
    微信公众帐号自定义菜单创建及事件响应开发教程 附源代码(转)
  • 原文地址:https://www.cnblogs.com/chinesern/p/8392355.html
Copyright © 2011-2022 走看看