当前位置:Gxlcms > mysql > VMware下Oracle10gRAC在OEL5.6上安装--简略版

VMware下Oracle10gRAC在OEL5.6上安装--简略版

时间:2021-07-01 10:21:17 帮助过:87人阅读

VMware下Oracle 10g RAC在OEL5.6上安装--简略版

VMware workstation下安装

Vmware version: 9

OS:Oracle LINUX 5.6_64位

DATABASE: 10201_64位

一。准备工作。 1.host

more /etc/hosts

192.168.150.71 o10n1

192.168.150.72 o10n2

172.168.146.71 o10n1-priv

172.168.146.72 o10n2-priv

192.168.150.81 o10n1-vip

192.168.150.82 o10n2-vip

2.安装相关的包

yuminstall oracle*

3 打开远程rsh的rlogin

[root@rac1 ~]# chkconfig rsh on

[root@rac1 ~]# chkconfig rlogin on

[root@rac1 ~]# service xinetd reload

Reloading configuration: [ OK ]

4. 设置oracle环境变量

export PS1="`/bin/hostname-s`->"

export EDITOR=vi

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_BASH=/oracle

export ORA_CRS_HOME=/oracle/product/10.2.0/crs

exportORACLE_HOME=/oracle/product/10.2.0/db_1

export ORACLE_SID=t10g

exportPATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/usr/sbin:$PATH

exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

alias sqlplus="rlwrap sqlplus"

alias rman="rlwrap rman"

stty erase ^H

umask 022

if [ $USER = "oracle" ]; then

if[ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

5.可以装个rlwrap(可选)

不装的话,去掉环境变量中的

alias sqlplus="rlwrap sqlplus"

alias rman="rlwrap rman"

6.配置hangcheck-timer(2节点都配)

参见时间同步部分

二。存储设置

1.vmware虚拟机共享磁盘设置

disk.locking="FALSE"

diskLib.dataCacheMaxSize="0"

diskLib.dataCacheMaxReadAheadSize="0"

diskLib.DataCacheMinReadAheadSize="0"

diskLib.dataCachePageSize="4096"

diskLib.maxUnsyncedWrites="0"

scsi1.sharedBus="virtual"

scsi1:0.deviceType="disk"

scsi1:1.deviceType="disk"

scsi1:2.deviceType="disk"

scsi1:3.deviceType="disk"

scsi1:4.deviceType="disk"

scsi1:5.deviceType="disk"

scsi1:0.redo = ""

scsi1:1.redo = ""

scsi1:2.redo = ""

scsi1:3.redo = ""

scsi1:4.redo = ""

scsi1:5.redo = ""

2.磁盘分区

[root@o10n1 rules.d]# fdisk /dev/sdb

[root@o10n1 rules.d]# fdisk /dev/sdc

[root@o10n1 rules.d]# fdisk /dev/sdd

[root@o10n1 rules.d]# fdisk /dev/sde

[root@o10n1 rules.d]# fdisk /dev/sdf

[root@o10n1 rules.d]# fdisk /dev/sdg

3.裸设备:

有2种方法可选,1个是修改rc.local,另1个是修改udev下的60-raw.rules

方法1:

# vi /etc/rc.local

raw /dev/raw/raw1 /dev/sdb1

raw /dev/raw/raw2 /dev/sdc1

chown oracle:oinstall /dev/raw/raw1

chown oracle:oinstall /dev/raw/raw2

chmod 640 /dev/raw/raw1

chmod 640 /dev/raw/raw2

方法2:(推荐的方法)

# vi 60-raw.rules

ACTION=="add",KERNEL=="/dev/sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"

ACTION=="add",ENV{MAJOR}=="8", ENV{MINOR}=="17", RUN+="/bin/raw/dev/raw/raw1 %M %m"

ACTION=="add",KERNEL=="/dev/sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"

ACTION=="add",ENV{MAJOR}=="8", ENV{MINOR}=="33", RUN+="/bin/raw/dev/raw/raw2 %M %m"

ACTION=="add",KERNEL=="raw[1-2]",OWNER="oracle",GROUP="oinstall",MODE="640"

~

其中minor的值在机器中找devices.txt sdb1找sdb 16,然后再加1(是不是这样来定这个值不是很确定,但貌似随便填也没什么问题)

[root@o10n2 rules.d]# raw -qa

/dev/raw/raw1: bound to major 8, minor 17

/dev/raw/raw2: bound to major 8, minor 33

4. ASM磁盘配置

这个也有2种方法,1个是采用udev,另1个是采用asmlib

本次采用udev,配置使用脚本实现,以下脚本在root执行即可。

(脚本基地MAClean的linux6的UDEV自己改写,,现在适用于linux5)

for i in d e f g ;

do

echo "KERNEL==\"sd*\",BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s/block/\$parent\", RESULT==\"`/sbin/scsi_id -g -u -s/block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"oracle\",GROUP=\"oinstall\", MODE=\"0660\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rules

done

更多详情见请继续阅读下一页的精彩内容:

推荐阅读:

RedHat Linux 5 & CentOS 5下Oracle 10g安装详解

CentOS 6.3(x32)下安装Oracle 10g R2

Linux-6-64下安装Oracle 12C笔记

linux

人气教程排行