7、编辑/etc/sysctl.conf,增加下面2行以设置系统共享内存大小和文件句柄
kernel.shmmax=2147483648
kernel.sem=250 32000 100 128
本文涉及到的linux操作系统的内核参数默认设置大多符合oracle安装所需,不需要做更大的改动
8、配置 hangcheck-timer 内核模块
在/etc/modules.conf中增加下面一行
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
为了确保系统每次重新启动的时候都能自动加载hangcheck-timer 模块,需要在/etc/rc.local文件中增加下面一行
echo “modprobe hangcheck-timer” >> /etc/rc.local
重启系统并检查hangcheck-timer模块是否已经加载
[root@dbrac root]# lsmod | grep hangcheck-timer
hangcheck-timer 2616 0 (unused)
9、配置 RAC 节点以进行远程访问
在 RAC 节点上运行 Oracle Universal Installer 时,它将使用 rsh 、rcp或scp命令将 Oracle 软件复制到 RAC 集群中的所有其他节点。虽然是单机模拟,但仍然要配置,无法跳过,从oracle 10g开始已经支持ssh协议,本文将首先尝试使用它
使用oracle用户创建ssh公共密匙:
[oracle@dbrac oracle]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
2d:09:9a:c0:40:c7:99:46:ea:43:0d:22:4b:d0:a0:26
[email=oracle@dbra]
oracle@dbra[/email]
[email=oracle@dbrac]
c[/email]
复制公匙到其他节点(这里是单机)
[oracle@dbrac oracle]$ cp -v .ssh/id_dsa.pub .ssh/authorized_keys
测试密匙是否生效
[oracle@dbrac oracle]$ ssh dbrac
The authenticity of host ‘dbrac (192.168.22.44)‘ can‘t be established.
RSA key fingerprint is e7:ff:ce:5e:92:ac:c4:96:a8:ca:3e:20:2e:5c:75:ae.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘dbrac,192.168.22.44‘ (RSA) to the list of known hosts.
[oracle@dbrac oracle]$
无需密码即可登陆表示密匙已经生效
10、安装和配置 OCFS
OCFS是Oracle 集群文件系统 (OCFS),由 Oracle 开发,用于消除数据库管理员和系统管理员管理原始设备这一负担,它提供了与通常的文件系统相同的功能和用法。尽量不要在OCFS文件系统上使用linux二进制文件系统操作命令
在目前的版本1种支持以下文件类型:
· Oracle 数据库文件
· 联机重做日志文件
· 归档重做日志文件
· 控制文件
· 服务器参数文件 (SPFILE)
· Oracle 集群注册表 (OCR) 文件
· CRS 表决磁盘。
安装和配置
1) 上传ocfs-2.4.21-EL-1.0.14-1.i686.rpm,ocfs-support-1.0.10-1.i386.rpm,ocfs-tools-1.0.10-1.i386.rpm到/home/oracle/install/rac/ocfs目录
2) 执行rpm -ivh ocfs*.rpm 开始安装
[oracle@dbrac oracle]$ su -
Password:
[root@dbrac root]# cd /home/oracle/install/rac/ocfs
[root@dbrac ocfs]# rpm -ivh ocfs*.rpm
Preparing... ########################################### [100%]
1:ocfs-support ########################################### [ 33%]
2:ocfs-2.4.21-EL ########################################### [ 67%]
3:ocfs-tools ########################################### [100%]
3) 生成并配置/etc/ocfs.conf文件
root@dbrac ocfs]# ocfstool &
4) 使用 ocfstool GUI 工具执行以下步骤:
5) 选择 [Task] - [Generate Config]
在“OCFS Generate Config”对话框中,输入专用互连的接口和 DNS 名。
验证所有节点上的所有值正确之后,请退出应用程序
6) 检查/etc/ocfs.conf
[root@dbrac ocfs]# cat /etc/ocfs.conf
#
# ocfs config
# Ensure this file exists in /etc
#
node_name = dbrac
ip_address = 192.168.22.44
ip_port = 7000
comm_voting = 1
guid = B907DC7945D81C0A2C8C000D61EB0166
注意guid在集群中唯一对应一个节点,如果要更换网卡,请使用ocfs_uid_gen -c 命令重新创建
7) 重新启动系统并确认ocfs模块已经正确加载
[oracle@dbrac oracle]$ lsmod | grep ocfs
ocfs 299104 0 (unused)
8) 创建 OCFS 文件系统
[oracle@dbrac oracle]$ id
uid=500(oracle) gid=500(dba) groups=500(dba)
[oracle@dbrac oracle]$ su -
Password:
[root@dbrac root]# mkfs.ocfs -F -b 128 -L crs -m /u01 -u ‘500‘ -g ‘500‘ -p 0775 /dev/hda8
Cleared volume header sectors
Cleared node config sectors
Cleared publish sectors
Cleared vote sectors
Cleared bitmap sectors
Cleared data block
Wrote volume header
注意-u和-g 是oracle用户的id和dba组的id,一定要填写正确,-p是设置/u01目录的访问权限,如果要设置dba组用户有权管理集群注册文件的话,请设置0775
9) 载入 OCFS 文件系统
$ su -
# mount -t ocfs /dev/hda8 /u01
10) 将 OCFS分区配置为在启动时自动载入
11) 将以下条目添加到/etc/fstab 文件中
/dev/hda8 /u01 ocfs _netdev 0 0
12) 重新启动服务器并检查CRS分区已经正确安装
[root@dbrac root]# mount | grep ocfs
/dev/hda8 on /u01 type ocfs (rw)
如果没有被自动加载,请执行如下命令echo “mount -t ocfs /dev/hda8 /u01” >> /etc/rc.local,然后重新启动
也可用使用oracle官方为我们提供的打过补丁的linux内核来解决此问题
.
分页: [
1] [
2] [
3] [
4]
TAG:
oracle 10g RAC 集群