Oracle 11gR2静默安装

经常搭建Oracle测试环境,有时候觉得OUI(即图形界面)方式甚是繁琐,你得一步一步进行确认,所幸,Oracle支持静默安装。在我看来,它主要有两方面的好处:一、极大地提升了效率,尤其是批量安装。二、很多时候,只有终端环境可供使用。

一、准备responseFile文件

从Oracle软件中获取文件模板

[[email protected] ~]$ cd database/response/
dbca.rsp        db_install.rsp  netca.rsp

其中database是Oracle软件解压后生成的目录。可见在response目录下有三个模板,其中dbca.rsp是用来创建数据库的。db_install.rsp是用来安装Oracle软件的。netca.rsp是用来创建监听器的。当然也可在db_install.rsp中直接创建数据库。在这里,为求方便,我们选择db_install.rsp模板一并安装软件,创建数据库。

二、编辑responseFile文件

[[email protected] ~]$ grep -Ev "^$|^#" db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_AND_CONFIG
ORACLE_HOSTNAME=node2.being.com
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0.1/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=400
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=oracle
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u01/app/oracle/oradata
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/u01/app/oracle/fast_recovery_area
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

手工填写部分如上红色所示。

三、 静默安装

[[email protected] database]$ ./runInstaller -help

如果对runInstaller的参数不是很了解的话,可通过该命令进行查看。

[[email protected] database]$ ./runInstaller -help
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-04-01_10-05-47PM. Please wait ...[[email protected] database]$ Usage:
runInstaller  [-options] [(<CommandLineVariable=Value>)*]

Where options include:
  -clusterware oracle.crs,<crs version>
    Version of Cluster ready services installed.

  -crsLocation <Path>
    Used only for cluster installs, specifies the path to the crs home location. Specifying this overrides CRS information obtained from central inventory.

  -invPtrLoc <full path of oraInst.loc>
    Unix only. To point to a different inventory location. The orainst.loc file contains:
inventory_loc=<location of central inventory>
inst_group=<> 

  -jreLoc <location>
    Path where Java Runtime Environment is installed. OUI cannot be run without it.

  -logLevel <level>
    To filter log messages that have a lesser priority level than <level>. Valid options are: severe, warning, info, config, fine, finer, finest, basic, general, detailed, trace. The use of basic, general, detailed, trace is deprecated.

  -paramFile <location of file>
    Specify location of oraparam.ini file to be used by OUI.

  -responseFile <Path>
    Specifies the response file and path to use.

  -attachHome
    For attaching homes to the OUI inventory.

  -cfs
    Indicates that the Oracle home specified is on cluster file system (shared). This is mandatory when ‘-local‘ is specified so that Oracle Universal Installer can register the home appropriately into the inventory.

  -clone
    For making an Oracle Home copy match its current environment.

  -debug
    For getting the debug information from OUI.

  -detachHome
    For detaching homes from the OUI inventory without deleting inventory directory inside Oracle home.

  -enableRollingUpgrade
    Used in cluster environment, to enable upgrade of a product on a subset of nodes (on which the product was installed). 

  -executeSysPrereqs
    Execute system pre-requisite checks and exit.

  -force
    Allowing silent mode installation into a non-empty directory.

  -help
    Displays above usage.

  -ignoreSysPrereqs
    For ignoring the results of the system pre-requisite checks.

  -local
    Performs the operation on the local node irrespective of the cluster nodes specified.

  -printdiskusage
    Log debug information for disk usage.

  -printmemory
    Log debug information for memory usage.

  -printtime
    Log debug information for time usage.

  -relink
    For performing relink actions on the oracle home
     Usage: -relink -maketargetsxml <location of maketargetsxml> [-makedepsxml <location of makedepsxml>] [name=value] 

  -silent
    For silent mode operations, the inputs can be a response file or a list of command line variable value pairs.

  -waitforcompletion
    Installer will wait for completion instead of spawning the java engine and exiting.

  -suppressPreCopyScript
    Suppress the execution of precopy script.

  -acceptUntrustedCertificates
    Accept untrusted certificates from a secure site.

  -suppressPostCopyScript
    Suppress the execution of postcopy script.

  -noconfig
    Do not execute config tools.

  -noconsole
    For suppressing display of messages to console. Console is not allocated.

  -formCluster
    To install the Oracle clusterware in order to form the cluster.

  -remotecp <Path>
    Unix specific option. Used only for cluster installs, specifies the path to the remote copy program on the local cluster node.

  -remoteshell <Path>
    Unix specific option. Used only for cluster installs, specifies the path to the remote shell program on the local cluster node.

  -executePrereqs
    To execute only the prerequisite checks.

  -ignorePrereq
    To ignore running the prerequisite checks.

  -ignoreInternalDriverError
    To ignore any internal driver errors.

  -downloadUpdates
    To download updates only.

  -showProgress
    To show the installation progress on the console. This option is supported only in case of silent installation.

Command Line Variables Usage
  Command line variables are specified using <name=value>; for example:
    [ session: | compName: | compName:version: ]variableName=" valueOfVariable"]

   Session/Installer variables are specified using:
          [session:]varName=value
    Ex 1: session:ORACLE_HOME_NAME="OraHome"
    Ex 2: ORACLE_HOME_NAME="OraHome"
    The lookup order is session:varName then just varName. The session prefix is used to avoid ambiguity.

   Component variables are specified using:
          [compInternalName:[Version:]]varName
    Ex 1: oracle.comp1:1.0.1:varName="VarValue"
    Ex 2: oracle.comp1:varName="VarValue"
    The lookup order is compInternalName:Version:varName, then compInternalName:varName, then just varName.

开始静默安装

[[email protected] database]$ ./runInstaller -silent -ignorePrereq -showProgress -responseFile /home/oracle/db_install.rsp

其中-silent指的是静默安装,-ignorePrereq忽略prerequisite检查,showProgress显示进度,responseFile是种子文件。

[[email protected] database]$ ./runInstaller -silent -ignorePrereq -showProgress -responseFile /home/oracle/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 3073 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-04-01_10-13-42PM. Please wait ...[[email protected] database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
   CAUSE: The Central Inventory is located in the Oracle base.
   ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-30011] The ADMIN password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
You can find the log of this install session at:
 /u01/app/oracle/oraInventory/logs/installActions2015-04-01_10-13-42PM.log

Prepare in progress.
..................................................   8% Done.

Prepare successful.

Copy files in progress.
..................................................   15% Done.
..................................................   21% Done.
..................................................   27% Done.
..................................................   34% Done.
..................................................   39% Done.
..................................................   44% Done.
..................................................   52% Done.
..................................................   57% Done.
..................................................   62% Done.
..................................................   67% Done.
........................................
Copy files successful.

Link binaries in progress.
..........
Link binaries successful.

Setup files in progress.
..................................................   72% Done.
..............................
Setup files successful.
The installation of Oracle Database 11g was successful.
Please check ‘/u01/app/oracle/oraInventory/logs/silentInstall2015-04-01_10-13-42PM.log‘ for more details.

Oracle Net Configuration Assistant in progress.
..................................................   86% Done.

Oracle Net Configuration Assistant successful.

Oracle Database Configuration Assistant in progress.
..................................................   95% Done.

Oracle Database Configuration Assistant successful.

Execute Root Scripts in progress.

As a root user, execute the following script(s):
    1. /u01/app/oracle/oraInventory/orainstRoot.sh
    2. /u01/app/oracle/product/11.2.0.1/db_1/root.sh

..................................................   100% Done.

Execute Root Scripts successful.
Successfully Setup Software.

最后,需root用户手动执行以下两个文件:

1. /u01/app/oracle/oraInventory/orainstRoot.sh

2. /u01/app/oracle/product/11.2.0.1/db_1/root.sh

当然,也可查看/u01/app/oracle/oraInventory/logs/installActions2015-04-01_10-13-42PM.log了解具体的安装信息。

时间: 2024-08-14 01:28:18

Oracle 11gR2静默安装的相关文章

CentOS X64上64位Oracle 11gR2 静默安装

CentOS 6.2 X64上64位Oracle 11gR2 静默安装 www.linuxidc.com/Linux/2012-03/56606p4.htm HP-UX静默安装oracle11g过程 http://blog.csdn.net/yangyinbo/article/details/6221220 docker下oracle11g安装 http://blog.sina.com.cn/s/blog_d840ff330102v4j0.html 解决oracle 11g startup 问题

CentOS6.5内 Oracle 11GR2静默安装

一.修改配置文件 1.1.修改/etc/security/limits.conf文件,修改用户的SHELL的限制. 输入命令:vi /etc/security/limits.conf,将下列内容加入该文件 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 1.2.修改/etc/pam.d/login 文件. 输入命令:vi  /etc/pam.d/logi

[转]--Oracle 11gR2静默安装 &amp; 命令行安装

静默安装 经常搭建Oracle测试环境,有时候觉得OUI(即图形界面)方式甚是繁琐,你得一步一步进行确认,所幸,Oracle支持静默安装.在我看来,它主要有两方面的好处:一.极大地提升了效率,尤其是批量安装.二.很多时候,只有终端环境可供使用. 一.准备responseFile文件 从Oracle软件中获取文件模板 [[email protected] ~]$ cd database/response/ dbca.rsp db_install.rsp netca.rsp 其中database是O

Oracle database 11gR2静默安装

环境为OL 6.5和CentOS 6.5; Oracle database版本: linux.x64_11gR2 Oracle数据库静默安装,1)不用安装桌面: 2)安装速度快,且不用人一直守着: 需要做四件事,不过在做这些之前,你需要正确的添加oracle相关的用户及组,并且分配相应的权限,以及检查安装的前提条件. 1) 解压: unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip 2)复

Oracle 11gR2 RAC 安装Grid Infrastructure错误

Oracle 11gR2 RAC 安装Grid Infrastructure错误 系统环境: 操作系统:RedHat EL5 Cluster: Oracle GI(Grid Infrastructure) Oracle:  Oracle 11.2.0.1.0 如图所示:RAC 系统架构   对于Oracle 11G构建RAC首先需要构建GI(Grid Infrastructure)的架构 错误现象: 报:node2 检测用户信任关系错误,node2安装目录不可访问! 手工检测,node2与nod

Redhat 5.8 ORACLE 11gR2 RAC安装文档2-grid安装

3.安装Grid 3.1.安装rpm包 两个节点都要安装,以节点1为例 [[email protected] yum.repos.d]# yum install compat-libstdc++-33 ksh gcc gcc-c++ libgomp elfutils-libelf-devel glibc-devel glibc-headers libaio-devel libstdc++-devel sysstat unixODBC unixODBC-devel –y -----.. Compl

oracle 10g 静默安装(无图形化)

Oracle 10g无图形界面安装 此文档是在oracle环境变量已经配置完成,不缺少依赖包的情况下进行安装: 解压oracle的安装包, 首先vi database/response/enterprise.rsp 修改文件中的ORACLE_HOME和ORACLE_HOME_NAME两个参数为实际参数 ORACLE_HOME=实际的路径 ORACLE_HOME_NAME只是一个名称,修改就可以了. 然后执行命令: ./runInstaller -silent -responseFile data

oracle 11G 静默安装

首先上传: 上传两个database软件包到/dir 目录下 Unzip p13390677_112040_Linux-x86-64_1of7.zip Unzip p13390677_112040_Linux-x86-64_2of7.zip 请记住这两个软件包一个一个解压. [[email protected] dir]#groupadd oinstall   创建安装组 [[email protected] dir]#useradd -g oinstall -d /home/oracle or

六步搞定Linux Oracle 11gR2 配置安装

话不多说,下载Oracle 11gR2,注意为两个包linux_11gR2_database_1of2.zip,linux_11gR2_database_2of2.zip,下载后上传到Linux. 一.Linux系统下要安装的数据包. 个人经验,安装Linux过程中,选择全部默认的包,基本就安装差不多了. linux系统要安装好以下的包,要安装的包有: binutils-2.15.92.0-10.EL4 compat-db-4.1.25-9 compat-gcc-32-3.2.3-47.3  c