注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

linux++的博客

LINUX+ORACLE+NBA+GAME=NET

 
 
 

日志

 
 

基于RedHat linux as 4的gfs文件的oracle 10g RAC配置步骤和方法  

2009-01-02 14:50:05|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

本人不敢保证这个大家都可成功,只是自己做个笔记。

1. install on all nodes
cman cman-kernel dlm dlm-kernel fence rgmanager piranha iddev
iddev-devel magma-devel ccs-devel dlm-devel magma-plugins
GFS GFS-kernel gnbd gnbd-kernel GFS-kernelheaders lvm2-cluster
gulm gulm-devel

2. on all nodes
cd /etc/rc.d

find . -name "*ccsd*" -type l|xargs rm -fr
find . -name "*cman*" -type l|xargs rm -fr
find . -name "*fence*" -type l|xargs rm -fr
find . -name "*clvm*" -type l|xargs rm -fr
find . -name "*gfs*" -type l|xargs rm -fr
find . -name "*gulm*" -type l|xargs rm -fr
find . -name "*rgmanager*" -type l|xargs rm -fr


3. on all nodes
配置/etc/hosts确定各个机器之间的关系
至少一个gnbd,两个nodes
172.16.36.1 gnbdlocal
172.16.36.8 rac1 #rac node 1
172.16.36.9 rac2 #rac node 2
172.16.76.8 rac1-priv #rac node 1
172.16.76.9 rac2-priv #rac node 2
172.16.36.88 rac1-vip #rac node 1
172.16.36.99 rac2-vip #rac node 2

4.确保互通
on all nodes:
ssh-keygen -t dsa -b 1024
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

then:
add all the id_dsa.pub to one file :autorized_keys
copy the file autorized_keys to all nodes : ~/.ssh/

on all nodes:
于是进行root oracle login test
每个节点进行:
都进行登录测试

确保都成功之后再次继续
ok


5.on all nodes
配置 /etc/cluster/cluster.conf


6. on all nodes:
配置防火墙
service iptables stop

7.设置 on gnbd server:
use fdisk
create partitions:
ocr 200M
vote 200M
insora 5G
oradata 10g

8.启动cluster以后检查状态:

a.on all nodes
service ccsd start

b.on all nodes
service cman start

c. on gnbdserver
gnbd_serv
gnbd_export -d /dev/hda3 -e ocr -c
gnbd_export -d /dev/hda4 -e vote -c
gnbd_export -d /dev/hda5 -e oracle-c
gnbd_export -d /dev/hda6 -e oradata -c

d. on all nodes except gnbdserver
modprobe dlm
modprobe gnbd
service fenced restart
gnbd_import -i gnbdlocal

e.create filesystem on one node of rac
gfs_mkfs -j2 -p lock_dlm -t mycl:oracle /dev/gnbd/oracle
gfs_mkfs -j2 -p lock_dlm -t mycl:oradata /dev/gnbd/oradata

f.on all nodes except gnbdserver
mount -t gfs /dev/gnbd/oracle /oracle
mount -t gfs /dev/gnbd/oradata /oradata

cat /proc/cluster/nodes
gnbd_export和gnbd_import
创建自动启动GFS的脚本

9.
创建gfs filesystem
创建rawdevices

10.确保安装oracle必须的东西都安装完毕,内核调整完毕,进行oracle的安装,首先进行clusterware安装,而后进行oracle安装,可以先只在一个节点进行。


11. all nodes except gnbdlocal
/etc/sysctl.conf
kernel.panic_on_oops = 1
kernel.shmall=2097152
kernel.shmmax=2147483648
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=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144


sysctl -p

12. all nodes execpt gnbdlocal
/etc/security/limits.conf
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

13.execute on all nodes except gnbdlocal
echo "options hangchecker-timer hangcheck_tick=30 hangcheck_margin=180" >>
/etc/modprobe.conf


14.all nodes except gnbdlocal
/etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/gnbd/ocr
/dev/raw/raw2 /dev/gnbd/vote

service rawdevices restart

15.all nodes excpet gnbdlocal

创建oracle组dba,oinstall,oracle用户,注意两个节点的组id,用户id一定要相同

groupadd - g 500 dba

groupadd -g 501 oinstall

adduser -u 502 oracle -g dba -G oinstall

16.配置oracle用户下的ssh 互通

17.设备root,oracle用户下的环境变量

export PATH
unset USERNAME
export CRS_HOME=/oracle/product/10.2.0.1/crs
export ORACLE_BASE=/oracle
#export ORACLE_HOME=/oracle/product/10.2.0.1/db_1
export PATH=$PATH:$ORACLE_HOME/bin:$CRS_HOME/bin
export LD_LIBRAY_PATH=$ORACLE_HOME/lib

以上步骤是难点,配置成功后,基本上就成功了。以下就是简单安装crs,oracle 软件,及建库.

18.安装Oracle 10g CRS集群软件

19.配置VIP

19、安装oracle 10.2.0.1软件

20.dbca建库.

21.TAF管理

listener.ora

LISTENER_RAC2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vip-rac2)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.2)(PORT = 1521)(IP = FIRST)) )
)

LISTENER_RAC1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vip-rac1)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.3)(PORT = 1521)(IP = FIRST)) )
)

SID_LIST_LISTENER_RAC2 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/10.2.0.1/db_1)
(PROGRAM = extproc)
)
)

SID_LIST_LISTENER_RAC1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/10.2.0.1/db_1)
(PROGRAM = extproc)
)
)


tnsnames.ora格式如下

ORATAF =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vip-rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = vip-rac2)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ora)
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)

ORA2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vip-rac2)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora)
)
)

ORA1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = vip-rac1)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora)
)
)

这样基于RedHat linux as 4的gfs文件的oracle 10g RAC就配置完成了。

  评论这张
 
阅读(236)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017