1 查找操作系统版本号$ uname -a
2 下载相应的安装包
3 FTP上传下面三个文件:
ocfs-tools-
ocfs-support-
ocfs-
4 安装ocfs
[root@rac1 ocfs_setup]# ls
ocfs-
ocfs-
ocfs-
[root@rac1 ocfs_setup]#
[root@rac1 ocfs_setup]# rpm -ivh ocfs-support-
Preparing... ########################################### [100%]
1:ocfs-support ########################################### [100%]
[root@rac1 ocfs_setup]#
[root@rac1 ocfs_setup]# rpm -ivh ocfs-tools-
Preparing... ########################################### [100%]
1:ocfs-tools ########################################### [100%]
[root@rac1 ocfs_setup]# rpm -ivh ocfs-
Preparing... ########################################### [100%]
1:ocfs-
Linking OCFS module into the module path [ OK ]
在图形化界面下,运行ocfs
To generate the /etc/ocfs.conf file, run the ocfstool tool.
su - rootocfstool - Select "Task" - Select "Generate Config" - Select the interconnect interface (private network interface), e.g. rac1prv - Confirm the values displayed and exitTo load the ocfs.o kernel module, run:
su - root
# /sbin/load_ocfs
/sbin/insmod ocfs node_name=rac1prv ip_address=92.168.1.1 ip_port=7000 cs=1812 guid=
Using /lib/modules/
#
su - root
ocfstool
- Select "Task" - Select "Format"
su - rootmkfs.ocfs -F -b 128 -L /var/opt/oracle/oradata/orcl -m /var/opt/oracle/oradata/orcl -u `id -u oracle` -g `id -g oracle` -p 0775
#
注意:
初次产生配置文件两节点都要做,此后的格式化只在一个节点上做,再后的挂载两节点都要做。
此处要选择共享存储,我这里是/dev/sdb,使用fdisk -l可以查看未分区的共享存储
格式化成功后,会在Free Space中显示出容量
之后,在ocfs图形界面中挂载 或者使用命令挂载mount -t ocfs /dev/sdb /oracle
[root@rac1 root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2
/dev/sda1
none
/dev/cdrom
/dev/sdb
再到2号节点上,挂载共享存储
[root@rac2 ocfs_setup]# mount -t ocfs /dev/sdb /oracle
[root@rac2 ocfs_setup]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2
/dev/sda1
none
/dev/cdrom
/dev/sdb
如果使用图形创建时,没有选择属主oracle,使用命令行重新创建
先id oracle看看oracle的用户号500 与组号501
[root@rac1 root]# mkfs.ocfs -F -b 128 -L /oracle -m /oracle -u 500 -g 501 -p 077
5 /dev/sdb
重建后,再依次在1号机和2号机上进行挂载.
su - root
# mount -t ocfs /dev/sda1 /var/opt/oracle/oradata/orcl
Now run the ls command on all RAC nodes to check the ownership:
# ls -ld /var/opt/oracle/oradata/orcl
8 Configuring the OCFS File Systems to Mount Automatically at Startup
Add lines to the /etc/fstab file similar to the following example:
/dev/sda1 /var/opt/oracle/oradata/orcl ocfs _netdev 0 0
To make sure the ocfs.o kernel module is loaded and the OCFS file systems are mounted during the boot process, run:
su - root
# chkconfig --list ocfs
ocfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off
If the flags are not set to "on" as marked in bold, run the following command:
su - root
# chkconfig ocfs on
You can also start the "ocfs" service manually by running:
su - root
# service ocfs start
When you run this command it will not only load the ocfs.o kernel module but it will also mount the OCFS filesystems as configured in /etc/fstab.
在两个节点上分别确定以下这些rpm包是否都存在。
make-3.79
binutils-2.11
openmotif-
setarch-1.3-1
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
compat-gcc-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
compat-db-
如果没有,则从AS3的安装介质上找到这些包并加以安装。
安装好上面这些模块以后,需要打补丁,补丁号为:3006854。
可以到oracle官方网站下载该补丁,发送到两个节点上以后,执行:
# unzip p3006854_9204_LINUX.zip
# chmod u+x rhel3_pre_install.sh
# sh rhel3_pre_install.sh
在在运行时提示找不到GCC ,找来1#安装盘,补充上开发工具.
在centos5上还要安装libXp-
生成OCM管理文件,放在裸设备或共享存储上
# su - oracle
$ dd if=/dev/zero of=/dev/raw/raw1 bs=1024 count=1024
此处没有进行上述操作,因为直接放在共享目录/oracle之下。
安装OCM
$ su - root
# mv /usr/bin/gcc /usr/bin/gcc323
# ln -s /usr/bin/gcc296 /usr/bin/gcc
# mv /usr/bin/g++ /usr/bin/g++323
# ln -s /usr/bin/g++296 /usr/bin/g++
检验一下gcc和g++的版本。
# gcc -v
# g++ -v
将下载下来的oracle安装介质(笔者下载的是ship_9204_linux_disk1.cpio.gz、ship_9204_linux_disk2.cpio.gz和ship_9204_linux_disk3.cpio.gz)拷贝到其中一个节点上。
磁盘空间不够,再添加一块共享磁盘来放置安装文件来用
C:win2kvmwareVMware Server>vmware-vdiskmanager.exe -c -q -a buslogic -s 6Gb -t
将第二块共享盘挂在scsi1:1 并修改虚拟机的vmx配置文件 添加
scsi1:1.mode = "persistent"
同样的方法格式化成ocfs磁盘.并修改fstab,使之自动挂载
# mkdir /oracle2
# mkfs.ocfs -F -b 128 -L /oracle2 -m /oracle2
-u `id -u oracle` -g `id -g oracle` -p 0775 /dev/sdc
在/etc/fstab中添加对oracl2的挂载
/dev/sdc /oracle2 ocfs _netdev 0 0
使用FTP(或其它方式)上传三张安装盘
ship_9204_linux_disk1.cpio.gz
ship_9204_linux_disk2.cpio.gz
ship_9204_linux_disk3.cpio.gz
上传完成之后,检查一下完整性,较慢,可选操作
$ cksum *.gz
gunzip
cpio -idmv <
安装Oracle Cluster Manager
设置xhost +
# xhost +
开始安装OCM
# su - oracle
$ /oracle/setup/Disk1/runInstall.sh
在界面上,选择安装oracle cluster manager。点击next,会要求你输入public node,这时你分两行输入linux1和linux2。点击next,会要求你输入private node,这时你分两行输入linux1-prv和linux2-prv。点击next,会要求输入Quorum文件,这时
在共享存储上创建quorum.ora文件
$ touch /oracle/quorum.ora
在输入处输入/oracle/quorum.ora
点击next开始安装cluster manager软件。这个软件很小,安装很快就会结束。
这一步完成后要到另外一个节点上去检查,是否oracm文件被复制过去了.另外在输入公共节点与私有节点名称时,要把本机的名称放在上面.另外一台主机的名称放在下面.否则不会RCP. -----WW
配置OCM
在两个节点上修改cmcfg.ora 目录
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-1013665/
,如需转载,请注明出处,否则将追究法律责任。