oracle 11.2.0.4 rac静默安装

具体可参考:https://www.cnblogs.com/hmwh/p/8484696.html

一、静默安装grid

1、通过参数形式传入 此方式推荐使用自动安装时使用如使用ansible自动化安装时可使用该方式

/dbsoftware/tools/oracle_11g/grid/runInstaller -silent -force -waitforcompletion -ignoresysprereqs -ignorePrereq INVENTORY_LOCATION=/dbsoftware/u01/app/oraInventory SELECTED_LANGUAGES=en ORACLE_BASE=${ORACLE_BASE} ORACLE_HOME=${GRID_HOME} ORACLE_HOME_NAME=“Ansible_gi_11204” oracle.install.option=HA_CONFIG oracle.install.asm.OSDBA=dba oracle.install.asm.OSASM=oinstall oracle.install.asm.diskGroup.name={{ asm_create_file_dest }} oracle.install.asm.diskGroup.redundancy=EXTERNAL oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/* oracle.install.asm.diskGroup.disks=/dev/oracleasm/disk1 oracle.install.asm.SYSASMPassword={{ global_password }} oracle.install.asm.monitorPassword={{ global_password }}’

2、也可以修改安装目录response目录中的grid_install.rsp文件,而不用传入这么多参数

1)准备response file

将安装目录的response目录中的grid_install.rsp文件备份,再编辑该文件
cp grid_install.rsp grid_install.rsp.bak
vi grid_install.rsp
下面是对grid_install.rsp文件修改的内容(仅供修改参考,不可直接拷贝使用):
模版一:
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/gridbase
ORACLE_HOME=/u01/app/grid/11.2.0
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=wstrac.scan.com
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.clusterName=rac-cluster
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.clusterNodes=rac1:rac1vip,rac2:rac2vip
oracle.install.crs.config.networkInterfaceList=bond0:11.11.2.0:1,bond1:11.11.0.0:2
oracle.install.crs.config.storageOption=ASM_STORAGE
oracle.install.crs.config.useIPMI=false
oracle.install.asm.SYSASMPassword=oracle_Schic1
oracle.install.asm.diskGroup.name=OCRVDISK
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=1
oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/OCRVDISK1,/dev/oracleasm/disks/OCRVDISK2,/dev/oracleasm/disks/OCRVDISK3,/dev/oracleasm/disks/OCRVDISK4
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/*
oracle.install.asm.monitorPassword=oracle_Schic1
oracle.install.asm.upgradeASM=false
模版二:
#保持默认
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=node1

#版本信息路径
INVENTORY_LOCATION=/u01/app/oraInventory

#语言:中文是zh_CN,多选用“,”隔开
SELECTED_LANGUAGES=en

#默认
oracle.install.option=CRS_CONFIG

#grid 的 BASE 和 HOME 目录
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/11.2.0/grid

#添加所需要的组
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin

#scan 名,与hosts对应
oracle.install.crs.config.gpnp.scanName=nodescan

#listener对外服务端口
oracle.install.crs.config.gpnp.scanPort=1521

#cluster 名称
oracle.install.crs.config.clusterName=nodeclu

#GNS 此处不开,其对应值空着
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.autoConfigureClusterNodeVIP=false

#配置网络信息
oracle.install.crs.config.clusterNodes=node1:node1vip,node2:node2vip
oracle.install.crs.config.networkInterfaceList=eth0:192.168.66.0:1,eth1:10.10.10.0:2

#配置存储形式
oracle.install.crs.config.storageOption=ASM_STORAGE
oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=NORMAL
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=NORMAL

#配置 IPMI
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=

#配置ASM
oracle.install.asm.SYSASMPassword=oracle
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=1
oracle.install.asm.diskGroup.disks=/dev/raw/raw1
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/raw/*
oracle.install.asm.monitorPassword=oracle

#升级选项为false,其余选项空着
oracle.install.crs.upgrade.clusterNodes=
oracle.install.asm.upgradeASM=false
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=

根据模版修改后为:
[grid@cim-kfxt-db01 response]$ grep “^[^#]” grid_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=cim-kfxt-db01
INVENTORY_LOCATION=/dbsoftware/g01/app/oraInventory
SELECTED_LANGUAGES=en
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/dbsoftware/g01/app/grid
ORACLE_HOME=/dbsoftware/g01/app/grid/product/11.2.0/gi_1
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=kfxt-scan-ip
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.clusterName=rac-cluster
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.autoConfigureClusterNodeVIP=
oracle.install.crs.config.clusterNodes=cim-kfxt-db01:kfxt-db01-vip,cim-kfxt-db02:kfxt-db02-vip,cim-kfxt-db03:kfxt-db03-vip
oracle.install.crs.config.networkInterfaceList=eth0:172.22.68.0:1,eth1:4.4.4.0:2
oracle.install.crs.config.storageOption=ASM_STORAGE
oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=NORMAL
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=NORMAL
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
oracle.install.asm.SYSASMPassword=vgaZG5NnMR50QQQ
oracle.install.asm.diskGroup.name=OCRVDISK
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=1
oracle.install.asm.diskGroup.disks=/dev/oracleasm/ocrvdisk01,/dev/oracleasm/ocrvdisk02,/dev/oracleasm/ocrvdisk03
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/*
oracle.install.asm.monitorPassword=vgaZG5NnMR50QQQ
oracle.install.crs.upgrade.clusterNodes=
oracle.install.asm.upgradeASM=false
oracle.installer.autoupdates.option=
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=

2)运行安装命令

检查安装环境:
./runcluvfy.sh stage -pre crsinst -n cim-kfxt-db01,cim-kfxt-db02,cim-kfxt-db03 -fixup -verbose >> show
开始安装:
/dbsoftware/tools/oracle_11g/grid/runInstaller -responseFile /dbsoftware/tools/oracle_11g/grid/response/grid_install.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress
[grid@cim-kfxt-db01 grid]$ ./runInstaller -responseFile /mnt/grid/response/grid_install.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 120 MB. Actual 11869 MB Passed
Checking swap space: must be greater than 150 MB. Actual 18431 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-09-25_06-06-45PM. Please wait …[grid@cim-kfxt-db01 grid]$ You can find the log of this install session at:/dbsoftware/g01/app/oraInventory/logs/installActions2018-09-25_06-06-45PM.log

Prepare in progress.
… 9% Done.

Prepare successful.

Copy files in progress.
… 15% Done.
… 20% Done.
… 25% Done.
… 30% Done.
… 35% Done.
… 40% Done.
… 45% Done.

Copy files successful.

Link binaries in progress.

Link binaries successful.
… 62% Done.

Setup files in progress.

Setup files successful.
… 76% Done.
[grid@cim-kfxt-db01 grid]$
Perform remote operations in progress.
… 89% Done.

Perform remote operations successful.
The installation of Oracle Grid Infrastructure 11g was successful.
Please check ‘/dbsoftware/g01/app/oraInventory/logs/silentInstall2018-09-25_06-06-45PM.log’ for more details.
… 94% Done.

Execute Root Scripts in progress.

As a root user, execute the following script(s):
1. /dbsoftware/g01/app/oraInventory/orainstRoot.sh
2. /dbsoftware/g01/app/product/11.2.0/gi_1/root.sh

Execute /dbsoftware/g01/app/oraInventory/orainstRoot.sh on the following nodes:
[cim-kfxt-db01, cim-kfxt-db02, cim-kfxt-db03]
Execute /dbsoftware/g01/app/product/11.2.0/gi_1/root.sh on the following nodes:
[cim-kfxt-db01, cim-kfxt-db02, cim-kfxt-db03]

… 100% Done.

Execute Root Scripts successful.
As install user, execute the following script to complete the configuration.
1. /dbsoftware/g01/app/product/11.2.0/gi_1/cfgtoollogs/configToolAllCommands RESPONSE_FILE=<response_file>

Note:
1. This script must be run on the same host from where installer was run.
2. This script needs a small password properties file for configuration assistants that require passwords (refer to install guide documentation).

Successfully Setup Software.

执行root.sh时报错:

PRKC-1024 : Invalid netmask: eth0
由于此次所有节点的子网掩码是:255.255.255.240,所以

解决方法:

修改所有节点中的/dbsoftware/g01/app/product/11.2.0/gi_1/crs/install/crsconfig_params文件中:
CRS_NODEVIPS=‘kfxt-db01-vip//eth0,kfxt-db02-vip//eth0,kfxt-db03-vip//eth0’
为:

CRS_NODEVIPS=‘kfxt-db01-vip/255.255.255.240/eth0,kfxt-db02-vip/255.255.255.240/eth0,kfxt-db03-vip/255.255.255.240/eth0’

然后清除crs

[root@cim-kfxt-db01 install]# perl rootcrs.pl -deconfig -force
Using configuration parameter file: ./crsconfig_params
PRKO-2439 : VIP does not exist.
PRKO-2312 : GSD does not exist.
PRKO-2331 : ONS daemon does not exist.

CRS-2613: Could not find resource ‘ora.registry.acfs’.
CRS-4000: Command Stop failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘cim-kfxt-db01’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.crsd’ on ‘cim-kfxt-db01’ succeeded
CRS-2673: Attempting to stop ‘ora.ctssd’ on ‘cim-kfxt-db01’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘cim-kfxt-db01’
CRS-2673: Attempting to stop ‘ora.asm’ on ‘cim-kfxt-db01’
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘cim-kfxt-db01’
CRS-2673: Attempting to stop ‘ora.drivers.acfs’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.evmd’ on ‘cim-kfxt-db01’ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘cim-kfxt-db01’ succeeded
CRS-2677: Stop of ‘ora.ctssd’ on ‘cim-kfxt-db01’ succeeded
CRS-2677: Stop of ‘ora.asm’ on ‘cim-kfxt-db01’ succeeded
CRS-2673: Attempting to stop ‘ora.cluster_interconnect.haip’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.cluster_interconnect.haip’ on ‘cim-kfxt-db01’ succeeded
CRS-2673: Attempting to stop ‘ora.cssd’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.drivers.acfs’ on ‘cim-kfxt-db01’ succeeded
CRS-2677: Stop of ‘ora.cssd’ on ‘cim-kfxt-db01’ succeeded
CRS-2673: Attempting to stop ‘ora.crf’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.crf’ on ‘cim-kfxt-db01’ succeeded
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.gipcd’ on ‘cim-kfxt-db01’ succeeded
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘cim-kfxt-db01’
CRS-2677: Stop of ‘ora.gpnpd’ on ‘cim-kfxt-db01’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘cim-kfxt-db01’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node

再重新执行root.sh

[grid@cim-kfxt-db01 grid]$ /dbsoftware/g01/app/product/11.2.0/gi_1/root.sh

最后执行

[grid@cim-kfxt-db01 grid]$ /dbsoftware/g01/app/product/11.2.0/gi_1/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/mnt/grid/response/grid_install.rsp
Setting the invPtrLoc to /dbsoftware/g01/app/product/11.2.0/gi_1/oraInst.loc
perform - mode is starting for action: configure
perform - mode finished for action: configure
You can see the log file: /dbsoftware/g01/app/product/11.2.0/gi_1/cfgtoollogs/oui/configActions2018-09-25_06-56-32-PM.log

检查:

[grid@cim-kfxt-db01 grid]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora…ER.lsnr ora…er.type ONLINE ONLINE cim-…db01
ora…N1.lsnr ora…er.type ONLINE ONLINE cim-…db01
ora…DISK.dg ora…up.type ONLINE ONLINE cim-…db01
ora.asm ora.asm.type ONLINE ONLINE cim-…db01
ora…SM1.asm application ONLINE ONLINE cim-…db01
ora…01.lsnr application ONLINE ONLINE cim-…db01
ora…b01.gsd application OFFLINE OFFLINE
ora…b01.ons application ONLINE ONLINE cim-…db01
ora…b01.vip ora…t1.type ONLINE ONLINE cim-…db01
ora…SM2.asm application ONLINE ONLINE cim-…db02
ora…02.lsnr application ONLINE ONLINE cim-…db02
ora…b02.gsd application OFFLINE OFFLINE
ora…b02.ons application ONLINE ONLINE cim-…db02
ora…b02.vip ora…t1.type ONLINE ONLINE cim-…db02
ora…SM3.asm application ONLINE ONLINE cim-…db03
ora…03.lsnr application ONLINE ONLINE cim-…db03
ora…b03.gsd application OFFLINE OFFLINE
ora…b03.ons application ONLINE ONLINE cim-…db03
ora…b03.vip ora…t1.type ONLINE ONLINE cim-…db03
ora.cvu ora.cvu.type ONLINE ONLINE cim-…db01
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora…network ora…rk.type ONLINE ONLINE cim-…db01
ora.oc4j ora.oc4j.type ONLINE ONLINE cim-…db01
ora.ons ora.ons.type ONLINE ONLINE cim-…db01
ora…ry.acfs ora…fs.type ONLINE ONLINE cim-…db01
ora.scan1.vip ora…ip.type ONLINE ONLINE cim-…db01

二、静默安装监听

静默安装grid时已配置了监听,因此这步不用执行,单实例执行方式如下:
编辑数据库安装软件目录response下的netca.rsp文件
运行命令
netca -silent -responsefile /dbsoftware/tools/oracle_11g/database/response/netca.rsp

三、静默安装oracle软件

1、以传参数方式安装

{{ stage_directory }}/database/runInstaller -silent -force -waitforcompletion -ignoresysprereqs -ignorePrereq oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOME=${ORACLE_HOME} ORACLE_HOME_NAME=“Ansible_oh_11204” ORACLE_BASE=${ORACLE_BASE} oracle.install.db.InstallEdition=EE oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=dba DECLINE_SECURITY_UPDATES=true

2、以修改配置文件方式安装

1)备份、修改安装软件response目录中的db_install.rsp文件

cp /dbsoftware/tools/oracle_11g/database/response/db_install.rsp /dbsoftware/tools/oracle_11g/database/response/db_install.rsp.bak
vi /dbsoftware/tools/oracle_11g/database/response/db_install.rsp
模版:
##对整个文件的说明,该文件包含参数说明,静默文件中密码信息的保密 ##
####################################################################
#------------------------------------------------------------------------------
#Do not change the following system generatedvalue. 标注响应文件版本,这个版本必须和要#安装的数据库版本相同,安装检验无法通过,不能更改
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
#------------------------------------------------------------------------------
#Specify the installation option.
#It can be one of the following:
#1. INSTALL_DB_SWONLY
#2. INSTALL_DB_AND_CONFIG
#3. UPGRADE_DB
#选择安装类型:1.只装数据库软件 2.安装数据库软件并建库 3.升级数据库
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY
#-------------------------------------------------------------------------------
#Specify the hostname of the system as setduring the install. It can be used
#to force the installation to use analternative hostname rather than using the
#first hostname found on the system.(e.g., for systems with multiple hostnames
#and network interfaces)指定操作系统主机名,通过hostname命令获得
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=ora11gr2
#-------------------------------------------------------------------------------
#Specify the Unix group to be set for theinventory directory.
#指定oracle inventory目录的所有者,通常会是oinstall或者dba
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall
#-------------------------------------------------------------------------------
#Specify the location which holds theinventory files.
#指定产品清单oracle inventory目录的路径,如果是Win平台下可以省略
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
#-------------------------------------------------------------------------------
#Specify the languages in which thecomponents will be installed.
#en : English ja : Japanese
#fr : French ko : Korean
#ar : Arabic es : Latin American Spanish
#bn : Bengali lv : Latvian
#pt_BR: Brazilian Portuguese lt : Lithuanian
#bg : Bulgarian ms : Malay
#fr_CA: Canadian French es_MX: Mexican Spanish
#ca : Catalan no : Norwegian
#hr : Croatian pl : Polish
#cs : Czech pt : Portuguese
#da : Danish ro : Romanian
#nl : Dutch ru : Russian
#ar_EG: Egyptian zh_CN: Simplified Chinese
#en_GB: English (Great Britain) sk :Slovak
#et : Estonian sl : Slovenian
#fi : Finnish es_ES: Spanish
#de : German sv : Swedish
#el : Greek th : Thai
#iw : Hebrew zh_TW:Traditional Chinese
#hu : Hungarian tr : Turkish
#is : Icelandic uk : Ukrainian
#in : Indonesian vi :Vietnamese
#it : Italian
#Example : SELECTED_LANGUAGES=en,fr,ja
#指定数据库语言,可以选择多个,用逗号隔开。选择en, zh_CN(英文和简体中文)
#------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,zh_CN
#------------------------------------------------------------------------------
#Specify the complete path of the OracleHome.设置ORALCE_HOME的路径
#------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
#------------------------------------------------------------------------------
#Specify the complete path of the OracleBase. 设置ORALCE_BASE的路径
#------------------------------------------------------------------------------
ORACLE_BASE=/u01/app/oracle
#------------------------------------------------------------------------------
#Specify the installation edition of thecomponent.
#The value should contain only one ofthese choices.
#EE : EnterpriseEdition
#SE : Standard Edition
#SEONE Standard Edition One
#PE : Personal Edition (WINDOWS ONLY)
#选择Oracle安装数据库软件的版本(企业版,标准版,标准版1),不同的版本功能不同
#详细的版本区别参考附录D
#------------------------------------------------------------------------------
oracle.install.db.InstallEdition=EE
#------------------------------------------------------------------------------
#This variable is used to enable ordisable custom install.
#true : Components mentioned as part of ‘customComponents’ property
#are considered for install.
#false : Value for ‘customComponents’ isnot considered.
#是否自定义Oracle的组件,如果选择false,则会使用默认的组件
#如果选择true否则需要自己在下面一条参数将要安装的组件一一列出。
#安装相应版权后会安装所有的组件,后期如果缺乏某个组件,再次安装会非常的麻烦。
#------------------------------------------------------------------------------
oracle.install.db.isCustomInstall=true
#------------------------------------------------------------------------------
#This variable is considered only if’IsCustomInstall’ is set to true.
#Description: List of Enterprise EditionOptions you would like to install.
# The following choices areavailable. You may specify any
# combination of thesechoices. The components you chooseshould
# be specified in the form"internal-component-name:version"
# Below is a list of components youmay specify to install.
# oracle.rdbms.partitioning:11.2.0.1.0- Oracle Partitioning
# oracle.rdbms.dm:11.2.0.1.0- Oracle Data Mining
# oracle.rdbms.dv:11.2.0.1.0- Oracle Database Vault
# oracle.rdbms.lbac:11.2.0.1.0- Oracle Label Security
# oracle.rdbms.rat:11.2.0.1.0- Oracle Real Application Testing
# oracle.oraolap:11.2.0.1.0- Oracle OLAP
# oracle.install.db.isCustomInstall=true的话必须手工选择需要安装组件的话
#------------------------------------------------------------------------------
oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
###############################################################################
# PRIVILEGED OPERATING SYSTEM GROUPS
# Provide values for the OS groups to whichOSDBA and OSOPER privileges #
# needs to be granted. If the install isbeing performed as a member of the #
# group “dba”, then that will beused unless specified otherwise below. #
#指定拥有OSDBA、OSOPER权限的用户组,通常会是dba组
###############################################################################
#------------------------------------------------------------------------------
# The DBA_GROUP is the OS group which is tobe granted OSDBA privileges.
#------------------------------------------------------------------------------
oracle.install.db.DBA_GROUP=dba
#------------------------------------------------------------------------------
# The OPER_GROUP is the OS group which isto be granted OSOPER privileges.
#------------------------------------------------------------------------------
oracle.install.db.OPER_GROUP=oinstall
#------------------------------------------------------------------------------
# Specify the cluster node names selectedduring the installation.
#如果是RAC的安装,在这里指定所有的节点
#------------------------------------------------------------------------------
oracle.install.db.CLUSTER_NODES=
#------------------------------------------------------------------------------
# Specify the type of database to create.
# It can be one of the following:
# - GENERAL_PURPOSE/TRANSACTION_PROCESSING
# - DATA_WAREHOUSE
#选择数据库的用途,一般用途/事物处理,数据仓库
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
#------------------------------------------------------------------------------
# Specify the Starter Database GlobalDatabase Name. 指定GlobalName
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.globalDBName=ora11g
#------------------------------------------------------------------------------
# Specify the Starter Database SID.指定SID
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.SID=ora11g
#------------------------------------------------------------------------------
# Specify the Starter Database characterset.
# It can be one of the following:
# AL32UTF8, WE8ISO8859P15, WE8MSWIN1252,EE8ISO8859P2,
# EE8MSWIN1250, NE8ISO8859P10,NEE8ISO8859P4, BLT8MSWIN1257,
# BLT8ISO8859P13, CL8ISO8859P5,CL8MSWIN1251, AR8ISO8859P6,
# AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253,IW8ISO8859P8,
# IW8MSWIN1255, JA16EUC, JA16EUCTILDE,JA16SJIS, JA16SJISTILDE,
# KO16MSWIN949, ZHS16GBK, TH8TISASCII,ZHT32EUC, ZHT16MSWIN950,
# ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254,VN8MSWIN1258
#选择字符集。不正确的字符集会给数据显示和存储带来麻烦无数。
#通常中文选择的有ZHS16GBK简体中文库,建议选择unicode的AL32UTF8国际字符集
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.characterSet=AL32UTF8
#------------------------------------------------------------------------------
# This variable should be set to true ifAutomatic Memory Management
# in Database is desired.
# If Automatic Memory Management is notdesired, and memory allocation
# is to be done manually, then set it tofalse.
#11g的新特性自动内存管理,也就是SGA_TARGET和PAG_AGGREGATE_TARGET都#不用设置了,Oracle会自动调配两部分大小。
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryOption=true
#------------------------------------------------------------------------------
# Specify the total memory allocation forthe database. Value(in MB) should be
# at least 256 MB, and should not exceedthe total physical memory available on the system.
# Example:oracle.install.db.config.starterdb.memoryLimit=512
#指定Oracle自动管理内存的大小,最小是256MB
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.memoryLimit=
#------------------------------------------------------------------------------
# This variable controls whether to loadExample Schemas onto the starter
# database or not.是否载入模板示例
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.installExampleSchemas=false
#------------------------------------------------------------------------------
# This variable includes enabling auditsettings, configuring password profiles
# and revoking some grants to public. Thesesettings are provided by default.
# These settings may also be disabled. 是否启用安全设置
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.enableSecuritySettings=true
###############################################################################
# Passwords can be supplied for thefollowing four schemas in the #
# starter database: #
# SYS #
# SYSTEM #
# SYSMAN (used by Enterprise Manager) #
# DBSNMP (used by Enterprise Manager) #
# Same password can be used for allaccounts (not recommended) #
# or different passwords for each accountcan be provided (recommended) #
#设置数据库用户密码
###############################################################################
#------------------------------------------------------------------------------
# This variable holds the password that isto be used for all schemas in the
# starter database.
#设定所有数据库用户使用同一个密码,其它数据库用户就不用单独设置了。
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.ALL=oracle
#-------------------------------------------------------------------------------
# Specify the SYS password for the starterdatabase.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYS=
#-------------------------------------------------------------------------------
# Specify the SYSTEM password for thestarter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSTEM=
#-------------------------------------------------------------------------------
# Specify the SYSMAN password for thestarter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.SYSMAN=
#-------------------------------------------------------------------------------
# Specify the DBSNMP password for thestarter database.
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.password.DBSNMP=
#-------------------------------------------------------------------------------
# Specify the management option to beselected for the starter database.
# It can be one of the following:
# 1. GRID_CONTROL
# 2. DB_CONTROL
#数据库本地管理工具DB_CONTROL,远程集中管理工具GRID_CONTROL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.control=DB_CONTROL
#-------------------------------------------------------------------------------
# Specify the Management Service to use ifGrid Control is selected to manage
# the database. GRID_CONTROL需要设定grid control的远程路径URL
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
#-------------------------------------------------------------------------------
# This variable indicates whether toreceive email notification for critical
# alerts when using DB control.是否启用Email通知, 启用后会将告警等信息发送到指定邮箱
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false
#-------------------------------------------------------------------------------
# Specify the email address to which thenotifications are to be sent.设置通知EMAIL地址
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.dbcontrol.emailAddress=
#-------------------------------------------------------------------------------
# Specify the SMTP server used for emailnotifications.设置EMAIL邮件服务器
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.dbcontrol.SMTPServer=
###############################################################################
# SPECIFY BACKUP AND RECOVERY OPTIONS #
# Out-of-box backup and recovery optionsfor the database can be mentioned #
# using the entries below. #
#安全及恢复设置(默认值即可)out-of-box(out-of-box experience)缩写为OOBE
#产品给用产品给用户良好第一印象和使用感受
###############################################################################
#------------------------------------------------------------------------------
# This variable is to be set to false ifautomated backup is not required. Else
# this can be set to true.设置自动备份,和OUI里的自动备份一样。
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.enable=false
#------------------------------------------------------------------------------
# Regardless of the type of storage that ischosen for backup and recovery, if
# automated backups are enabled, a job willbe scheduled to run daily at
# 2:00 AM to backup the database. This jobwill run as the operating system
# user that is specified in this variable.自动备份会启动一个job,指定启动JOB的系统用户ID
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.osuid=
#-------------------------------------------------------------------------------
# Regardless of the type of storage that ischosen for backup and recovery, if
# automated backups are enabled, a job willbe scheduled to run daily at
# 2:00 AM to backup the database. This jobwill run as the operating system user
# specified by the above entry. Thefollowing entry stores the password for the
# above operating system user.自动备份会开启一个job,需要指定OSUser的密码
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.automatedBackup.ospwd=
#-------------------------------------------------------------------------------
# Specify the type of storage to use forthe database.
# It can be one of the following:
# - FILE_SYSTEM_STORAGE
# - ASM_STORAGE
#自动备份,要求指定使用的文件系统存放数据库文件还是ASM
#------------------------------------------------------------------------------
oracle.install.db.config.starterdb.storageType=
#-------------------------------------------------------------------------------
# Specify the database file location whichis a directory for datafiles, control
# files, redo logs.
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM
#使用文件系统存放数据库文件才需要指定数据文件、控制文件、Redo log的存放目录
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
#-------------------------------------------------------------------------------
# Specify the backup and recovery location.
# Applicable only whenoracle.install.db.config.starterdb.storage=FILE_SYSTEM
#使用文件系统存放数据库文件才需要指定备份恢复目录
#-------------------------------------------------------------------------------
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
#-------------------------------------------------------------------------------
# Specify the existing ASM disk groups tobe used for storage.
# Applicable only whenoracle.install.db.config.starterdb.storage=ASM
#使用ASM存放数据库文件才需要指定存放的磁盘组
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.diskGroup=
#-------------------------------------------------------------------------------
# Specify the password for ASMSNMP user ofthe ASM instance.
# Applicable only whenoracle.install.db.config.starterdb.storage=ASM_SYSTEM
#使用ASM存放数据库文件才需要指定ASM实例密码
#-------------------------------------------------------------------------------
oracle.install.db.config.asm.ASMSNMPPassword=
#------------------------------------------------------------------------------
# Specify the My Oracle Support AccountUsername.
# Example :MYORACLESUPPORT_USERNAME=metalink
#指定metalink账户用户名
#------------------------------------------------------------------------------
MYORACLESUPPORT_USERNAME=
#------------------------------------------------------------------------------
# Specify the My Oracle Support AccountUsername password.
# Example : MYORACLESUPPORT_PASSWORD=password
# 指定metalink账户密码
#------------------------------------------------------------------------------
MYORACLESUPPORT_PASSWORD=
#------------------------------------------------------------------------------
# Specify whether to enable the user to setthe password for
# My Oracle Support credentials. The valuecan be either true or false.
# If left blank it will be assumed to befalse.
# Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
# 用户是否可以设置metalink密码
#------------------------------------------------------------------------------
SECURITY_UPDATES_VIA_MYORACLESUPPORT=
#------------------------------------------------------------------------------
# Specify whether user wants to give anyproxy details for connection.
# The value can be either true or false. Ifleft blank it will be assumed to be false.
# Example : DECLINE_SECURITY_UPDATES=false
# False表示不需要设置安全更新,注意,在11.2的静默安装中疑似有一个BUG
# Response File中必须指定为true,否则会提示错误,不管是否正确填写了邮件地址
#------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=true
#------------------------------------------------------------------------------
# Specify the Proxy server name. Lengthshould be greater than zero.
#代理服务器名
# Example : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=
#------------------------------------------------------------------------------
# Specify the proxy port number. Should beNumeric and atleast 2 chars.
#代理服务器端口
# Example : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=
#------------------------------------------------------------------------------
# Specify the proxy user name. LeavePROXY_USER and PROXY_PWD
# blank if your proxy server requires noauthentication.
#代理服务器用户名
# Example : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=
#------------------------------------------------------------------------------
# Specify the proxy password. LeavePROXY_USER and PROXY_PWD
# blank if your proxy server requires noauthentication.
#代理服务器密码
# Example : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=
根据模版修改结果为:
[oracle@cim-kfxt-db01 response]$ grep “^[^#]” db_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=cim-kfxt-db01
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/dbsoftware/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/dbsoftware/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/dbsoftware/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=true
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=cim-kfxt-db01,cim-kfxt-db02,cim-kfxt-db03
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=kfxtdb
oracle.install.db.config.starterdb.SID=kfxtdb1
oracle.install.db.config.starterdb.characterSet=AL32UTF8
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=INiZpiAhQof7UXytPwAY
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=ASM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=DATA
oracle.install.db.config.asm.ASMSNMPPassword=vgaZG5NnMR50QQQ
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=

2)执行安装

./runInstaller -responseFile /dbsoftware/tools/oracle_11g/database/response/db_install.rsp -silent -ignorePrereq -ignoreSysPrereqs -showProgress

3)创建数据库磁盘组

su - grid
sqlplus / as sysasm
创建数据库ASM磁盘组:
SQL> create diskgroup DATA external redundancy disk ‘/dev/oracleasm/data01’;

Diskgroup created.

SQL> select name,type,state,total_mb,free_mb from v$asm_diskgroup;

NAME TYPE STATE TOTAL_MB FREE_MB
------------------------------ ------ ----------- ---------- ----------
OCRVDISK NORMAL MOUNTED 15360 14308
DATA EXTERN MOUNTED 2048000 2047933

SQL> select inst_id,name,type,state,total_mb,free_mb from gv$asm_diskgroup;

INST_ID NAME TYPE STATE TOTAL_MB FREE_MB
---------- ------------------------------ ------ ----------- ---------- ----------
1 OCRVDISK NORMAL MOUNTED 15360 14308
1 DATA EXTERN MOUNTED 2048000 2047933
2 OCRVDISK NORMAL MOUNTED 15360 14308
2 DATA DISMOUNTED 0 0
3 OCRVDISK NORMAL MOUNTED 15360 14308
3 DATA DISMOUNTED 0 0

节点2和节点3DATA磁盘组未mount,分别在两节点上执行:
alter diskgroup data mount;
SQL> /

INST_ID NAME TYPE STATE TOTAL_MB FREE_MB
---------- ------------------------------ ------ ----------- ---------- ----------
3 OCRVDISK NORMAL MOUNTED 15360 14308
3 DATA EXTERN MOUNTED 2048000 2047848
2 OCRVDISK NORMAL MOUNTED 15360 14308
2 DATA EXTERN MOUNTED 2048000 2047848
1 OCRVDISK NORMAL MOUNTED 15360 14308
1 DATA EXTERN MOUNTED 2048000 2047848
都已成功mount

四、静默创建数据库

1)备份、编辑数据库安装软件目录response下的dbca.rsp文件

cp dbca.rsp dbca.rsp.bak
vi dbca.rsp

2)执行dbca创建数据库

$ORACLE_HOME/bin/dbca -silent -responseFile /dbsoftware/tools/oracle_11g/database/response/dbca.rsp
Copying database files
1% complete
3% complete
9% complete
15% complete
21% complete
27% complete
30% complete
Creating and starting Oracle instance
32% complete
36% complete
40% complete
44% complete
45% complete
48% complete
50% complete
Creating cluster database views
52% complete
70% complete
Completing Database Creation
73% complete
76% complete
85% complete
94% complete
100% complete
Look at the log file “/dbsoftware/u01/app/oracle/cfgtoollogs/dbca/kfxtdb/kfxtdb.log” for further details.

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值