Oracle 12cR1 RAC 在VMware Workstation上安装(下)—静默安装

Oracle 12cR1 RAC 在VMware Workstation上安装(下)—静默安装

1.1  静默安装

1.1.1  静默安装grid

安装之前使用脚本进行校验,确保所有的failed选项都可以忽略。


./runcluvfy.sh stage -pre crsinst -n raclhr-12cR1-N1,raclhr-12cR1-N2 -fixup -verbose

1.1.1.1  新建/etc/oraInst.loc文件

在2个节点上新建/etc/oraInst.loc,文件中的内容如下:


inventory_loc=/u01/app/oraInventory

inst_group=oinstall

输入下面的命令在oraInst.loc文件上设置合适的拥有者,组和权限:


chown oracle:oinstall /etc/oraInst.loc

chmod 664 /etc/oraInst.loc

1.1.1.2  检查项

1、/u01/app/oraInventory必须为空


ls -l /u01/app/oraInventory/*

rm -rf /u01/app/oraInventory/*

否则报错:


[FATAL] [INS-32035] Unable to create a new central inventory directory : /u01/app/oraInventory.

CAUSE: The central inventory location provided is not empty.

ACTION: Please provide another location for the inventory, or clean up the current location.

2、INS-32040


[FATAL] [INS-32040] The central inventory location provided is not empty on remote nodes [raclhr-12cr1-n1].

ACTION: Please provide another location for the inventory, or clean up the current location.

解决办法:

新建/etc/oraInst.loc,文件中的内容如下:


inventory_loc=/u01/app/oraInventory

inst_group=oinstall

输入下面的命令在oraInst.loc文件上设置合适的拥有者,组和权限:


chown oracle:oinstall /etc/oraInst.loc

chmod 664 /etc/oraInst.loc

1.1.1.3  开始安装

静默脚本:


./runInstaller -silent  -force -noconfig -IgnoreSysPreReqs -ignorePrereq  -showProgress \

INVENTORY_LOCATION=/u01/app/oraInventory \

SELECTED_LANGUAGES=en \

ORACLE_BASE=/u01/app/grid \

ORACLE_HOME=/u01/app/12.1.0/grid \

oracle.install.asm.OSDBA=asmdba \

oracle.install.asm.OSOPER=asmoper \

oracle.install.asm.OSASM=asmadmin \

oracle.install.crs.config.storageOption=ASM_STORAGE \

oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=EXTERNAL \

oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=EXTERNAL \

oracle.install.crs.config.useIPMI=false \

oracle.install.asm.diskGroup.name=OCR \

oracle.install.asm.diskGroup.redundancy=EXTERNAL \

oracle.installer.autoupdates.option=SKIP_UPDATES \

oracle.install.crs.config.gpnp.scanPort=1521 \

oracle.install.crs.config.gpnp.configureGNS=false \

oracle.install.crs.config.autoConfigureClusterNodeVIP=false \

oracle.install.option=CRS_CONFIG \

oracle.install.crs.config.ClusterType=STANDARD \

oracle.install.asm.SYSASMPassword=lhr \

oracle.install.asm.monitorPassword=lhr \

oracle.install.config.managementOption=NONE \

oracle.install.crs.config.ignoreDownNodes=false \

oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm-disk* \

oracle.install.asm.diskGroup.disks=/dev/asm-diskc \

oracle.install.crs.config.gpnp.scanName=raclhr-12cR1-scan \

oracle.install.crs.config.clusterName=raclhr-cluster \

oracle.install.crs.config.clusterNodes=raclhr-12cr1-n1:raclhr-12cr1-n1-vip,raclhr-12cr1-n2:raclhr-12cr1-n2-vip \

oracle.install.crs.config.networkInterfaceList=eth0:192.168.59.0:1,eth1:192.168.2.0:2 \

ORACLE_HOSTNAME=raclhr-12cR1-N1

命令行模式执行静默安装,注意复制脚本的时候最后不能多加回车符号,当前窗口不要执行其他内容。“\”后不能有空格。开始执行有点慢,需要修改的地方我已经用黄色背景标注了。若有其他错误可以采用-debug模式获取更多信息。

二、 configToolAllCommands脚本

关于该部分可参考:http://blog.itpub.net/26736162/viewspace-2129161/。该脚本执行完毕会创建一个sid为-MGMTDB,gdbName为_mgmtdb的单实例容器数据库(从日志可以找到相关命令:/u01/app/12.1.0/grid/bin/dbca  -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName OCR -datafileJarLocation /u01/app/12.1.0/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck   -oui_internal)该数据库属于grid用户。


/u01/app/12.1.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties

根据官方文档内容,安装GRID可以配置如下的信息:


oracle.assistants.asm|S_ASMPASSWORD=password

oracle.assistants.asm|S_ASMMONITORPASSWORD=password

oracle.crs|S_BMCPASSWORD=password

以grid用户在节点1上执行(准确来说应该在执行静默安装的节点上执行,且节点2上不需要执行):


[[email protected] ~]$ more  /home/grid/cfgrsp.properties

oracle.assistants.asm|S_ASMPASSWORD=lhr

oracle.assistants.asm|S_ASMMONITORPASSWORD=lhr

oracle.crs|S_BMCPASSWORD=lhr

[[email protected] ~]$ /u01/app/12.1.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties

[[email protected] admin]$ /u01/app/12.1.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties

Setting the invPtrLoc to /u01/app/12.1.0/grid/oraInst.loc

perform - mode is starting for action: configure

perform - mode finished for action: configure

You can see the log file: /u01/app/12.1.0/grid/cfgtoollogs/oui/configActions2017-01-17_05-29-38-PM.log

[[email protected] admin]$

[[email protected] admin]$

1.1.2  静默安装database

首先通过如下的命令进行检查环境配置:


/soft/grid/runcluvfy.sh stage -pre dbinst -n  raclhr-12cR1-N1,raclhr-12cR1-N2 -verbose -fixup

1.1.2.1  静默安装DB软件


./runInstaller -silent  -force -noconfig -IgnoreSysPreReqs -ignorePrereq  -showProgress \

oracle.install.option=INSTALL_DB_SWONLY \

DECLINE_SECURITY_UPDATES=true \

UNIX_GROUP_NAME=oinstall \

INVENTORY_LOCATION=/u01/app/oraInventory \

SELECTED_LANGUAGES=en \

oracle.install.db.InstallEdition=EE \

oracle.install.db.isCustomInstall=false \

oracle.install.db.EEOptionsSelection=false \

oracle.install.db.DBA_GROUP=dba \

oracle.install.db.OPER_GROUP=asmoper \

oracle.install.db.isRACOneInstall=false \

oracle.install.db.BACKUPDBA_GROUP=dba \

oracle.install.db.DGDBA_GROUP=dba \

oracle.install.db.KMDBA_GROUP=dba \

oracle.install.db.rac.serverpoolCardinality=0 \

oracle.install.db.ConfigureAsContainerDB=false \

oracle.install.db.config.starterdb.memoryOption=false \

oracle.install.db.config.starterdb.installExampleSchemas=true \

oracle.install.db.config.starterdb.managementOption=DEFAULT \

oracle.install.db.config.starterdb.enableRecovery=false \

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \

oracle.installer.autoupdates.option=SKIP_UPDATES \

ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 \

ORACLE_BASE=/u01/app/oracle \

oracle.install.db.CLUSTER_NODES=raclhr-12cr1-n1,raclhr-12cr1-n2 \

ORACLE_HOSTNAME=raclhr-12cR1-N1

命令行模式执行静默安装,注意复制脚本的时候最后不能多加回车符号,当前窗口不要执行其他内容。“\”后不能有空格。开始执行有点慢,需要修改的地方我已经用黄色背景标注了。若有其他错误可以采用-debug模式获取更多信息。


[[email protected] ~]$ cd /soft/database/

[[email protected] database]$ ll

total 72

drwxr-xr-x  4 root root  4096 Jan 16 17:04 install

-rwxr-xr-x  1 root root 34132 Jul 11  2014 readme.html

drwxrwxr-x  2 root root  4096 Jul  7  2014 response

drwxr-xr-x  2 root root  4096 Jul  7  2014 rpm

-rwxr-xr-x  1 root root  8533 Jul  7  2014 runInstaller

drwxrwxr-x  2 root root  4096 Jul  7  2014 sshsetup

drwxr-xr-x 14 root root  4096 Jul  7  2014 stage

-rwxr-xr-x  1 root root   500 Feb  7  2013 welcome.html

[[email protected] database]$ ./runInstaller -silent  -force -noconfig -IgnoreSysPreReqs -ignorePrereq  -showProgress \

> oracle.install.option=INSTALL_DB_SWONLY \

> DECLINE_SECURITY_UPDATES=true \

> UNIX_GROUP_NAME=oinstall \

> INVENTORY_LOCATION=/u01/app/oraInventory \

> SELECTED_LANGUAGES=en \

> oracle.install.db.InstallEdition=EE \

> oracle.install.db.isCustomInstall=false \

> oracle.install.db.EEOptionsSelection=false \

> oracle.install.db.DBA_GROUP=dba \

> oracle.install.db.OPER_GROUP=asmoper \

> oracle.install.db.isRACOneInstall=false \

> oracle.install.db.BACKUPDBA_GROUP=dba \

> oracle.install.db.DGDBA_GROUP=dba \

> oracle.install.db.KMDBA_GROUP=dba \

> oracle.install.db.rac.serverpoolCardinality=0 \

> oracle.install.db.ConfigureAsContainerDB=false \

> oracle.install.db.config.starterdb.memoryOption=false \

> oracle.install.db.config.starterdb.installExampleSchemas=true \

> oracle.install.db.config.starterdb.managementOption=DEFAULT \

> oracle.install.db.config.starterdb.enableRecovery=false \

> oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \

> SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \

> oracle.installer.autoupdates.option=SKIP_UPDATES \

> ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 \

> ORACLE_BASE=/u01/app/oracle \

> oracle.install.db.CLUSTER_NODES=raclhr-12cr1-n1,raclhr-12cr1-n2 \

> ORACLE_HOSTNAME=raclhr-12cR1-N1

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 2287 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 1785 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-01-17_09-38-20PM. Please wait ...[[email protected] database]$

[[email protected]2cR1-N1 database]$

[[email protected] database]$

[[email protected] database]$

[[email protected] database]$ You can find the log of this install session at:

/u01/app/oraInventory/logs/installActions2017-01-17_09-38-20PM.log

Prepare in progress.

..................................................   8% Done.

Prepare successful.

Copy files in progress.

..................................................   13% Done.

..................................................   18% Done.

..................................................   23% Done.

..................................................   28% Done.

..................................................   33% Done.

..................................................   38% Done.

..................................................   43% Done.

..........

Copy files successful.

Link binaries in progress.

..........

Link binaries successful.

..................................................   53% Done.

Setup files in progress.

Setup files successful.

..................................................   59% Done.

Setup Inventory in progress.

Setup Inventory successful.

..................................................   65% Done.

Finish Setup successful.

Perform remote operations in progress.

Perform remote operations successful.

..................................................   72% Done.

Saving Cluster Inventory in progress.

..........

Saving Cluster Inventory successful.

The installation of Oracle Database 12c was successful.

Please check ‘/u01/app/oraInventory/logs/silentInstall2017-01-17_09-38-20PM.log‘ for more details.

Setup Oracle Base in progress.

Setup Oracle Base successful.

..................................................   86% Done.

Update Inventory in progress.

Update Inventory successful.

..................................................   95% Done.

As a root user, execute the following script(s):

1. /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

Execute /u01/app/oracle/product/12.1.0/dbhome_1/root.sh on the following nodes:

[raclhr-12cr1-n1, raclhr-12cr1-n2]

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

Successfully Setup Software.

As install user, execute the following script to complete the configuration.

1. /u01/app/oracle/product/12.1.0/dbhome_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).

节点1和节点2依次执行root.sh:


[[email protected] ~]# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh

Check /u01/app/oracle/product/12.1.0/dbhome_1/install/root_raclhr-12cR1-N1_2017-01-17_22-18-12.log for the output of root script

[[email protected] ~]#

1.2  建立磁盘组

创建DATA和FRA磁盘组:


CREATE DISKGROUP DATA external redundancy DISK ‘/dev/asm-diskd‘ ATTRIBUTE ‘compatible.rdbms‘ = ‘12.1‘, ‘compatible.asm‘ = ‘12.1‘;

CREATE DISKGROUP FRA external redundancy DISK ‘/dev/asm-diske‘ ATTRIBUTE ‘compatible.rdbms‘ = ‘12.1‘, ‘compatible.asm‘ = ‘12.1‘;


[[email protected] ~]$ sqlplus / as sysasm

SQL*Plus: Release 12.1.0.2.0 Production on Tue Jan 17 22:41:42 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Real Application Clusters and Automatic Storage Management options

SQL> CREATE DISKGROUP DATA external redundancy DISK ‘/dev/asm-diskd‘ ATTRIBUTE ‘compatible.rdbms‘ = ‘12.1‘, ‘compatible.asm‘ = ‘12.1‘;

Diskgroup created.

SQL> CREATE DISKGROUP FRA external redundancy DISK ‘/dev/asm-diske‘ ATTRIBUTE ‘compatible.rdbms‘ = ‘12.1‘, ‘compatible.asm‘ = ‘12.1‘;

Diskgroup created.

SQL>

1.3  dbca静默方式建库


dbca -silent -createDatabase -templateName General_Purpose.dbc -responseFile NO_VALUE \

-gdbname lhrrac  -sid lhrrac \

-createAsContainerDatabase false \

-sysPassword lhr -systemPassword lhr -serviceUserPassword lhr \

-datafileDestination ‘DATA/‘ -recoveryAreaDestination ‘FRA/‘ \

-storageType ASM -asmsnmpPassword oracle  -diskGroupName ‘DATA‘ \

-characterset ZHS16GBK -nationalCharacterSet AL16UTF16 \

-sampleSchema true \

-memoryPercentage 30 \

-databaseType OLTP  \

-emConfiguration NONE  \

-nodeinfo raclhr-12cR1-N1,raclhr-12cR1-N2

1.4  其它配置

1.4.1  sqlplus提示符设置

编辑$ORACLE_HOME/sqlplus/admin/glogin.sql


set linesize 9999 pagesize 9999

set sqlprompt "_USER‘@‘_CONNECT_IDENTIFIER> "

最后,安装好的虚拟机可用于测试12c的功能,小麦苗会将安装好的12c的环境上传到云盘。

About Me


...............................................................................................................................

● 本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用

● 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和个人微信公众号(xiaomaimiaolhr)上有同步更新

● 本文itpub地址:http://blog.itpub.net/26736162/viewspace-2132773/

● 本文博客园地址:http://www.cnblogs.com/lhrbest/p/6337516.html

● 本文pdf版及小麦苗云盘地址:http://blog.itpub.net/26736162/viewspace-1624453/

● QQ群:230161599     微信群:私聊

● 联系我请加QQ好友(642808185),注明添加缘由

● 于 2017-01-12 08:00 ~ 2016-01-21 24:00 在农行完成

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

...............................................................................................................................

拿起手机使用微信客户端扫描下边的左边图片来关注小麦苗的微信公众号:xiaomaimiaolhr,扫描右边的二维码加入小麦苗的QQ群,学习最实用的数据库技术。

  

时间: 2024-10-13 21:54:12

Oracle 12cR1 RAC 在VMware Workstation上安装(下)—静默安装的相关文章

Oracle 12cR1 RAC 在VMware Workstation上安装(中)—图形界面安装

Oracle 12cR1 RAC 在VMware Workstation上安装(中)-图形界面安装 1.1  图形界面安装 1.1.1  安装GRID 安装日志:/u01/app/oraInventory/logs/installActions2014-06-05_06-12-27AM.log 首先打开Xmanager - Passive软件,或者直接以grid用户登录虚拟机,在虚拟机里边进行图形界面操作. [[email protected] ~]$ export DISPLAY=192.16

Oracle 12cR1 RAC 在VMware Workstation上安装(上)—OS环境配置

Oracle 12cR1 RAC 在VMware Workstation上安装(上)-OS环境配置 1.1  整体规划部分 1.1.1  所需软件介绍 Oracle RAC不支持异构平台.在同一个集群中,可以支持具有速度和规模不同的机器,但所有节点必须运行在相同的操作系统.Oracle RAC不支持具有不同的芯片架构的机器. 序号 类型 内容 1 数据库 p17694377_121020_Linux-x86-64_1of8.zip p17694377_121020_Linux-x86-64_2o

解决Vmware workstation上不能安装Hyper-V的问题

从今天开始,博主正式开始学习微软相关的知识了.众所周知,微软的虚拟化技术Hyper-V现在也很火.可是博主也没有一台服务器来装Hyper-V.于是想到在自己的PC上先装一个Vmware workstation,再在Vmware workstation上安装Windows Server 2008或Windows Server 2012,然后再启用Hyper-V功能.但在搭建实验环境的过程中遇到了一个问题,无法启用Hyper-V.经过多次尝试和"度娘"的搜索,找到了问题的解决方法,现总结如

M手记-Vmware Workstation及Centos6.8 的安装

一.什么是Vmware Workstation Vmware Workstation是Vmware公司的一款商业化软件,他的主要作用是允许使用者在基于x86/64计算机的系统上使用Vmware Workstation软件来创建和运行多个不同操作系统的虚拟机(包括Linux.Windows.Solaris等). 二.如何获取到Vmware Workstation 打开Vmware官网,找到Downloads字样,打开后会发现Vmware Workstation软件本身提供三种方式的下载. 链接如下

VMware workstation 的虚拟机中再安装workstation

在VMware workstation 10中运行的虚拟机中再安装workstation软件时,启动时会出现不断重启的故障, 解决办法: 在宿主虚拟机的.vmx文件中添加一行 monitor_control.restrict_backdoor = "TRUE" 重启虚拟机即可. VMware workstation 的虚拟机中再安装workstation,布布扣,bubuko.com

VMware Workstation 12.0.0 Pro安装及VM建立截图

一.VMware Workstation 12.0.0 Pro安装 windows版官网下载(数字签名,UTC+8,2015.08.15,5:19:05): https://download3.vmware.com/software/wkst/file/VMware-workstation-full-12.0.0-2985596.exe 安装非常方便 正式安装 接受许可协议 安装目录选择 是否在启动时检查产品更新 桌面建立快捷方式 检查到有老版本,开始升级 自动删除老版本,保留老版本配置以及原有

linux下静默安装oracle

linux下静默安装oracle centos7.7 oracle11gR2 安装前的准备 1禁用ipv6 新加 [[email protected] ~]# vim /etc/sysconfig/network NETWORKING_IPV6=no 修改/etc/hosts,把ipv6那句本地主机名解析的注释掉 [[email protected] ~]# vim /etc/hosts # ::1 localhost localhost.localdomain localhost6 local

This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed(在64位模式下运行安装了32位的Oracle客户端组件时,会发生此问题)

部署win服务时出现下面的问题: 在事件查看器中看到如下错误: 日志名称: Application来源: ***调度服务日期: 2014/5/21 12:53:21事件 ID: 0任务类别: 无级别: 错误关键字: 经典用户: 暂缺计算机: ams-webserver描述:Service cannot be started. Achievo.Utility.DataAccess.DbException: Attempt to load Oracle client libraries threw

Centos下静默安装oracle10g

Centos6/7下静默安装Oracle10g 远程安装oracle10g,通过网上资料,不断摸索成功安装.先在本地虚拟机上做实验,快照恢复快照恢复,安装了几十次成功之后,再在服务器上安装,中间遇到各种问题特记录下来分享. 在linux下安装oracle主要: 1.关闭不必要的服务 2.安装必要的依赖包 3.根据系统版本选择合适的oracle安装包 4.添加用户和用户组,创建安装文件夹 5.配置系统环境(创建修改各种文件) 6.安装软件并建库 检查硬件需求(略) 关闭防火墙 1.关闭firewa