Rhel5+Oracle10g+asm+vm虚拟机(oracle集群)(2)

10.配置NTPD服务器,或者配置2台机器的时间一样,不然在安装的时候会有很多的问题,建议装台时间服务器来进行同步时间.另外,在安装的时候,监视2台机器的时间,有时候会差好多

13.使用root用户解压,并安装

#unzip 10201_clusterware_linux32.zip

#unzip 10201_database_linux32.zip

二.安装clusterware,以及oracle

#rpm -ivh clusterware/rpm/cvuqdisk-1.0.1-1.rpm

#scp clusterware/rpm/cvuqdisk-1.0.1-1.rpm rac2:/opt/

节点2执行

rpm -ivh /opt/cvuqdisk-1.0.1-1.rpm

检查环境,节点1执行

#su - oracle

# cd clusterware/cluvfy

#./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose

ERROR:

Could not find a suitable set of interfaces for VIPs.

Result: Node connectivity check failed.

虚拟IP报错,可以不管

compat-gcc-7.3-2.96.128

compat-gcc-c++-7.3-2.96.128

compat-libstdc++-7.3-2.96.128

compat-libstdc++-devel-7.3-2.96.128

会提示没有以上包的报错,以root用户在双节点安装以下包

#rpm -ivh compat-gcc-7.3-2.96.128.i386.rpm

#rpm -ivh compat-libstdc++-7.3-2.96.128.i386.rpm

#rpm -ivh compat-libstdc++-devel-7.3-2.96.128.i386.rpm

#rpm -ivh compat-gcc-c++-7.3-2.96.128.i386.rpm

硬件检查

#./runcluvfy.sh stage -post hwos -n rac1,rac2 -verbose

ERROR:

Could not find a suitable set of interfaces for VIPs.

Result: Node connectivity check failed.

还是会有虚拟IP的报错,可以忽略

#vi /etc/RedHat-release

将版本5,改成4,因为oracle10G不支持RHEL5安装

#cd ..

# ./runInstaller

● Welcome:

点[Next]

● Specify Inventory directory and credentials:

Inventory directory: /u01/app/oracle/oraInventory

Operating System group name: oinstall

点[Next]

● Specify Home Details:

Name: OraCrs10g_home

Location: /u01/app/oracle/10.2.0/crs (手动改变CRS的目录)

点[Next]

● Product Specific Prerequisite Checks:

点[Next]

● Specify Cluster Configuration:

Cluster Name: crs

--------------------------------------------------------

|Public Node Name |Private Node Name |Virtual Node Name|

--------------------------------------------------------

| rac1 | int-rac1 |v-rac1 |

--------------------------------------------------------

| rac2 | int-rac2 | v-rac2 |

--------------------------------------------------------

点[Next]

● Specify Network Interface Usage:

--------------------------------------------------

| Interface Name | Subnet | Interface Type |

--------------------------------------------------

| eth0 | 192.168.0.0 | Public |

--------------------------------------------------

| eth1 | 10.0.0.0 | Private |

--------------------------------------------------

点[Next]

● Specify OCR Location:

选 Normal Redundacy

Specify OCR Location: /u02/oradata/orcl/OCRFile

Specify OCR Mirror Location: /u02/oradata/orcl/OCRFile_mirror

(如果出现没权限写的提示,则使用root用户 chown -R oracle.dba /u02/)

点[Next]

● Specify Voting Disk Location:

选 Normal Redundacy

Voting Disk Location: /u02/oradata/orcl/VotingFile

Additional Voting Disk 1 Location: /u02/oradata/orcl/VotingFile_mirror1

Additional Voting Disk 2 Location: /u02/oradata/orcl/VotingFile_mirror2

点[Next]

● Summary:

点[Install]

{{{arch=`uname -m`

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

#then

# LD_ASSUME_KERNEL=2.4.19

# export LD_ASSUME_KERNEL

#fi

#End workaround● Execute Configuration Scripts:}}}

以root身份在rac1上运行 /u01/app/oracle/oraInventory/orainstRoot.sh

完成后,以root身份在rac2上运行 /u01/app/oracle/oraInventory/orainstRoot.sh

完成后,以root身份在rac1上运行 /u01/app/oracle/product/crs/root.sh

完成后,以root身份在rac2上运行 /u01/app/oracle/product/crs/root.sh

在rac2上执行完root.sh后,会出一错误,在X下使用root运行vipca来解决

#/u01/app/oracle/product/10.2.0/crs/bin/vipca

● Welcome:

点[Next]

● Network interfaces:

eth0、eth1都要选中

点[Next]

● Virtual IPs for cluster notes:

--------------------------------------------------------------

| Node Name | IP Alias Name | IP Address | Subnet Mask |

--------------------------------------------------------------

| rac1 | v-rac1 | 192.168.0.143 | 255.255.255.0 |

--------------------------------------------------------------

| rac2 | v-rac2 | 192.168.0.145 | 255.255.255.0 |

--------------------------------------------------------------

点[Next]

● Summary:

点[Finish]

● Configuration Assistant Progress Dialog:

等配置完成后,点[OK]

● Configuration Results:

点[Exit]

在rac1上点 Execute Configuration Scripts 界面的[OK]

● End of installation:

点[Exit]

ORACLE软件安装

$cd database/

$./runInstaller

● Welcome:

点[Next]

● Select Installation Type:

我选的是 Enterprise Edition

点[Next]

● Specify Home Details:

Name: OraCrs10g_home1

Location: /u01/app/oracle/10.2.0/rac_db

点[Next]

● Specify Hardware Cluster Installation Mode:

选 Cluster Installation,并且两个节点全选中

点[Next]

● Product-Specific Prerequisite Checks:

点[Next]

● Select Configuration Option:

选 Install database Software only

点[Next]

● Summary:

点[Install]

● Run Script Windows:

以root身份在rac1上运行 /u01/app/oracle/10.2.0/rac_db/root.sh

完成后,以root身份在rac2上运行 /u01/app/oracle/10.2.0/rac_db/root.sh

● End of installation:

点[Exit]

创建TNS监听进程:

----------------

0.运行netca(rac1):

用oracle登录

$netca

● Real Application Clusters, Configuration:

选 Cluster configuration

点[Next]

● Real Application Clusters, Active Nodes:

两个节点全选中

点[Next]

● Welcome:

选 Listener configuration

点[Next]

● Listener Configuration, Listener:

选 Add

点[Next]

● Listener Configuration, Listener Name:

填 LISTENER

点[Next]

● Listener Configuration, Select Protocols:

选 TCP

点[Next]

● Listener Configuration, TCP/IP Protocol:

选 Use the standard port number of 1521

点[Next]

● Listener Configuration, More Listener?:

选 No

点[Next]

● Welcome:

选 Naming Methods configuration

点[Next]

● Naming Methods Configuration, Select Naming Methods:

选 Local Naming 和 Easy Connect Naming

点[Next]

● Naming Methods Configuration Done:

点[Next]

● Welcome:

点[Finish]

1.检查一下:

rac1上

$ps -ef | grep lsnr | grep -v 'grep' | grep -v 'ocfs' | awk '{print $9}'

rac2上

$ps -ef | grep lsnr | grep -v 'grep' | grep -v 'ocfs' | awk '{print $9}'

创建数据库:

-----------

0.运行dbca(rac1):

用oracle登录

$dbca

● Welcome:

选 Oracle Real Application Clusters database

点[Next]

● Step 1 of 17: Opetations:

选 Create a Database

点[Next]

● Step 2 of 17: Node Selection:

两个节点全选中

点[Next]

● Step 3 of 17: Database Templates:

选 Custom Database

点[Next]

● Step 4 of 17: Database Identification:

Global Database Name: orcl

SID Prefix: orcl

点[Next]

● Step 5 of 16: Management Options:

使用默认选项,即

选 Configure the Database with Enterprise Manager

选 Use Database Control for Database Management

点[Next]

● Step 6 of 16: Database Credentials:

选 Use the Same Password for All Accounts

输入密码

点[Next]

● Step 7 of 15: Storage Options:

选 ASM

点[Next]

● Step 8 of 15: Create ASM Instance:

输入刚才的密码

选 Create server parameter file (SPFILE)

/u02/oradata/orcl/dbs/spfile+ASM.ora

点[Next]

出来的窗口中,点[OK]

● Step 9 of 15: ASM Disk Groups:

点[Create New]

● Create Disk Group:

Disk Group Name: DATA

Redundancy: Normal

选 VOL1 及 VOL2

点[OK]

点[Create New]

● Create Disk Group:

Disk Group Name: FLASH_RECOVERY_AREA

Redundancy: External

选 VOL3 及 VOL4

点[OK]

点[Next]

● Step 10 of 15: Database File Locations:

选 Use Oracle-Managed Files

Database Area: +DATA

点[Next]

● Step 11 of 15: Recovery Configuration:

选 Specify Flash Recovery Area

Flash Recovery Area: +FLASH_RECOVERY_AREA

Flash Recovery Area Size: 2048 MB

点[Next]

● Step 11 of 15: Database Content:

用默认值

点[Next]

● Step 12 of 15 Database Services:

点[Add],名称为 RACTEST

orcl1: Preferred

orcl2: Preferred

TAF Policy: Basic

点[Next]

● Step 13 of 15: Initialization Parameters:

用默认值

点[Next]

● Step 14 of 15: Database Storage:

用默认值

点[Next]

● Step 15 of 15: Create Options:

用默认值

点[Finish]

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyddgw.html