ITPub博客

首页 > Linux操作系统 > Linux操作系统 > vmware workstation7 + win7 安装rac

vmware workstation7 + win7 安装rac

原创 Linux操作系统 作者:sxitsxit 时间:2012-04-20 13:55:37 0 删除 编辑
宿主机:win7sp1
vmware station 7.15
redhat linux4 update7 + oracle10.2.0.1  rac安装
 
注意:在安装linux的时候,如果空间充足,尽量全部安装软件包,否则在接下来安装rac的过程中会出现莫名的错误。
安装完 redhat enterprise linux 4 update7以后 ,对主机做如下配置。

1:因为是用vmware-workstation 安装的,因此要在.vmx文件中添加如下文件
   disk.locking = "FALSE"
   diskLib.dataCacheMaxSize = "0"
   scsi1.sharedBus = "virrual"
2:修改/etc/hosts文件, 修改后的结果如下
127.0.0.1  localhost  // 注意:此处必须为这种写法,否则监听ip地址变为127.0.0.1
172.16.10.96 rac1
172.16.10.97 rac2
172.16.10.94 rac1-vip
172.16.10.95 rac2-vip
10.10.17.221 rac1-priv
10.10.17.222 rac2-priv

3:创建oracle用户、oinstall和dba组
oracle用户的 .bash_profile 文件最终如下
#set environment

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
export ORACLE_CRS_HOME=$ORACLE_BASE/10.2.0/crs_1
export ORACLE_SID=rac1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_CRS_HOME/bin:$$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022

4:配置内核参数
vi /etc/sysctl.conf
添加如下内容
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
提示,上述参数中通常只有一项需要我们更改,即kernel.shmmax,该参数推荐设定为物理内存的一半,
由于安装crs 的时候要求内存至少512M,因此我们此处也按照512*1024*1024 来设置。

5:设置oracle用户的shell限制
vi /etc/security/limits.conf
增加如下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

6:修改安全限制
vi /etc/pam.d/login
添加如下内容
session required /lib/security/pam_limits.so

7:配置Hangcheck 计时器
增加如下内容
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180

8:磁盘分区,最终分区结果如下
[root@rac1 ~]# fdisk -l
Disk /dev/hda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         637     5116671   83  Linux
/dev/hda2             638        1435     6409935   83  Linux
/dev/hda3            1436        1566     1052257+  82  Linux swap
Disk /dev/hdd: 8589 MB, 8589934592 bytes
15 heads, 63 sectors/track, 17753 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1               1         414      195583+  83  Linux
/dev/hdd2             415         828      195615   83  Linux
/dev/hdd3             829        9096     3906630   83  Linux
/dev/hdd4            9097       16537     3515872+  83  Linux
[root@rac1 ~]#

9:安装必要的asmlib包

[root@rac1 ~]# uname -a
Linux rac1 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:39:47 EDT 2008 i686 i686 i386 GNU/Linux
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]# uname -r
2.6.9-78.ELsmp
[root@rac1 ~]# more /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]#
[root@rac1 ~]# rpm -qa |grep oracleasm
oracleasm-2.6.9-78.ELsmp-2.0.5-1.el4
oracleasmlib-2.0.4-1.el4
oracleasm-support-2.1.7-1.el4
[root@rac1 ~]#
 

10:修改裸设备服务的配置文件: /etc/sysconfig/rawdevices  添加下面2行。
/dev/raw/raw1  /dev/hdd1
/dev/raw/raw2  /dev/hdd2
 
11:修改裸设备权限
[root@rac1 ~]# vi /etc/udev/permissions.d/50-udev.permissions
该行修改后的结果为:
# raw devices
raw*:oracle:dba:0660
raw/*:oracle:dba:0660

配置第二个节点:

1:修改vi /etc/sysconfig/network
将hostname改为 rac2
2:修改网卡的mac地址,并修改ip
3:在rac2节点,将oracle用户的oracle_sid 改为 racdb2
 
设置ssh 等效性
(具体参考三思的笔记)
 

配置asm

首先在rac1 执行:
[root@rac1 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
 
 
然后切换至rac2 执行
[root@rac2 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]

再切换回rac1 执行

[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/hdd3
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/hdd4
Marking disk "/dev/hdd4" as an ASM disk: [ OK ]
[root@rac1 linux-patch]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
查看一下当前的磁盘组:
Scanning system for ASM disks: [ OK ]
[root@rac1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
rac2 上也查看一下当前磁盘组:
[root@rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@rac2 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
 
接下来就是安装clusterware,如果没大的问题,就安装成功。
在最后阶段,会提示一个错误,只要在rac2节点执行 $ORACLE_CRS_HOME/bin/vipca  即可
 
 
 
安装过程中碰到的一些问题:
1:软件包卸载
rpm -ivh ****.rpm --force --nodeps就可以了,nodeps的意思是忽视依赖关系。

如:
rpm -ivh oracleasm-2.6.9-78.ELhugemem-2.0.5-1.el4.i686.rpm --force --nodeps
rpm -ivh oracleasm-2.6.9-78.EL-debuginfo-2.0.5-1.el4.i686.rpm --force --nodeps
rpm -ivh oracleasm-2.6.9-78.EL-2.0.5-1.el4.i686.rpm --force --nodeps
rpm -ivh oracleasm-support-2.1.7-1.el4.i386.rpm --force --nodeps

2:关闭防火墙和sendmail ,否则客户端连接不上,启动很慢。
查看相关的状态
chkconfig --list iptables
chkconfig --list sendmail
关闭相关服务
chkconfig --level 23456 iptables off
chkconfig --level 23456 sendmail off
 
 
 
本人安装的rac系统在运行一个周以后,再次打开rac2主机时,就找不到 rac2的 eth1 网卡了 ,导致网卡丢失,问题还没解决。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24862808/viewspace-721801/,如需转载,请注明出处,否则将追究法律责任。

上一篇: redo log 切换
请登录后发表评论 登录
全部评论

注册时间:2011-04-14

  • 博文量
    98
  • 访问量
    298741