redhat6.7环境下oracle11gR2 RAC静默安装
(一)基础环境
虚拟机环境 :vmware workstation 12
操作系统 : redhat6.7 - 64bit
数据库版本 :11.2.0.4
(二)安装前的环境准备
(2.1)配置/etc/hosts文件,2个节点都要修改
[oracle@standbydb1 bin]$vim /etc/hosts
# 添加2个节点的IP信息
192.168.10.41 standbydb1
192.168.10.42 standbydb2
192.168.10.43 standbydb1-vip
192.168.10.44 standbydb2-vip
192.168.10.40 standbydb-scan 10.10.10.41 standbydb1-priv
10.10.10.42 standbydb2-priv
(2.2)操作系统参数修改,2个节点都要修改
(2.2.1)修改/etc/sysctl.conf
[root@standbydb1 ~]# vi /etc/sysctl.conf
# 在末尾添加 kernel.msgmnb =
kernel.msgmax =
kernel.shmmax =
kernel.shmall =
fs.aio-max-nr =
fs.file-max =
kernel.shmall =
kernel.shmmax =
kernel.shmmni =
kernel.sem =
net.ipv4.ip_local_port_range =
net.core.rmem_default =
net.core.rmem_max =
net.core.wmem_default =
net.core.wmem_max =
net.ipv4.tcp_wmem =
net.ipv4.tcp_rmem =
内核参数执行命令sysctl -p生效。
(2.2.2)修改/etc/security/limits.conf
[root@standbydb1 ~]# vi /etc/security/limits.conf
# 在末尾添加 grid soft nproc
grid hard nproc
grid soft nofile
grid hard nofile
oracle soft nproc
oracle hard nproc
oracle soft nofile
oracle hard nofile
(2.2.3)修改/etc/pam.d/login
[root@standbydb1 ~]# vi /etc/pam.d/login
# 在文件末尾添加
session required pam_limits.so
(2.3)配置共享存储
(2.3.1)分区、格式化磁盘,在一个节点上执行即可
# 在节点1上格式化,以/dev/sdb为例: [root@standbydb1 ~]# fdisk /dev/sdb The number of cylinders for this disk is set to .
There is nothing wrong with that, but this is larger than ,
and could in certain setups cause problems with:
) software that runs at boot time (e.g., old versions of LILO)
) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/ FDISK) Command (m for help): n
Command action
e extended
p primary partition (-)
p
Partition number (-):
First cylinder (-, default ):
Using default value
Last cylinder or +size or +sizeM or +sizeK (-, default ):
Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.
(2.3.2)在2个节点上添加裸设备,2个节点都要执行
[root@standbydb1 ~]# vi /etc/udev/rules.d/-raw.rules
# 在后面添加 ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde1", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg1", RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="sdh1", RUN+="/bin/raw /dev/raw/raw7 %N" KERNEL=="raw[1]", MODE="", OWNER="grid", GROUP="asmadmin"
KERNEL=="raw[2]", MODE="", OWNER="grid", GROUP="asmadmin"
KERNEL=="raw[3]", MODE="", OWNER="grid", GROUP="asmadmin"
KERNEL=="raw[4]", MODE="", OWNER="grid", GROUP="asmadmin"
KERNEL=="raw[5]", MODE="", OWNER="grid", GROUP="asmadmin"
KERNEL=="raw[6]", MODE="", OWNER="grid", GROUP="asmadmin"
KERNEL=="raw[7]", MODE="", OWNER="grid", GROUP="asmadmin"
启动裸设备,2个节点都执行
[root@standbydb1 ~]# start_udev
检查裸设备,2个节点都要查看,如果看不到设备信息,重启节点即可
[root@standbydb1 ~]# raw -qa
/dev/raw/raw1: bound to major , minor
/dev/raw/raw2: bound to major , minor
/dev/raw/raw3: bound to major , minor
/dev/raw/raw4: bound to major , minor
/dev/raw/raw5: bound to major , minor
/dev/raw/raw6: bound to major , minor
/dev/raw/raw7: bound to major , minor
(2.4)安装依赖包,2个节点都执行
yum install -y binutils-*
yum install -y compat-libstdc++-*
yum install -y elfutils-libelf-*
yum install -y elfutils-libelf-*
yum install -y elfutils-libelf-devel-static-*
yum install -y gcc-*
yum install -y gcc-c++-*
yum install -y glibc-*
yum install -y glibc-common-*
yum install -y glibc-devel-*
yum install -y glibc-headers-*
yum install -y kernel-headers-*
yum install -y ksh-*
yum install -y libaio-*
yum install -y libaio-devel-*
yum install -y libgcc-*
yum install -y libgomp-*
yum install -y libstdc++-*
yum install -y libstdc++-devel-*
yum install -y make-*
yum install -y sysstat-*
yum install -y compat-libcap*
(2.5)创建oracle、grid用户相关
(2.5.1)创建用户、用户组、目录,2个节点都要执行
/usr/sbin/groupadd -g oinstall
/usr/sbin/groupadd -g asmadmin
/usr/sbin/groupadd -g asmdba
/usr/sbin/groupadd -g asmoper
/usr/sbin/groupadd -g dba
/usr/sbin/groupadd -g oper
useradd -u -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
useradd -u -g oinstall -G dba,asmdba,oper oracle
mkdir -p /u01/app/11.2./grid
mkdir -p /u01/app/grid
mkdir /u01/app/oracle
chown -R grid:oinstall /u01
chown oracle:oinstall /u01/app/oracle
chmod -R /u01/
(2.5.2)配置grid的环境变量,2个节点都要执行
[grid@standbydb1 ~]$ vim .bash_profile #添加
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=+ASM1 #如果是节点2,改为:+ASM2
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2./grid
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask
(2.5.3)配置oracle的环境变量,2个节点都要执行
[oracle@standbydb1 ~]$ vim .bash_profile #添加
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_SID=standby1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2./db_1
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask
(2.5.4)配置grid的节点互信,在一个节点用grid用户执行
./sshUserSetup.sh -hosts "primarydb1 primarydb2" -user grid -advanced
(2.5.5)配置oracle的节点互信,在一个节点用oracle用户执行
./sshUserSetup.sh -hosts "primarydb1 primarydb2" -user oracle -advanced
(2.6)安装前的检查
2个节点安装cvuqdisk包,进入grid安装包
[root@standbydb1 soft]# cd grid/
[root@standbydb1 grid]# ls
doc install response rpm runcluvfy.sh runInstaller sshsetup stage welcome.html
[root@standbydb1 grid]# cd rpm/
[root@standbydb1 rpm]# ls
cvuqdisk-1.0.-.rpm
[root@standbydb1 rpm]# rpm -ivh cvuqdisk-1.0.-.rpm
Preparing... ########################################### [%]
Using default group oinstall to install package
:cvuqdisk ########################################### [%]
执行grid安装检查
./runcluvfy.sh stage -pre crsinst -n standbydb1,standbydb2 -fixup -verbose
如果没有报错,即可执行安装操作。
(三)安装
(3.1)安装grid
安装命令:
./runInstaller -ignorePrereq -silent -force -responseFile /soft/grid/grid/response/grid_install.rsp -showProgress
响应文件grid_install.rsp的内容为:
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0
ORACLE_HOSTNAME=standbydb1
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/11.2./grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.gpnp.scanName=standbydb-scan
oracle.install.crs.config.gpnp.scanPort=
oracle.install.crs.config.clusterName=standbydb-scan
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=standbydb1:standbydb1-vip,standbydb2:standbydb2-vip
oracle.install.crs.config.networkInterfaceList=eth0:192.168.10.0:,eth1:10.10.10.0:,eth2:192.168.0.0:
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=Oracle123
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.AUSize=
oracle.install.asm.diskGroup.disks=/dev/raw/raw1,/dev/raw/raw2,/dev/raw/raw3
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/raw/*
oracle.install.asm.monitorPassword=Oracle123
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=
额外工作:
(1)创建磁盘组
su - grid sqlplus / as sysasm
create diskgroup data external redundancy disk '/dev/raw/raw4','/dev/raw/raw5','/dev/raw/raw6' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0', 'au_size'='1M';
create diskgroup arch external redundancy disk '/dev/raw/raw7' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0', 'au_size'='1M';
启动所有节点上的磁盘组
(2)创建默认监听
su - grid srvctl add listener
srvctl start listener
(3.2)安装数据库软件
安装命令:
./runInstaller -ignorePrereq -silent -force -responseFile /u01/mysoft/oracle/db_install_20190714.rsp
响应文件db_install_20190714.rsp的内容为:
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=standbydb1
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2./db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=standbydb1,standbydb2
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet=
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=
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=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
(3.3)创建数据库
[oracle@standbydb1 bin]$ pwd
/u01/app/oracle/product/11.2./db_1/bin
[oracle@standbydb1 bin]$ ./dbca -silent -responseFile /u01/mysoft/oracle/database/response/dbca_20190714.rsp
响应文件db_install_20190714.rsp的内容为:
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "standby"
DB_UNIQUE_NAME = "standby"
SID = "standby"
NODELIST=standbydb1,standbydb2
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "Oracle123"
SYSTEMPASSWORD = "Oracle123"
DATAFILEDESTINATION = "+DATA"
STORAGETYPE=ASM
DISKGROUPNAME=DATA
CHARACTERSET = "ZHS16GBK"
NATIONALCHARACTERSET= "UTF8"
DB_BLOCK_SIZE=
TOTALMEMORY = ""
(四)结果确认
查看集群资源
[grid@standbydb1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
ora.DATA.dg
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
ora.LISTENER.lsnr
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
ora.OCR.dg
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
ora.asm
ONLINE ONLINE standbydb1 Started
ONLINE ONLINE standbydb2 Started
ora.gsd
OFFLINE OFFLINE standbydb1
OFFLINE OFFLINE standbydb2
ora.net1.network
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
ora.ons
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
ora.registry.acfs
ONLINE ONLINE standbydb1
ONLINE ONLINE standbydb2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
ONLINE ONLINE standbydb1
ora.cvu
ONLINE ONLINE standbydb1
ora.oc4j
ONLINE ONLINE standbydb1
ora.scan1.vip
ONLINE ONLINE standbydb1
ora.standby.db
ONLINE ONLINE standbydb1 Open
ONLINE ONLINE standbydb2 Open
ora.standbydb1.vip
ONLINE ONLINE standbydb1
ora.standbydb2.vip
ONLINE ONLINE standbydb2
查看数据库状态
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
STANDBY READ WRITE SQL> select host_name,instance_name from gv$instance;
HOST_NAME INSTANCE_NAME
------------- -----------------
standbydb1 standby1
standbydb2 standby2
结束。
redhat6.7环境下oracle11gR2 RAC静默安装的更多相关文章
- linux环境下oracle 11g 静默安装
安装环境 Linux服务器:oracle linux 6.6 64位 Oracle服务器:Oracle11gR2 64位 系统要求 1.Linux安装Oracle系统要求 系统要求 说明 内存 必须高 ...
- Oracle 12c RAC 静默安装文档
参考文档: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwlin/index.html https://docs. ...
- WIN7环境下CUDA7.5的安装、配置和测试(Visual Studio 2010)
以下基于"WIN7(64位)+Visual Studio 2010+CUDA7.5". 系统:WIN7,64位 开发平台:Visual Studio 2010 显卡:NVIDIA ...
- Python3.5在Windows7环境下Scrapy库的安装
Python3.5在Windows7环境下Scrapy库的安装 忙活了一下午,总算是把Scrapy库给装完了,记下来给需要帮助的人 首先安装的环境:Windows7 64位 Python的版本是:3. ...
- linux 下oracle 11g静默安装(完整版)
1.操作系统及Oracle版本Linux版本:CentOS release 6.5Oracle版本:Oracle Database 11g Release 2 (11.2.0.1.0) for Lin ...
- Linux环境下SVN服务器端的安装与配置
最近尝试了下在Linux(CentOS6.5)环境下安装与配置SVN服务器端,安装过程中碰到了一些问题,参看了网友们分享的一些心得,并通过自己实际的操作,最终安装与配置成功!总的来说网上的说法芸芸,大 ...
- 《高可用MySQL》1 – Windows环境下压缩版MySQL安装
近日在读O’REILIY系列的<高可用MySQL>, 自然少不了主从(Master-Slave)配置和横向扩展相关的内容.Master-Slave这东西吧,在许多公司都是标配,开发中基本天 ...
- Windows环境下Sybase12.5 图文安装教程
先准备好安装文件,解压缩ASE install.rar文件,文件夹中包含一个setup.exe可执行文件,双击运行 --- > 欢迎界面出现 下面选择相应国家的协议,我们选择“中华人民共和国”, ...
- Linux环境下JDK/Eclipse一键安装脚本
-------------------------------------------------------------------- author:jiangxin Email:jiangxinn ...
随机推荐
- 清除JAVA 项目中的注释
package com.lookcoder.inschool.utils; import java.io.BufferedReader; import java.io.File; import jav ...
- unable to lock the administration错误解决
在ubantu系统上,使用 apt-get 命令或者其相对更新的APT 管理工具时,遇到 unable to lock the administration directory (/var/lib/d ...
- Node.js+Express框架+Mongo学习(一)第一个node.js实例
1.在桌面新建一个空的文件夹,比如叫node,当然也可以在其它地方新建. 2.命令行进入到所新建的文件夹的目录,下载Express框架,再在这个文件夹里新建一个叫final的项目 3.在项目(fina ...
- 【翻译】Flink Table Api & SQL — 用户定义函数
本文翻译自官网:User-defined Functions https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/tabl ...
- Python - Django - form 组件基本用法
普通 form 表单的处理: reg.html: <!DOCTYPE html> <html lang="en"> <head> <met ...
- (二)limit的高级用法
一.取出前n条数据 ; 二.取出第几行到第几行的数据 ,; 解释:取出从第3行(从0行开始)开始的5条记录.
- [LeetCode] 66. Plus One 加一
Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The ...
- [LeetCode] 358. Rearrange String k Distance Apart 按距离k间隔重排字符串
Given a non-empty string str and an integer k, rearrange the string such that the same characters ar ...
- NLP理解层次 --- 思维导图
- lay-verify
lay-verify:是表单验证的关键字 required (必填项) phone(手机号) email(邮箱) url(网址) number(数字) date(日期) identity(身份证) 自 ...