关闭

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

724人阅读 评论(0) 收藏 举报
分类:

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

 

三。两个节点的配置工作

1.复制机器

注意:如果使用软件克隆共享存储也一块复制了,就有问题了,使用手工复制,完了再检查下,共享存储。

 

2.时间同步:
节点1:

[root@o10n1 ~]# vi /etc/ntp.conf

只写下面的内容

server 127.127.1.0

fudge 127.127.1.0 stratum 10

driftfile /var/lib/ntp/drift

broadcastdelay 0.008

~

[root@o10n1 ~]# service ntpd status

ntpd is stopped

[root@o10n1 ~]# chkconfig ntpd on

[root@o10n1 ~]# service ntpd start

Starting ntpd: [  OK  ]

 

节点2:
2.1.       修改NTP配置文件/etc/ntp.conf

只写下面的内容

server o10n1 prefer

 

2.2.       编辑/etc/sysconfig/ntpd文件

添加-x标识,防止时间向回调整,如下所示:

# Drop root to id 'ntp:ntp' by default.

OPTIONS="-x -u ntp:ntp -p/var/run/ntpd.pid"

3.      启动或重新NTP服务

# service ntpd start

# service ntpd restart

 

chkconfig ntpd on

 

 

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

[root@rac1 ~]# vi /etc/modprobe.conf

options hangcheck-timer hangcheck_tick=30hangcheck_margin=180

 

立即加载

modprobe -v hangcheck-timer

 

配置完后需要大概10分钟才能生效。

 

 

3 设置SSH

本地设置无密码

o10n1 ->mkdir ~/.ssh

o10n1 ->chmod 700 ~/.ssh

o10n1 ->ssh-keygen -t rsa

o10n1 ->ssh-keygen -t dsa

 

o10n2 ->mkdir ~/.ssh

o10n2 ->chmod 700 ~/.ssh

o10n2 ->ssh-keygen -t rsa

o10n2 ->ssh-keygen -t dsa

远程设置无密码

o10n1->cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys

o10n1->cat ~/.ssh/id_dsa.pub >>~/.ssh/authorized_keys

o10n1->ssh o10n2 cat ~/.ssh/id_rsa.pub>> ~/.ssh/authorized_keys

o10n1->ssh o10n2 cat ~/.ssh/id_dsa.pub>> ~/.ssh/authorized_keys  

o10n1->scp ~/.ssh/authorized_keyso10n2:~/.ssh/authorized_keys

 

进行测试

o10n1->ssh o10n1 date

o10n1->ssh o10n2 date

o10n1->ssh o10n1-priv date

o10n1->ssh o10n2-priv date

 

o10n2->ssh o10n1 date

o10n2->ssh o10n2 date

o10n2->ssh o10n1-priv date

o10n2->ssh o10n2-priv date

 

 

SSH-AGNET

o10n1->exec /usr/bin/ssh-agent $SHELL

o10n1->/usr/bin/ssh-add

 

o10n2->exec /usr/bin/ssh-agent $SHELL

o10n2->/usr/bin/ssh-add

 

四。安装集群

1. 安装

o10n1->./runInstaller -ignoreSysPrereqs&

RAC10G 不支持安装在linux5,而应该安装在linux4上,这个没有成功启动,修改了clusterware/install/oraparam.ini 里面添加了REDHAT-5,就可以直接运行./runInstaller

但是在条件检查阶段,还是会遇到操作检查通不过的提示,打勾忽略掉了。

 

可能会遇到一些问题:

 

问题1:http://blog.csdn.net/bamuta/article/details/17067715

vi vipca

vi srctl

unset LD_ASSUME_KERNEL

 

问题2:http://blog.csdn.net/bamuta/article/details/17067715

[root@o10n2 bin]# ./oifcfg iflist

eth0 192.168.150.0

eth1 172.168.146.0

[root@o10n2 bin]# ./oifcfg setif -globaleth0/192.168.150.0:public

[root@o10n2 bin]# ./oifcfg setif -globaleth1/172.168.146.0:cluster_interconnect

[root@o10n2 bin]# ./oifcfg iflist

eth0 192.168.150.0

eth1 172.168.146.0

[root@o10n2 bin]# ./oifcfg getif

eth0 192.168.150.0  global  public

eth1 172.168.146.0  global  cluster_interconnect

 

2.root.sh

1个节点执行完了,才能执行下1个节点,不能同时执行

3.vipca

CSS is active on all nodes.

Waiting for the Oracle CRSD and EVMD tostart

Oracle CRS stack installed and runningunder init(1M)

Running vipca(silent) for configuringnodeapps

The given interface(s), "eth0" isnot public. Public interfaces should be used to configure virtual IPs.

 

第2个节点root时出现以上信息,就可以在第2个节点上运行图形化vipca绑定vip IP到public网络了,在出来的图形界面,只先public网络,IP界面需要手填(但是填1个,别的会自动补齐)

 

[root@o10n2 bin]# ./crs_stat -t

Name           Type           Target    State    Host       

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

ora.o10n1.gsd  application   ONLINE    ONLINE    o10n1      

ora.o10n1.ons  application   ONLINE    ONLINE   o10n1      

ora.o10n1.vip  application   ONLINE    ONLINE    o10n1      

ora.o10n2.gsd  application   ONLINE    ONLINE    o10n2      

ora.o10n2.ons  application   ONLINE    ONLINE    o10n2      

ora.o10n2.vip  application   ONLINE    ONLINE    o10n2 

 

现在可以点下集群安装root界面的"OK"了

 

4.安装完成

 

[root@o10n2 bin]# ./crsctl query crssoftwareversion

CRS software version on node [o10n2] is[10.2.0.1.0]

 

五。安装database软件

 

1.安装

o10n1->./runInstaller -ignoreSysPrereqs

有以下内容忽略了:

Checking operating system requirements ...

Expected result: One ofredhat-3,redhat-4,SuSE-9

Actual Result: redhat-Red Hat EnterpriseLinux Server release 5.6 (Tikanga)

Check complete. The overall result of thischeck is: Failed <<<<

Problem: Oracle Database 10g is notcertified on the current operating system.

Recommendation: Make sure you areinstalling the software on the correct platform.

=======================================================================

 

Checking operating system packagerequirements ...

Check complete. The overall result of thischeck is: Not executed <<<<

OUI-18001: The operating system 'LinuxVersion redhat-Red Hat Enterprise Linux Server release 5.6 (Tikanga)' is notsupported.

Recommendation: Install the required packagesbefore continuing with the installation.

=======================================================================

 

Checking kernel parameters

Check complete. The overall result of thischeck is: Not executed <<<<

OUI-18001: The operating system 'LinuxVersion redhat-Red Hat Enterprise Linux Server release 5.6 (Tikanga)' is notsupported.

Recommendation: Perform operating systemspecific instructions to update the kernel parameters.

=======================================================================

 

Checking Recommended glibc version

Check complete. The overall result of thischeck is: Not executed <<<<

OUI-18001: The operating system 'LinuxVersion redhat-Red Hat Enterprise Linux Server release 5.6 (Tikanga)' is notsupported.

Recommendation: You may actually haveinstalled packages which have obsoleted these, in which case you cansuccessfully continue with the install. If you have not, it is recommended thatyou do not continue. Refer to the readme to find out how to get the missingpackages.

=======================================================================

 

2.配置监听 netca

 

3.安装ASM

使用dbca

由于目前没有共享集群文件系统,所以参考文件用pfile,分别存在各个节点,以后再做修改。

4.使用dbca安装数据库

 

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:424390次
    • 积分:6251
    • 等级:
    • 排名:第3930名
    • 原创:230篇
    • 转载:9篇
    • 译文:0篇
    • 评论:70条