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 ...
随机推荐
- jmeter配置mysql数据库步骤
安装环境: Windows10系统 jmeter版本:3.0版本 java1.8版本 安装步骤: 1.下载连接mysql数据库jar包,地址:http://download.csdn.net/deta ...
- 使用gitblit 在windows平台搭建git服务器
1.下载jdk,安装并且配置好环境变量 2.下载gitblit 直接解压无需安装 3.配置gitblit 1.修改gitblit安装目录下的data文件下的gitblit.properties.将in ...
- 【转】一篇文章,教你学会Git
一篇文章,教你学会Git 在日常工作中,经常会用到Git操作.但是对于新人来讲,刚上来对Git很陌生,操作起来也很懵逼.本篇文章主要针对刚开始接触Git的新人,理解Git的基本原理,掌握常用的一些命令 ...
- Netbeans调试教程
官方教程:Netbeans调试 CC++ 项目教程.docx 1.步过: 就是把函数当成一条指令来调用 比如上面就是光执行fun(i),不会到函数里面去 2.步入 就是进入函数里面执行 3.步出 就是 ...
- [Redis] 基于redis的分布式锁
前言分布式锁一般有三种实现方式:1. 数据库乐观锁:2. 基于Redis的分布式锁:3. 基于ZooKeeper的分布式锁.本篇博客将介绍第二种方式,基于Redis实现分布式锁. 可靠性首先,为了确保 ...
- uva1612 Guess
和cf的打分有点像啊 因为一共只有三道题,所以每个人的得分最多有8种可能性.把这8种可能性都算出来,存在数组里,排好序备用排名就是一个天然的链表,给出了扫描的顺序扫描时,维护两个变量:前一个playe ...
- QT5:总结篇 控件集合
一.Layouts 二.Spacers 三.Buttons 四.Item Views(Model-Based) 五.Item Widgets(Item-Based) 六.Containers 七.In ...
- JavaScript 非常重要的几个概念
JavaScript是一门比较复杂的语言.如果你是一名JavaScript开发人员,不管处于什么样的水平,都有必要了解JavaScript的基本概念.小编最近的工作涉及到JavaScript,于是本文 ...
- Word转html并移植到web项目
1.打开对应word文件 建议使用web视图查看文档 这样可以提前预览转转成html样式 2.如果有图片修改图片大小及格式 在web视图下,把图片调制适当大小,不然导出的html可能图片较小 3.点击 ...
- Redis那些事(一) — Redis简介
本人最近在学习Redis的使用和底层原理,有一些收获,所以希望通过写博客的形式来记录自己的学习过程,加深自己的理解,同时也方便以后查阅复习.目前打算先记录一些基本的使用方法和部分底层实现,其他的如果有 ...