RedHat EL5 安装Oracle 10g RAC之--CRS 安装

本文涉及的产品
小语种识别,小语种识别 200次/月
教育场景识别,教育场景识别 200次/月
通用文字识别,通用文字识别 200次/月
简介:

系统环境:

操作系统:RedHat EL5

Cluster: Oracle CRS 10.2.0.1.0

Oracle:  Oracle 10.2.0.1.0


如图所示:RAC 系统架构

wKiom1Np81bhMmCXAAGvUOVml00019.jpg

二、CRS 安装

  Cluster Ready Service是Oracle 构建RAC,负责集群资源管理的软件,在搭建RAC中必须首先安装.

安装需采用图形化方式,以Oracle用户的身份安装(在node1上):

注意:修改安装配置文件,增加redhat-5的支持

[oracle@node1 install]$ pwd

/home/oracle/cluster/install

[oracle@node1 install]$ ls

addLangs.sh  images   oneclick.properties  oraparamsilent.ini  response

addNode.sh   lsnodes  oraparam.ini         resource            unzip

[oracle@node1 install]$ vi oraparam.ini

[Certified Versions]

Linux=redhat-3,SuSE-9,redhat-4,redhat-5,UnitedLinux-1.0,asianux-1,asianux-2

[oracle@node1 cluster]$./runInstaller

wKiom1Np9D_gta0TAAOU3ODbpYo235.jpg

欢迎界面

wKiom1Np9Fqw7dMxAAQ877duc5k567.jpg

注意安装CRS的主目录,不能和Oracle软件的目录一致,需单独在另一个目录

[oracle@node1 ~]$ ls -l /u01

total 24

drwxr-xr-x  3 oracle oinstall  4096 May  5 17:04 app

drwxr-xr-x 36 oracle   oinstall  4096 May  7 11:08 crs_1

drwx------  2 oracle oinstall 16384 May  4 15:59 lost+found

[oracle@node1 ~]$

wKiom1Np9N3i4N9IAAS5W-8Dhxo331.jpg

添加节点(如果主机间信任关系配置有问题,这里就无法发现node 2)

wKioL1Np9Umw2PB1AAPy6AzmTDQ846.jpg

修改public 网卡属性(public 网卡用于和Client 通讯)

wKioL1Np9YCz2b3-AAUJHGqPOUk691.jpg

OCR必须采用RAW设备(Exteneral Redundancy只需一个RAW,安装后可以添加mirror)

wKioL1Np9eXiMcc_AAVxqZm2wrM209.jpg

VOTE DISK必须采用RAW设备(Exteneral Redundancy只需一个RAW,安装后可以添加多个raw构成冗余)

wKiom1Np9nmj6NqtAARaCrLEH4c513.jpg

开始安装(并将安装软件传送到node2)

wKiom1Np9pvSgFDUAARmCJbea54508.jpg

安装提示分别在两个节点按顺序执行script

node1:

1
2
3
4
[root@node1 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh 
Changing permissions of /u01/app/oracle/oraInventory to  770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete

node2:

1
2
3
4
[root@node2 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh 
Changing permissions of /u01/app/oracle/oraInventory to  770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete

node1:

[root@node1 ~]# /u01/crs_1/root.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
WARNING: directory  '/u01'  is  not  owned by root
Checking to see  if  Oracle CRS stack is already configured
/etc/oracle does  not  exist. Creating it now.
Setting the permissions  on  OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory  '/u01'  is  not  owned by root
assigning default hostname node1  for  node  1.
assigning default hostname node2  for  node  2.
Successfully accumulated necessary OCR keys.
Using ports: CSS= 49895  CRS= 49896  EVMC= 49898  and  EVMR= 49897.
node <nodenumber>: <nodename> < private  interconnect name> <hostname>
node  1 : node1 node1-priv node1
node  2 : node2 node2-priv node2
Creating OCR keys  for  user  'root' , privgrp  'root' ..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of  1  voting devices complete.
Startup will be queued to  init  within  90  seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within  600  seconds.
CSS is active  on  these nodes.
         node1
CSS is inactive  on  these nodes.
         node2
Local node checking complete.
Run root.sh  on  remaining nodes to start CRS daemons.

node1执行成功!

node2:

[root@node2 ~]# /u01/crs_1/root.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
WARNING: directory  '/u01'  is not owned by root
Checking to see  if  Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory  '/u01'  is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning  default  hostname node1  for  node 1.
assigning  default  hostname node2  for  node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: node1 node1-priv node1
node 2: node2 node2-priv node2
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry  for  cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
         node1
         node2
CSS is active on all nodes.
Waiting  for  the Oracle CRSD and EVMD to start
Waiting  for  the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent)  for  configuring nodeapps

/u01/crs_1/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

出现以上错误,解决方法:

[root@node2 bin]# vi vipca

Linux) LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/srvm/lib:$LD_LIBRARY_PATH

      export LD_LIBRARY_PATH

      #Remove this workaround when the bug 3937317 is fixed

      arch=`uname -m`

      if [ "$arch" = "i686" -o "$arch" = "ia64" ]

      then

           LD_ASSUME_KERNEL=2.4.19

           export LD_ASSUME_KERNEL

      fi

unset LD_ASSUME_KERNEL (添加此行信息)

      #End workaround


[root@node2 bin]# vi srvctl

LD_ASSUME_KERNEL=2.4.19

export LD_ASSUME_KERNEL

unset LD_ASSUME_KERNEL(添加此行信息)


在node 2重新执行root.sh:

注意:root.sh只能执行一次,如果再次执行,需执行rootdelete.sh

[root@node2 bin]# /u01/crs_1/root.sh

WARNING: directory '/u01' is not owned by root

Checking to see if Oracle CRS stack is already configured

Oracle CRS stack is already configured and will be running under init(1M)

[root@node2 bin]# cd ../install

[root@node2 install]# ls

1
2
3
4
cluster.ini         install.incl   rootaddnode.sbs    rootdelete.sh  templocal
cmdllroot.sh        make.log       rootconfig         rootinstall
envVars.properties  paramfile.crs  rootdeinstall.sh   rootlocaladd
install.excl        preupdate.sh   rootdeletenode.sh  rootupgrade

[root@node2 install]# ./rootdelete.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CRS -0210 : Could  not  find resource  'ora.node2.LISTENER_NODE2.lsnr' .
CRS -0210 : Could  not  find resource  'ora.node2.ons' .
CRS -0210 : Could  not  find resource  'ora.node2.vip' .
CRS -0210 : Could  not  find resource  'ora.node2.gsd' .
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources 
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
Checking to see  if  Oracle CRS stack is down...
Oracle CRS stack is  not  running.
Oracle CRS stack is down now.
Removing script  for  Oracle Cluster Ready services
Updating ocr file  for  downgrade
Cleaning up SCR settings  in  '/etc/oracle/scls_scr'

[root@node2 install]#

node 2 再次出错:

[root@node2 install]# /u01/crs_1/root.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
WARNING: directory  '/u01'  is  not  owned by root
Checking to see  if  Oracle CRS stack is already configured
Setting the permissions  on  OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory  '/u01'  is  not  owned by root
clscfg: EXISTING configuration version  3  detected.
clscfg: version  3  is 10G Release  2.
assigning default hostname node1  for  node  1.
assigning default hostname node2  for  node  2.
Successfully accumulated necessary OCR keys.
Using ports: CSS= 49895  CRS= 49896  EVMC= 49898  and  EVMR= 49897.
node <nodenumber>: <nodename> < private  interconnect name> <hostname>
node  1 : node1 node1-priv node1
node  2 : node2 node2-priv node2
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to  override .
-force is destructive  and  will destroy any previous cluster
configuration.
Oracle Cluster Registry  for  cluster has already been initialized
Startup will be queued to  init  within  90  seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within  600  seconds.
CSS is active  on  these nodes.
         node1
         node2
CSS is active  on  all nodes.
Waiting  for  the Oracle CRSD  and  EVMD to start
Oracle CRS stack installed  and  running under  init (1M)
Running vipca(silent)  for  configuring nodeapps

Error 0(Native: listNetInterfaces:[3])

 [Error 0(Native: listNetInterfaces:[3])]

解决方法:(配置网络)

[root@node2 bin]# ./oifcfg iflist

eth0  192.168.8.0

eth1  10.10.10.0

[root@node2 bin]# ./oifcfg getif

[root@node2 bin]# ./oifcfg setif -global eth0/192.168.8.0:public

[root@node2 bin]# ./oifcfg setif -global eth1/10.10.10.0:cluster_interconnect

[root@node2 bin]# ./oifcfg getif

eth0  192.168.8.0  global  public

eth1  10.10.10.0  global  cluster_interconnect

并在node2上执行VIPCA:

wKioL1Np-f7jjJnSAAKJogr5OU8992.jpg

以root身份执行vipca(在/u01/crs_1/bin)

wKioL1Np-jGz7zABAAM2hLcunZg293.jpg

配置信息应和/etc/hosts文件一致

wKiom1Np-pvheqYiAAPZFXo4_C0630.jpg

开始配置

wKioL1Np-pqhEWP-AAGGYpYYzMI076.jpg

vipca配置成功后,crs服务正常工作

wKioL1Np-vfiQeraAAKdYARXLR8570.jpg

安装完成!


验证CRS:

[root@node2 bin]# crs_stat -t

1
2
3
4
5
6
7
8
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.node1.gsd  application    ONLINE    ONLINE    node1       
ora.node1.ons  application    ONLINE    ONLINE    node1       
ora.node1.vip  application    ONLINE    ONLINE    node1       
ora.node2.gsd  application    ONLINE    ONLINE    node2       
ora.node2.ons  application    ONLINE    ONLINE    node2       
ora.node2.vip  application    ONLINE    ONLINE    node2

[root@node1 ~]# crs_stat -t

1
2
3
4
5
6
7
8
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.node1.gsd  application    ONLINE    ONLINE    node1       
ora.node1.ons  application    ONLINE    ONLINE    node1       
ora.node1.vip  application    ONLINE    ONLINE    node1       
ora.node2.gsd  application    ONLINE    ONLINE    node2       
ora.node2.ons  application    ONLINE    ONLINE    node2       
ora.node2.vip  application    ONLINE    ONLINE    node2

附:错误案例

如果在运行root.sh时出现以下错误:

wKioL1Np_SDQMHUEAAIfZxOAV4s961.jpg

在出现错误的节点上运行(root)vipca 解决!


@至此CRS安装成功!











本文转自 客居天涯 51CTO博客,原文链接:http://blog.51cto.com/tiany/1408023,如需转载请自行联系原作者
目录
相关文章
|
2月前
|
机器学习/深度学习 Oracle 关系型数据库
Oracle 19c单机一键安装脚本分享
Oracle 19c单机一键安装脚本分享
53 2
|
3月前
|
SQL Oracle 关系型数据库
MySQL、SQL Server和Oracle数据库安装部署教程
数据库的安装部署教程因不同的数据库管理系统(DBMS)而异,以下将以MySQL、SQL Server和Oracle为例,分别概述其安装部署的基本步骤。请注意,由于软件版本和操作系统的不同,具体步骤可能会有所变化。
165 3
|
4月前
|
SQL Oracle 关系型数据库
Oracle数据库基础教程:从安装到基本操作的全面介绍
Oracle数据库基础教程:从安装到基本操作的全面介绍
|
3月前
|
SQL Oracle 关系型数据库
Oracle数据库基础教程:从安装到基本操作的全面介绍
Oracle数据库基础教程:从安装到基本操作的全面介绍
|
2月前
|
存储 自然语言处理 Oracle
Oracle数据库字符集概述及修改方式
【8月更文挑战第15天】Oracle 数据库字符集定义了数据的编码方案,决定可存储的字符类型及其表示方式。主要作用包括数据存储、检索及跨系统传输时的正确表示。常见字符集如 AL32UTF8 支持多语言,而 WE8MSWIN1252 主用于西欧语言。修改字符集风险高,可能导致数据问题,需事先备份并评估兼容性。可通过 ALTER DATABASE 语句直接修改或采用导出-导入数据的方式进行。完成后应验证数据完整性。此操作复杂,须谨慎处理。
|
2月前
|
数据采集 Oracle 关系型数据库
实时计算 Flink版产品使用问题之怎么实现从Oracle数据库读取多个表并将数据写入到Iceberg表
实时计算Flink版作为一种强大的流处理和批处理统一的计算框架,广泛应用于各种需要实时数据处理和分析的场景。实时计算Flink版通常结合SQL接口、DataStream API、以及与上下游数据源和存储系统的丰富连接器,提供了一套全面的解决方案,以应对各种实时计算需求。其低延迟、高吞吐、容错性强的特点,使其成为众多企业和组织实时数据处理首选的技术平台。以下是实时计算Flink版的一些典型使用合集。
|
16天前
|
Oracle 关系型数据库 数据库
数据库数据恢复—Oracle数据库文件出现坏块的数据恢复案例
打开oracle数据库报错“system01.dbf需要更多的恢复来保持一致性,数据库无法打开”。 数据库没有备份,无法通过备份去恢复数据库。用户方联系北亚企安数据恢复中心并提供Oracle_Home目录中的所有文件,急需恢复zxfg用户下的数据。 出现“system01.dbf需要更多的恢复来保持一致性”这个报错的原因可能是控制文件损坏、数据文件损坏,数据文件与控制文件的SCN不一致等。数据库恢复工程师对数据库文件进一步检测、分析后,发现sysaux01.dbf文件损坏,有坏块。 修复并启动数据库后仍然有许多查询报错,export和data pump工具使用报错。从数据库层面无法修复数据库。
数据库数据恢复—Oracle数据库文件出现坏块的数据恢复案例
|
4天前
|
Oracle 关系型数据库 数据库
Oracle数据恢复—异常断电导致Oracle数据库数据丢失的数据恢复案例
Oracle数据库故障: 机房异常断电后,Oracle数据库启库报错:“system01.dbf需要更多的恢复来保持一致性,数据库无法打开”。数据库没有备份,归档日志不连续。用户方提供了Oracle数据库的在线文件,需要恢复zxfg用户的数据。 Oracle数据库恢复方案: 检测数据库故障;尝试挂起并修复数据库;解析数据文件。
|
3天前
|
Oracle NoSQL 关系型数据库
主流数据库对比:MySQL、PostgreSQL、Oracle和Redis的优缺点分析
主流数据库对比:MySQL、PostgreSQL、Oracle和Redis的优缺点分析
14 2
|
23天前
|
Oracle 安全 关系型数据库
Oracle数据恢复—Oracle数据库误删除的数据恢复方法探讨
删除Oracle数据库数据一般有以下2种方式:delete、drop或truncate。下面针对这2种删除oracle数据库数据的方式探讨一下oracle数据库数据恢复方法(不考虑全库备份和利用归档日志)。