1、export ORA_CRS_HOME=$ORACLE_BASE/crsexport ORACLE_SID=rac# -#为1或2export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/binsource .bash_profile -重新加载环境变量su -chown oracle.oinstall /u01 -R配置网络:vi /etc/hosts127.0.0.1 localhost.localdomain localhost:1 localhost6.localdomain6 localhost6# Public Network - (eth0
2、)192.168.1.11 rac1192.168.1.12 rac2# Public Virtual IP (eth1)192.168.1.13 rac1-vip192.168.1.14 rac2-vip# Private Interconnect10.10.10.11 rac1-priv10.10.10.12 rac2-priv-上面这个配置要求跟/etc/sysconfig/network中hostname也不要使用域名,否则集群可行性检测验证不通过。配置hangcheck-timer:用于监视 Linux 内核是否挂起vi /etc/modprobe.confoptions hangc
3、heck-timer hangcheck_tick=30 hangcheck_margin=180自动加载hangcheck-timervi /etc/rc.localmodprobe hangcheck-timer# modprobe hangcheck-timer检查hangcheck-timer模块是否已经加载:lsmod | grep hangcheck_timer配置信任关系:rac1:ssh-keygen -t rsassh-keygen -t dsacd .sshcat *.pub authorized_keysrac2:scp authorized_keyscat keys_d
4、bs 在每个节点上测试信任关系:ssh rac1ssh rac2ssh rac1-privssh rac2-priv准备公用卷:iscsirpm -ivh compat-db-4.2.52-5.1.i386.rpmrpm -ivh libXp-1.0.0-8.1.el5.i386.rpmrpm -ivh openmotif22-2.2.3-18.i386.rpmrac1 : (iscsi server)划分20G分区作为iscsi共享磁盘:分区:/dev/sda5 5889 7105 9775521 83 Linuxiscsi 服务端:ClusterStorage目录下rpm -ivh per
5、l-Config-General-2.40-1.el5.noarch.rpmrpm -ivh scsi-target-utils-0.0-5.20080917snap.el5.x86_64.rpmServer目录下rpm -ivh iscsi-initiator-utils-6.2.0.871-0.16.el5.i386.rpmvi /etc/tgt/targets.conf- backing-store /dev/sda4 initiator-address 10.10.10.0/24/targetvi /etc/udev/scripts/iscsidev.sh#!/bin/bashBUS=
6、$1HOST=$BUS%:* -e /sys/class/iscsi_host | exit 1file=/sys/class/iscsi_host/host$HOST/device/session*/iscsi_session*/targetnametarget_name=$(cat $file)if -z $target_name ; then exit 1fiecho $target_name#*:chmod +x /etc/udev/scripts/iscsidev.shchkconfig iscsi onchkconfig iscsid onchkconfig tgtd onserv
7、ice iscsi startservice iscsid startservice tgtd starttgtadm -lld iscsi -op bind -mode target -tid 1 -I ALLiscsiadm -m discovery -t sendtargets -p 10.10.10.11fdisk -l重新扫描服务器iscsiadm -m session -uiscsi客户端配置 client : 10.10.10.11vi /etc/udev/rules.d/55-openiscsi.rules-KERNEL=sd*,BUS=scsi,PROGRAM=/etc/ud
8、ev/scripts/iscsidev.sh %b,SYMLINK+=iscsi/%ciscsiadm -m discovery -t sendtargets -p 10.10.10.11 -l对iscsi共享盘分区: fdisk /dev/sdb 分区大小:sdb1 200M 放OCR,sdb2 200M 放表决盘,sdb3 6G 存数据文件,sdb4 4G 存闪回区,sdb3和sd4可以合并为一个分区,这样数据文件和闪回区都存到了同一个分区中。将iscsi共享分区变为裸设备:vi /etc/udev/rules.d/60-raw.rulesACTION=add, KERNEL=sdb1,
9、RUN+=/bin/raw /dev/raw/raw1 %Nsdb2/bin/raw /dev/raw/raw2 %Nsdb3/bin/raw /dev/raw/raw3 %Nsdb4/bin/raw /dev/raw/raw4 %Nraw1, MODE=0660, GROUP=oinstall, OWNER=oracleraw2raw3raw4分别在rac1 & rac2启动udev:start_udev rac2确认裸设备被加载:rootstu50 # ll /dev/raw总计 0crw-rw- 1 root oinstall 162, 1 01-11 12:44 raw1crw-rw- 1 oracle oinstall 162, 2 01-11 12:44 raw2crw-rw- 1 oracle oinst
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1