Centos6.5安装Oracle11.2.0.4 RAC(完整版)
一、环境配置
1.配置Node1和Node2两个节点之间的网卡
Node1:
- [root@rac1 network-scripts]# cat ifcfg-eth0
- DEVICE=eth0
- HWADDR=08:00:27:E6:6A:DF
- TYPE=Ethernet
- UUID=543aef46-94aa-442f-9259-8584588c5e66
- ONBOOT=yes
- NM_CONTROLLED=yes
- BOOTPROTO=none
- IPADDR=192.168.8.221
- NETMASK=255.255.255.0
- GATEWAY=192.168.8.1
- DNS1=221.228.255.1
- [root@rac1 network-scripts]# cat ifcfg-eth1
- DEVICE=eth1
- HWADDR=08:00:27:72:5A:8F
- TYPE=Ethernet
- ONBOOT=yes
- NM_CONTROLLED=yes
- BOOTPROTO=none
- IPADDR=172.168.1.18
Node2:
- [root@rac2 network-scripts]# cat ifcfg-eth0
- DEVICE=eth0
- HWADDR=08:00:27:1B:D9:5A
- TYPE=Ethernet
- UUID=543aef46-94aa-442f-9259-8584588c5e66
- ONBOOT=yes
- NM_CONTROLLED=yes
- BOOTPROTO=none
- IPADDR=192.168.8.223
- NETMASK=255.255.255.0
- GATEWAY=192.168.8.1
- DNS1=221.228.255.1
- [root@rac2 network-scripts]# cat ifcfg-eth1
- DEVICE=eth1
- HWADDR=08:00:27:39:5F:8C
- TYPE=Ethernet
- ONBOOT=yes
- NM_CONTROLLED=yes
- BOOTPROTO=none
- IPADDR=172.168.1.19
2.配置/etc/hosts主机文件
- [root@rac1 network-scripts]# cat /etc/hosts
- 127.0.0.1 localhost
- ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
- #node1
- 192.168.8.221 rac1 rac1.oracle.com
- 192.168.8.222 rac1-vip
- 172.168.1.18 rac1-priv
- #node2
- 192.168.8.223 rac2 rac2.oracle.com
- 192.168.8.224 rac2-vip
- 172.168.1.19 rac2-priv
- #scan-ip
- 192.168.8.225 rac-cluster rac-cluster-scan
3.配置DNS(略,可以暂时不配置)
4.关闭防火墙
- service iptables stop
- chkconfig iptables off
5.关闭Selinux
- vim /etc/selinux/config
- SELINUX=disabled
6.创建用户和组
- --创建用户:
- groupadd -g 1000 oinstall
- groupadd -g 1200 asmadmin
- groupadd -g 1201 asmdba
- groupadd -g 1202 asmoper
- groupadd -g 1300 dba
- groupadd -g 1301 oper
- --创建组:
- useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper grid
- useradd -u 1101 -g oinstall -G dba,oper,asmdba oracle
- --创建密码:
- passwd grid
- passwd oracle
7.配置用户的环境变量
Node1:
- --grid用户:
- export PATH
- export TMP=/tmp
- export TMPDIR=$TMP
- export ORACLE_SID=+ASM1
- export ORACLE_BASE=/u01/grid
- export ORACLE_HOME=/u01/app/grid/11.2.0
- export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
- 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
- export LANG=en_US
- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
- umask 022
- --oracle用户:
- export PATH
- export TMP=/tmp
- export TMPDIR=$TMP
- export ORACLE_HOSTNAME=rac1
- export ORACLE_SID=orcl1
- export ORACLE_BASE=/u01/oracle
- export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
- export ORACLE_UNQNAME=orcl
- export TNS_ADMIN=$ORACLE_HOME/network/admin
- #export ORACLE_TERM=xterm
- 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
- export LANG=en_US
- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
- export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
- umask 022
Node2:
- --grid用户:
- export PATH
- export TMP=/tmp
- export TMPDIR=$TMP
- export ORACLE_SID=+ASM2
- export ORACLE_BASE=/u01/grid
- export ORACLE_HOME=/u01/app/grid/11.2.0
- export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
- 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
- export LANG=en_US
- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
- umask 022
- --oracle用户:
- export PATH
- export TMP=/tmp
- export TMPDIR=$TMP
- export ORACLE_HOSTNAME=rac2
- export ORACLE_SID=orcl2
- export ORACLE_BASE=/u01/oracle
- export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
- export ORACLE_UNQNAME=orcl
- export TNS_ADMIN=$ORACLE_HOME/network/admin
- #export ORACLE_TERM=xterm
- 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
- export LANG=en_US
- export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
- export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'
- umask 022
8.创建所需目录
- mkdir -p /u01/grid
- mkdir -p /u01/app/grid/11.2.0
- mkdir -p /u01/oracle
- chown -R oracle:oinstall /u01
- chown -R grid:oinstall /u01/grid
- chown -R grid:oinstall /u01/app/grid/11.2.0
- chmod -R 775 /u01
9.配置limits.conf增加如配置
- vim /etc/security/limits.conf
- oracle soft nofile 1024
- oracle hard nofile 65536
- oracle soft nproc 2047
- oracle hard nproc 16384
- oracle soft stack 10240
- oracle hard stack 32768
- grid soft nofile 1024
- grid hard nofile 65536
- grid soft nproc 2047
- grid hard nproc 16384
- grid soft stack 10240
- grid hard stack 32768
10.修改内核参数
- --注意将原来参数shmmall和shmmax注释掉
- vim /etc/sysctl.conf
- fs.aio-max-nr = 1048576
- fs.file-max = 6815744
- kernel.shmall = 1073741824
- kernel.shmmax = 4398046511104
- 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 = 262144
- net.core.wmem_max = 1048576
- --使sysctl生效
- sysctl -p
11.停止NTP服务
- service ntpd stop
- chkconfig ntpd off
- mv /etc/ntp.conf /etc/ntp.conf.bak
11.安装相关软件包
yum install gcc
compat-libstdc++-33 elfutils-libelf-devel glibc-devel glibc-headers
gcc-c++ libaio-devel libstdc++-devel pdksh compat-libcap1-*
12.配置共享存储
for i in b c d e f g ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id
--whitelisted --replace-whitespace --device=/dev/\$name\",
RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace
--device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\",
GROUP=\"asmadmin\",
MODE=\"0660\"" >>
/etc/udev/rules.d/99-oracle-asmdevices.rules
done
--执行
/sbin/start_udev
13.上传并解压grid和oracle安装包(略)
二、Grid软件安装
1.安装grid,以grid用户登录,并执行./runInstaller进入安装界面
2.进入界面选择跳过软件更新,点击Next
2.选择Grid Infrastructure,点击Next:
3.选择高级安装,点击Next
4.默认Englist,点击Next
5.去掉Configure GNS选项,点击Next
6.点击Add选项,输入对应参数,参考/etc/hosts文件中配置
7.点击SSH Connectivity,输入grid的密码,点击Setup等待配置完成,然后点击Next
8.确认网络接口,eth0为Public,eth1为Private
9.选择Oracle ASM,点击Next
10.输入Disk Group Name,点击Change Discovery Path,在弹出的对话框中输入磁盘的路径,点击OK
11.选择ASM磁盘,点击Next
11.输入口令密码,点击Next
12.选择不使用IPMI,点击Next
13.默认选择,点击Next
14.确认Grid的安装路径,其中Grid软件的ORACLE_HOME不能是ORACLE_BASE的子目录
15.默认Inverntory,点击Next
16.该错误可以从Grid的安装文件的rpm目录下获取,Node1和Node2都安装即可,Device Checks for ASM可忽略
17.进入安装Grid安装前的概要信息界面,点击Install进行安装
18.根据红框中信息,现在Node1节点执行2个脚本,Node1节点全部执行完毕后,再在Node2上分别执行2个脚本,全部执行完毕后,点击OK,执行下一步
脚本执行结果如下
Node1:
- [root@rac1 rpm]# /u01/app/oraInventory/orainstRoot.sh
- Changing permissions of /u01/app/oraInventory.
- Adding read,write permissions for group.
- Removing read,write,execute permissions for world.
- Changing groupname of /u01/app/oraInventory to oinstall.
- The execution of the script is complete.
- [root@rac1 rpm]# /u01/app/11.2.0/grid/root.sh
- Performing root user operation for Oracle 11g
- The following environment variables are set as:
- ORACLE_OWNER= grid
- ORACLE_HOME= /u01/app/11.2.0/grid
- Enter the full pathname of the local bin directory: [/usr/local/bin]:
- Copying dbhome to /usr/local/bin ...
- Copying oraenv to /usr/local/bin ...
- Copying coraenv to /usr/local/bin ...
- Creating /etc/oratab file...
- Entries will be added to the /etc/oratab file as needed by
- Database Configuration Assistant when a database is created
- Finished running generic part of root script.
- Now product-specific root actions will be performed.
- Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
- Creating trace directory
- User ignored Prerequisites during installation
- Installing Trace File Analyzer
- OLR initialization - successful
- root wallet
- root wallet cert
- root cert export
- peer wallet
- profile reader wallet
- pa wallet
- peer wallet keys
- pa wallet keys
- peer cert request
- pa cert request
- peer cert
- pa cert
- peer root cert TP
- profile reader root cert TP
- pa root cert TP
- peer pa cert TP
- pa peer cert TP
- profile reader pa cert TP
- profile reader peer cert TP
- peer user cert
- pa user cert
- Adding Clusterware entries to upstart
- CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
- CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
- CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
- CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
- CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
- CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
- CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
- CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
- CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
- CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
- CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
- CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
- ASM created and started successfully.
- Disk Group SYSTEMDG created successfully.
- clscfg: -install mode specified
- Successfully accumulated necessary OCR keys.
- Creating OCR keys for user 'root', privgrp 'root'..
- Operation successful.
- CRS-4256: Updating the profile
- Successful addition of voting disk 03bd9e6851cf4fb4bf4c92e24a3d71cc.
- Successful addition of voting disk 362f2cfb5b3d4f29bf319c668e0efbe4.
- Successful addition of voting disk 57659c53f4284fbdbfeabafb20c3fbdd.
- Successfully replaced voting disk group with +SYSTEMDG.
- CRS-4256: Updating the profile
- CRS-4266: Voting file(s) successfully replaced
- ## STATE File Universal Id File Name Disk group
- -- ----- ----------------- --------- ---------
- 1. ONLINE 03bd9e6851cf4fb4bf4c92e24a3d71cc (/dev/asm-diskb) [SYSTEMDG]
- 2. ONLINE 362f2cfb5b3d4f29bf319c668e0efbe4 (/dev/asm-diskc) [SYSTEMDG]
- 3. ONLINE 57659c53f4284fbdbfeabafb20c3fbdd (/dev/asm-diskd) [SYSTEMDG]
- Located 3 voting disk(s).
- CRS-2672: Attempting to start 'ora.asm' on 'rac1'
- CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
- CRS-2672: Attempting to start 'ora.SYSTEMDG.dg' on 'rac1'
- CRS-2676: Start of 'ora.SYSTEMDG.dg' on 'rac1' succeeded
- Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Node2:
- [root@rac2 grid]# /u01/app/oraInventory/orainstRoot.sh
- Changing permissions of /u01/app/oraInventory.
- Adding read,write permissions for group.
- Removing read,write,execute permissions for world.
- Changing groupname of /u01/app/oraInventory to oinstall.
- The execution of the script is complete.
- [root@rac2 grid]# /u01/app/11.2.0/grid/root.sh
- Performing root user operation for Oracle 11g
- The following environment variables are set as:
- ORACLE_OWNER= grid
- ORACLE_HOME= /u01/app/11.2.0/grid
- Enter the full pathname of the local bin directory: [/usr/local/bin]:
- Copying dbhome to /usr/local/bin ...
- Copying oraenv to /usr/local/bin ...
- Copying coraenv to /usr/local/bin ...
- Creating /etc/oratab file...
- Entries will be added to the /etc/oratab file as needed by
- Database Configuration Assistant when a database is created
- Finished running generic part of root script.
- Now product-specific root actions will be performed.
- Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
- Creating trace directory
- User ignored Prerequisites during installation
- Installing Trace File Analyzer
- OLR initialization - successful
- Adding Clusterware entries to upstart
- CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1, number 1, and is terminating
- An active cluster was found during exclusive startup, restarting to join the cluster
- Configure Oracle Grid Infrastructure for a Cluster ... succeeded
19.临近执行完毕时,报了一个INS-20802的这种错误,导致这个错误的原因是在/etc/hosts中配置了SCAN的地址,尝试ping这个地址信息,如果可以成功,则这个错误可以忽略。
20.最后单击Close,完成Grid软件在Node1和Node2的安装操作
三、安装Oracle软件
1.安装oracle,以oracle用户登录,并执行./runInstaller进入安装界面
2.直接点击Next
3.选择跳过软件更新,点击Next
4.选则只安装数据库软件,点击Next
5.点击SSH Connectivity,输入Oracle的密码,点击setup,有如下提示,说明成功
6.默认English,点击Next
7.选择Enterprise Edition
8.默认路径,点击Next
9.选择Oracle用户组,默认选择,点击Next
10.Swap size错误增大即可,SCAN错误前面说过,选择Ignore all,点击Next
11.Oracle安装概要信息,点击Next
12.分别在Node1和Node2执行脚本
13.最后点击Close安装完成
四、创建ASM磁盘组
1.以grid用户登录,输入asmca命令,弹出ASM配置界面,点击Create
2.输入Disk Group Name,点击OK,会提示创建成功
3.创建成功后,会发现多出来一行记录,但是在state只显示MOUNTED(1of2)
4.点击Mount ALL,成功后state显示MOUNTED(2of2),点击Exit退出
五、安装数据库实例
1.使用Oracle用户登录,执行dbca命令,弹出如下界面,选择第一项,点击Next
2.点击创建数据库选项,点击Next
3.根据工作中的实际情况选择对应的模板,这里以默认模板为例
4.选择rac1和rac2,输入orcl实例名,点击Next
5.根据实际情况选择是否配置EM,点击Next
6.配置Oracle相关密码,点击Next
7.选择存储ASM,默认选择之前创建的磁盘组,点击Next
8.根据实际情况选择是否启用闪回恢复区,如果启用,需要在asmca中配置闪回区或放入到DATADG中,这里不配置
9.根据实际选择,这里不选择,点击Next
10.这里着重注意下配置正确的字符集,根据实际生产要求,点击Next
11.默认选择数据库存储信息,点击Next
12.点击Finish,开始创建数据库
13.最后完成数据库创建
版权声明:本文为博主原创文章,未经博主允许不得转载
http://blog.csdn.net/u011364306/article/details/50555098
Centos6.5安装Oracle11.2.0.4 RAC(完整版)的更多相关文章
- CentOS6.8 安装 Oracle11.2.0.4
1. 安装操作系统 安装的时候选择中文+英文支持 注意分区: swap sda盘做系统盘 sdb盘做数据盘 配置完成后的服务器分区路径信息: [root@dbserver ~]# df -h File ...
- CentOS-6.4-DVD系统中安装Oracle-11.2.0.4
完整版见https://jadyer.github.io/2014/05/18/centos-install-oracle/ /** * CentOS-6.4-DVD系统中安装Oracle-11.2. ...
- Windows8安装Oracle11.2.0.1-0624,附带 DBCA建库、netca创建监听、配置PLSQL、定义客户端的环境变量 NLS_LANG、定义客户端的环境变量 TNS_ADMIN01
Windows8安装Oracle11.2.0.1 操作系统:Windows 8 企业版 64bit Oracle:11. ...
- redhat7.2静默安装Oracle11.2.0.4
redhat7.2静默安装Oracle11.2.0.4我们将oracle安装到/opt/oracle目录下,后面的环境变量则以此为基础.一.设置主机hosts映射vi /etc/hosts[plain ...
- RHEL7或CentOS7安装11.2.0.4 RAC碰到的问题
RHEL7或CentOS7安装11.2.0.4 RAC碰到的问题 随着Linux 版本的普及,但Oracle数据库主流版本仍是11gR2, 的支持不很完美,在Linux 上安装会遇到几处问题,以此记录 ...
- centos6.8安装cdh5.10.0(离线版)
Centos6.8安装CDH5 相关包的下载地址: Cloudera Manager地址:http://archive.cloudera.com/cm5/cm/5/ CDH安装包地址:http://a ...
- centos6.5安装nginx1.16.0
参考: centos7 编译安装nginx1.16.0( 完整版 ) https://blog.csdn.net/weixin_37773766/article/details/80290939 ...
- Oracle11.2.0.4 RAC安装文档
1 环境配置 参考官方文档<Grid Infrastructure Installation Guide for Linux> 1.1 软件环境 操作系统: [root@howe1 ~]# ...
- centos6.5安装配置zabbix3.0.3
1.首先要准备LAMP环境. (1)安装php Zabbix 3.0对PHP的要求最低为5.4,而CentOS6默认为5.3.3,完全不满足要求,故需要利用第三方源,将PHP升级到5.4以上 rpm ...
随机推荐
- RHEL 6.5----iscsi多路径存储
主机名 IP master eth0: 192.168.30.130(NAT) eth1: 192.168.17.130(VMNet4) node-1 eth0: 192.168.30.131(NAT ...
- R语言中的并行处理
网上有人说foreach包可以并行,我就去弄了,结果发现一个普通的二重循环什么事都不错都很卡!捣鼓了半天才发现是foreach的问题 为了提速,做了如下事宜: 直接利用矩阵列加减,不是一个个遍历加 把 ...
- Backbone.js之Todo源码浅析
相信每个接触了解过backbone的人都知道todo,网上的关于它的分析教程也都分析乱了.但是,知识只有自己学习领悟才是自己的,话不多说,正文开始. 在分析todo的源码之前,首先我们要知道todo具 ...
- JSP自定义标签开发步骤
自定义的标签库一.基本概念: 1.标签(Tag): 标签,通常也成为动作,是一组按照XML语法格式编写的代码片段,在JSP中,用来封装在页面中可重复利用的逻辑,通过标签可以使JSP网页变得简洁并且易于 ...
- EOS Dapp体验报告
EOS Dapp体验报告 EOS通过并行链和DPOS的方式解决了延迟和数据吞吐量的难题. EOS能够实现每秒百万级的处理量,而目前比特币是每秒7笔,以太坊是30-40笔,EOS的这一超强能力吊打比特币 ...
- Java 利用FTP上传,下载文件,遍历文件目录
Java实现FTP上传下载文件的工具包有很多,这里我采用Java自带的API,实现FTP上传下载文件.另外JDK1.7以前的版本与其之后版本的API有了较大的改变了. 例如: JDK1.7之前 JDK ...
- python+selenium(python基础)
1.编辑器的选择 好刀不误砍柴工,那么我们写代码也需要一个利器,虽然python自带有python shell ,但我们在执行代码的时候,需要开很多窗口,最重要的一点是,代码文件的管理很不方便,笔者推 ...
- 如何处理Docker的错误消息request canceled:Docker代理问题
在本地安装Kubernetes时,遇到错误消息: request canceled while waiting for connection(Client.Timeout exceeded while ...
- STL || Gym 101653U Top 25
一组字符串给出两种排列方式, 求最小分成多少组 如 A A B C C D D B E E 则分成3组 A B C D E 即为1 3 1 #include < ...
- SSM框架删除/更新时返回影响条数
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> < ...