(一)基础环境
虚拟机环境 :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 standbydb110.42 standbydb210.43 standbydb1-vip10.44 standbydb2-10.40 standbydb-scan10.10.10.41 standbydb1-priv10.42 standbydb2-priv
(2.2) *** 作系统参数修改,2个节点都要修改
(2.2.1)修改/etc/sysctl.conf
[root@standbydb1 ~]# vi /etc/sysctl.conf # 在末尾添加 kernel.msgmnb = 65536 kernel.msgmax = kernel.shmmax = 68719476736 kernel.shmall = 4294967296 fs.aio-max-nr = 1048576 fs.file-max = 681574420971521306910720 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = net.core.wmem_max = 1048586 net.ipv4.tcp_wmem = 262144 net.ipv4.tcp_rmem = 4194304 4194304
内核参数执行命令sysctl -p生效。
(2.2.2)修改/etc/security/limits.conf
[root@vi /etc/security/limits.conf # 在末尾添加 grID soft nproc 2047 grID hard nproc 16384 grID soft nofile 1024 grID hard nofile oracle soft nproc oracle hard nproc oracle soft nofile oracle hard nofile 65536
(2.2.3)修改/etc/pam.d/login
[root@vi /etc/pam.d/login
# 在文件末尾添加session required pam_limits.so
(2.3)配置共享存储
(2.3.1)分区、格式化磁盘,在一个节点上执行即可
# 在节点1上格式化,以/dev/sdb为例:[root@standbydb1 ~]# fdisk /dev/sdbThe number of cylinders for this disk is set to 3824.There is nothing wrong with that,but this is larger than ,and Could in certain setups cause problems with:1) software that runs at boot time (e.g.,old versions of liLO)2) booting and partitioning software from other OSs (e.g.,DOS FdisK,OS/ FdisK)Command (m for help): nCommand action e extended p primary partition (1-4)pPartition number (4): 1First cylinder (3824,default ): Using default value Last cylinder or +size or +sizeM or +sizeK (): Command (m for help): wThe 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/60-raw.rules # 在后面添加ACTION=="add",KERNEL==sdb1/bin/raw /dev/raw/raw1 %N"ACTION==sdc1/bin/raw /dev/raw/raw2 %Nsdd1/bin/raw /dev/raw/raw3 %Nsde1/bin/raw /dev/raw/raw4 %Nsdf1/bin/raw /dev/raw/raw5 %Nsdg1/bin/raw /dev/raw/raw6 %Nsdh1/bin/raw /dev/raw/raw7 %NKERNEL==raw[1]0660grIDasmadminKERNEL==raw[2]raw[3]raw[4]raw[5]raw[6]raw[7]"
启动裸设备,2个节点都执行
[root@standbydb1 ~]# start_udev
检查裸设备,2个节点都要查看,如果看不到设备信息,重启节点即可
[root@standbydb1 ~]# raw -qa/dev/raw/raw1: bound to major 8,minor 17/dev/raw/raw2: bound to major 33/dev/raw/raw3: bound to major 49/dev/raw/raw4: bound to major 65/dev/raw/raw5: bound to major 81/dev/raw/raw6: bound to major 97/dev/raw/raw7: bound to major 113
(2.4)安装依赖包,2个节点都执行
yum install -y binutils-*install -y compat-libstdc++-*install -y elfutils-libelf-*install -y elfutils-libelf-devel-static-*install -y gcc-*gcc-c++-*install -y glibc-*install -y glibc-common-*install -y glibc-devel-*install -y glibc-headers-*install -y kernel-headers-*install -y ksh-*install -y libaio-*install -y libaio-devel-*install -y libgcc-*install -y libgomp-*install -y libstdc++-*install -y libstdc++-devel-*make-*install -y sysstat-*install -y compat-libcaP*
(2.5)创建oracle、grID用户相关
(2.5.1)创建用户、用户组、目录,2个节点都要执行
/usr/sbin/groupadd -g 1010 oinstall/usr/sbin/groupadd -g 1020 asmadmin/usr/sbin/groupadd -g 1021 asmdba/usr/sbin/groupadd -g 1022 asmoper/usr/sbin/groupadd -g 1031 dba/usr/sbin/groupadd -g 1032 operuseradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grIDuseradd -u 1101 -g oinstall -G dba,oper oraclemkdir -p /u01/app/11.2.0/grIDmkdir -p /u01/app/mkdir /u01/app/oraclechown -R grID:oinstall /u01chown oracle:oinstall /u01/app/chmod -R 775 /u01/
(2.5.2)配置grID的环境变量,2个节点都要执行
[grID@standbydb1 ~]$ vim .bash_profile #添加export TMP=/tmp export TMPDIR=$TMP export ORACLE_SID=+ASM1 #如果是节点2,改为:+ASM2export ORACLE_BASE=/u01/app/grIDexport ORACLE_HOME=/u01/app/grIDexport 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 022
(2.5.3)配置oracle的环境变量,2个节点都要执行
[oracle@standbydb1 ~$TMP export ORACLE_SID=standby1export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/db_1export TNS_admin=$ORACLE_HOME/network/admin export PATH=/usr/022
(2.5.4)配置grID的节点互信,在一个节点用grID用户执行
./sshUserSetup.sh -hosts primarydb1 primarydb2" -user grID -advanced
(2.5.5)配置oracle的节点互信,在一个节点用oracle用户执行
./sshUserSetup." -user oracle -advanced
(2.6)安装前的检查
2个节点安装cvuqdisk包,进入grID安装包
[root@standbydb1 soft]# cd grID/[root@standbydb1 grID]# lsdoc install response rpm runcluvfy.sh runInstaller sshsetup stage welcome.HTML[root@standbydb1 grID]# cd rpm/[root@standbydb1 rpm]# cvuqdisk-1.0.7-.rpm[root@standbydb1 rpm]# rpm -ivh cvuqdisk-.rpmPreparing... ########################################### [100%]Using default group oinstall to install package 1:cvuqdisk ########################################### [100%]
执行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_0ORACLE_HOSTname=standbydb1INVENTORY_LOCATION=/u01/app/oraInventorySELECTED_LANGUAGES=enoracle.install.option=CRS_CONfigORACLE_BASE=/u01/app/grIDORACLE_HOME=/u01/app/grIDoracle.install.asm.OSDBA=asmdbaoracle.install.asm.OSOPER=asmoperoracle.install.asm.OSASM=asmadminoracle.install.crs.config.gpnp.scanname=standbydb-scanoracle.install.crs.config.gpnp.scanPort=1521oracle.install.crs.config.clustername=standbydb-install.crs.config.gpnp.configureGNS=falseinstall.crs.config.gpnp.gnsSubDomain=install.crs.config.gpnp.gnsVIPAddress=install.crs.config.autoConfigureClusterNodeVIP=install.crs.config.clusterNodes=standbydb1:standbydb1-vip,standbydb2:standbydb2-viporacle.install.crs.config.networkInterfaceList=eth0:10.0:1,eth1:2,eth2:0.0:3install.crs.config.storageOption=ASM_STORAGEoracle.install.crs.config.sharedfileSystemStorage.diskDriveMapPing=install.crs.config.sharedfileSystemStorage.votingdiskLocations=install.crs.config.sharedfileSystemStorage.votingdiskRedundancy=norMALoracle.install.crs.config.sharedfileSystemStorage.ocrLocations=install.crs.config.sharedfileSystemStorage.ocrRedundancy=norMAL oracle.install.crs.config.useIPMI=install.crs.config.ipmi.bmcUsername=install.crs.config.ipmi.bmcPassword=install.asm.SYSASMPassword=Oracle123oracle.install.asm.diskGroup.name=OCRoracle.install.asm.diskGroup.redundancy=install.asm.diskGroup.AUSize=install.asm.diskGroup.disks=/dev/raw/raw1,/dev/raw/raw2,/dev/raw/raw3oracle.install.asm.diskGroup.diskdiscoveryString=/dev/raw/*oracle.install.asm.monitorPassword=Oracle123oracle.install.crs.upgrade.clusterNodes=oracle.install.asm.upgradeASM=falseoracle.installer.autoupdates.option=SKIP_UPDATESoracle.installer.autoupdates.downloadUpdatesLoc=autoUPDATES_MYORACLESUPPORT_USERname=autoUPDATES_MYORACLESUPPORT_PASSWORD=PROXY_HOST=PROXY_PORT=PROXY_USER=PROXY_PWD=PROXY_REALM=VIEw Code
额外工作:
(1)创建磁盘组
su - grID
sqlplus / as sysasmcreate diskgroup data external redundancy disk '/dev/raw/raw4',/dev/raw/raw5/dev/raw/raw6' attribute compatible.rdbms'=11.2.0.0compatible.asmau_size1M';create diskgroup arch external redundancy /dev/raw/raw7';
启动所有节点上的磁盘组
(2)创建默认监听
su - grIDsrvctl add Listenersrvctl start Listener
(3.2)安装数据库软件
安装命令:
./runInstaller -ignorePrereq -silent -force -responsefile /u01/mysoft/oracle/db_install_20190714.rsp
响应文件db_install_20190714.rsp的内容为:
oracle.rspfmt_dbinstall_response_schema_v11_2_0oracle.INSTALL_DB_SWONLYORACLE_HOSTname=standbydb1UNIX_GROUP_name=oinstallINVENTORY_LOCATION=/u01/app/enORACLE_HOME=/u01/app/oracle/product/db_1ORACLE_BASE=/u01/app/oracleoracle.install.db.InstallEdition=EEoracle.install.db.EEOptionsSelection=install.db.optionalComponents=install.db.DBA_GROUP=dbaoracle.install.db.OPER_GROUP=operoracle.install.db.CLUSTER_NODES=standbydb1,standbydb2oracle.install.db.isRACOneInstall=install.db.racOneservicename=install.db.config.starterdb.type=GENERAL_PURPOSEoracle.install.db.config.starterdb.globalDBname=install.db.config.starterdb.SID=install.db.config.starterdb.characterSet=install.db.config.starterdb.memoryOption=install.db.config.starterdb.memorylimit=install.db.config.starterdb.installExampleSchemas=install.db.config.starterdb.enableSecuritySettings=trueinstall.db.config.starterdb.password.ALL=install.db.config.starterdb.password.SYS=install.db.config.starterdb.password.SYstem=install.db.config.starterdb.password.SYSMAN=install.db.config.starterdb.password.DBSNMP=install.db.config.starterdb.control=DB_CONTRoloracle.install.db.config.starterdb.grIDcontrol.grIDControlServiceURL=install.db.config.starterdb.automatedBackup.enable=install.db.config.starterdb.automatedBackup.osuID=install.db.config.starterdb.automatedBackup.ospwd=install.db.config.starterdb.storageType=install.db.config.starterdb.fileSystemStorage.dataLocation=install.db.config.starterdb.fileSystemStorage.recoveryLocation=install.db.config.asm.diskGroup=install.db.config.asm.ASMSNMPPassword=MYORACLESUPPORT_USERname=MYORACLESUPPORT_PASSWORD=Security_UPDATES_VIA_MYORACLESUPPORT=DECliNE_Security_UPDATES=PROXY_HOST=PROXY_PORT=PROXY_USER=VIEw Code
(3.3)创建数据库
[oracle@standbydb1 bin]$ pwd/u01/app/oracle/product/0/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.0OPERATION_TYPE = createDatabase[CREATEDATABASE]GDBname = standbyDB_UNIQUE_name = SID = NODEList=General_Purpose.dbcSYSPASSWORD = Oracle123SYstemPASSWORD = DATAfileDESTINATION = +DATASTORAGETYPE=ASMdisKGROUPname=DATACHaraCTERSET = ZHS16GBKNATIONALCHaraCTERSET= UTF8DB_BLOCK_SIZE=8192TOTALMEMORY = 1024"VIEw Code
(四)结果确认
查看集群资源
[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 1 ONliNE ONliNE standbydb2VIEw Code
查看数据库状态
sql> select name,open_mode from v$database;name OPEN_MODE--------- --------------------STANDBY READ WRITEsql> host_name,instance_name from gv$instance;HOST_name INSTANCE_name------------- -----------------standbydb1 standby1standbydb2 standby2
结束。
总结
以上是内存溢出为你收集整理的redhat6.7环境下oracle11gR2 RAC静默安装全部内容,希望文章能够帮你解决redhat6.7环境下oracle11gR2 RAC静默安装所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)