admin 管理员组

文章数量: 887021


2023年12月23日发(作者:winshell下载)

Oracle 11gR2 rac for linux简明安装手册

04-11 by J

Oracle 11gR2相对之前的版本(包括11gR1),clusterware有一个重要的变革,即11gR2将clusterware按照"网格"的理念放大到一个新的产品,称为Grid Infrastructure。Grid Infrastructure除了具有之前版本中clusterware的功能外,还对clusterware进行了扩展。

Grid Infrastructure OUI安装时不再支持将集群文件安装到块设备和raw映射设备。

Oracle 11gR2 rac相对之前版本对服务器硬件要求更高,这对真实的生产环境当然没有影响。但是对我们使用虚拟机安装的实验环境会造成空前的压力..

在官方安装文档中,对运行Grid Infrastructure的服务器要求至少1.5G内存,如果部署Grid

Infrastructure后还要在这台服务器部署Oracle RAC,则需要至少2.5G内存。

以下实验环境为:

宿主主机:

Intel E8500/win7 x64/4x2G/500G

虚拟机环境:

VMware-server-2.0.2-203138 for win x64,两个虚拟机各3g内存,实际上如果内存紧张的话,两个虚拟机内存可以不一样多,第二个节点可以稍微少分一些。操作系统使用Enterprise-R5-U4-Server-i386,使用PAE内核

数据库软件:

Grid Infrastructure for linux(11.2.0.1.0)

Oracle Database 11g for linux(11.2.0.1.0)

Oracle De-install Utility for linux(11.2.0.1.0)

工具软件:

VMware-vix-1.6.2-203138

vmware-vmrc-win32-x86

Xmanager-v3.0Build0128

Secure CRT

PLSQL Developer

参考官方文档:

e10812,e10840,e10500,e10717,e10718

部署

一,准备工作

1,创建vmware共享磁盘

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

vmware-vdiskmanager -c -s 2Gb -a lsilogic -t 0 "d:"

2,创建2个虚拟机,并修改配置文件

t = "TRUE"

lDev = "lsilogic"

Bus = "virtual"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "d:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "d:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

scsi1:t = "TRUE"

scsi1: = "independent-persistent"

scsi1:me = "D:"

scsi1:Type = "disk"

g = "FALSE"

cheMaxSize = "0"

cheMaxReadAheadSize = "0"

cheMinReadAheadSize = "0"

chePageSize = "4096"

yncedWrites = "0"

3,安装虚拟机操作系统并配置环境

[root@n01 ~]# chkconfig --list|grep on

anacron 0:off 1:off 2:off 3:off 4:off 5:off 6:off

apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

avahi-daemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off

avahi-dnsconfd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

conman 0:off 1:off 2:off 3:off 4:off 5:off 6:off

cpuspeed 0:off 1:on 2:off 3:off 4:off 5:off 6:off

crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off

haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off

lvm2-monitor 0:off 1:on 2:on 3:on 4:on 5:on 6:off

mdmonitor 0:off 1:off 2:off 3:off 4:off 5:off 6:off

netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off

network 0:off 1:off 2:on 3:on 4:on 5:on 6:off

nscd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

oracleasm 0:off 1:off 2:on 3:on 4:on 5:on 6:off

rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off

restorecond 0:off 1:off 2:off 3:off 4:off 5:off 6:off

smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off

sysstat 0:off 1:off 2:on 3:on 4:off 5:on 6:off

wdaemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off

xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off

二,Grid Infrastructure

1,新特性

(1) Automatic Storage Management and Oracle Clusterware Installation

11gR2中,asm和clusterware软件是安装到一个home目录

(2) Automatic Storage Management and Oracle Clusterware Files

11gR2中,ocr和vote文件除了部署到共享文件系统或者nfs之外,还可以部署到asm的磁盘组中。原则上不支持再部署到块设备或者raw设备,但是如果是升级到11gR2还是可以用的。

(3) Automatic Storage Management Cluster File System (ACFS)

11gR2中,asm可以提供集群文件系统给服务器其他应用使用,acfs一样拥有asm在存储上的优点

(4) ASM Job Role Separation Option with SYSASM

11gR2中,asm管理被从sysdba角色中分离到sysasm

(5) Cluster Time Synchronization Service

11gR2中,新增的ctss可以保证在集群中没有配置ntp的情况下,实现时间同步。

(6) Enterprise Manager Database Control Provisioning

新的em在rac配置完成后可以用来对rac进行管理,增加或者改变节点。

(7) Fixup Scripts and Grid Infrastructure Checks

Grid Infrastructure安装过程中提供更多的环境配置帮助。

(8) SCAN for Simplified Client Access

single client access name (SCAN),不同于之前版本的节点vip概念,scan ip绑定为集群中的某项服务,而不是具体服务器。scan可以指定1-3个ip。

scan可以配置为与dns或者gns协同合作。scan使集群中的节点变化更加透明。

(9) SRVCTL Command Enhancements for Patching

增强的srvctl

(10) Typical Installation Option

安装过程中的典型安装选项。

(11) Voting Disk Backup Procedure Change

之前版本中需要使用dd来备份vote盘,新版本中在磁盘配置发生变化后系统会自动进行备份,不在需要人工备份。

2,配置环境

[root@n01 ~]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost

192.168.175.100 omain n01

192.168.175.101 omain vip-n01

192.168.1.100 omain int-n01

192.168.175.187 n-cluster-scan

192.168.175.200 omain n02

192.168.175.201 omain vip-n02

192.168.1.200 omain int-n02

[root@n01 ~]# cat /etc/

-max-nr = 1048576

-max = 6815744

= 4096

= 250 32000 100 128

_local_port_range = 9000 65500

_default = 262144

_max = 4194304

_default = 262144

_max = 1048576

[root@n01 ~]# cat /etc/security/

grid soft nproc 2047

grid hard nproc 16384

grid soft nofile 1024

grid hard nofile 65536

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

/usr/sbin/useradd -u 1100 -g oinstall -G dba grid

/usr/sbin/useradd -u 1100 -g oinstall -G dba oracle

# mkdir -p /u01/app/grid

# chown -R grid:oinstall /u01/app/grid

# chmod -R 775 /u01/app/grid

# mkdir -p /u01/app/oracle

# chown -R oracle:oinstall /u01/app/oracle

Asianux Server 3, Enterprise Linux 5, and Red Hat Enterprise Linux 5

The following packages (or later versions) must be installed:

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

elfutils-libelf-0.125

elfutils-libelf-devel-0.125

elfutils-libelf-devel-static-0.125

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-24

glibc-common-2.5

glibc-devel-2.5

glibc-headers-2.5

kernel-headers-2.6.18

ksh-20060214

libaio-0.3.106

libaio-devel-0.3.106

libgcc-4.1.2

libgomp-4.1.2

libstdc++-4.1.2

libstdc++-devel-4.1.2

make-3.81

sysstat-7.0.2

unixODBC-2.2.11

unixODBC-devel-2.2.11

3,配置ntp或ctss

禁用ntp服务器即可

4,配置ssh

11gR2在安装过程中可以自动配置

5,配置asm

[root@n01 asm]# rpm -qa|grep oracleasm

5

5

5

[root@n01 asm]# oracleasm status

Checking if ASM is loaded: yes

Checking if /dev/oracleasm is mounted: yes

[root@n01 asm]# oracleasm listdisks

CRS

DATA1

DATA2

DATA3

DATA4

DATA5

DATA6

DATA7

DATA8

6,安装grid

grid用户

runInstaller

三,Oracle Database 11g

建库前需要另建一个asm磁盘组存放数据文件

使用asmca,或者sqlplus均可。

[root@n01 asm]# crs_stat -t

Name Type Target State Host

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

ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01

OFFLINE OFFLINE

application ONLINE ONLINE n01

application ONLINE ONLINE n01

application OFFLINE OFFLINE

application ONLINE ONLINE n01

ONLINE ONLINE n01

application ONLINE ONLINE n02

application ONLINE ONLINE n02

application OFFLINE OFFLINE

application ONLINE ONLINE n02

ONLINE ONLINE n02

ONLINE ONLINE n01

4j ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01

ONLINE ONLINE n01


本文标签: 安装 配置 集群 版本 服务器