1、ORACLE 10gRAC for solaris10第一、配置共享硬盘分区因为是共享硬盘,故只在一台机器上操作即可。rootnode01 # formatSearching for disks.doneAVAILABLE DISK SELECTIONS: 0. c0t0d0 /pci1f,0/pci1,1/ide3/dad0,0 1. c0t1d0 /pci1f,0/pci1,1/ide3/dad1,0 2. c2t1d0 /pci1f,0/pci1/scsi1,1/sd1,0 3. c2t3d0 /pci1f,0/pci1/scsi1,1/sd3,0 4. c2t4d0 /pci1f,0/
2、pci1/scsi1,1/sd4,0Specify disk (enter its number): 4selecting c2t4d0disk formattedFORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective se
3、ctor label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name ! - execute
4、, then return quitformat partitionPARTITION MENU: 0 - change 0 partition 1 - change 1 partition 2 - change 2 partition 3 - change 3 partition 4 - change 4 partition 5 - change 5 partition 6 - change 6 partition 7 - change 7 partition select - select a predefined table modify - modify a predefined pa
5、rtition table name - name the current table print - display the current table label - write partition map and label to the disk ! - execute , then return quitpartition printCurrent partition table (unnamed):Total disk cylinders available: 3880 + 2 (reserved cylinders)Part Tag Flag Cylinders Size Blo
6、cks0 unassigned wm 0 0 (0/0/0) 01 unassigned wm 0 0 (0/0/0) 02 backup wu 0 - 3879 4.00GB (3880/0/0) 83808003 unassigned wu 0 0 (0/0/0) 04 unassigned wm 0 0 (0/0/0) 05 unassigned wu 0 0 (0/0/0) 06 unassigned wm 0 0 (0/0/0) 07 unassigned wm 0 0 (0/0/0) 0partition 4Part Tag Flag Cylinders Size Blocks4
7、unassigned wm 0 0 (0/0/0) 0Enter partition id tagunassigned:Enter partition permission flagswm:Enter new starting cyl0: 1Enter partition size0b, 0c, 1e, 0.00mb, 0.00gb: 3600cpartition 5Part Tag Flag Cylinders Size Blocks5 unassigned wu 0 0 (0/0/0) 0Enter partition id tagunassigned:Enter partition pe
8、rmission flagswu:Enter new starting cyl0: 3601Enter partition size0b, 0c, 3601e, 0.00mb, 0.00gb: 20cpartition 6Part Tag Flag Cylinders Size Blocks6 unassigned wm 0 0 (0/0/0) 0Enter partition id tagunassigned:Enter partition permission flagswm:Enter new starting cyl0: 3621Enter partition size0b, 0c,
9、3621e, 0.00mb, 0.00gb: 120cpartition printCurrent partition table (unnamed):Total disk cylinders available: 3880 + 2 (reserved cylinders)Part Tag Flag Cylinders Size Blocks0 unassigned wm 0 0 (0/0/0) 01 unassigned wm 0 0 (0/0/0) 02 backup wu 0 - 3879 4.00GB (3880/0/0) 83808003 unassigned wm 0 0 (0/0
10、/0) 04 unassigned wm 1 - 3600 3.71GB (3600/0/0) 77760005 unassigned wu 3601 - 3620 21.09MB (20/0/0) 432006 unassigned wm 3621 - 3740 126.56MB (120/0/0) 2592007 unassigned wm 0 0 (0/0/0) 0partition labelReady to label disk, continue? Yesrootdbsv# prtvtoc /dev/rdsk/c2t4d0s2 | fmthard -s - /dev/rdsk/c2
11、t3d0s2分区时一定要注意:起始柱面0不要使用启动DBCA工具进行对磁盘管理:在ORACLE用户下:bash-3.00$ cd $ORACLE_HOMEbash-3.00$ cd binbash-3.00$ export DISPLAY=10.253.20.172:0.0bash-3.00$ ./dbca# chown oracle:oinstall /dev/rdsk/c1t16d40s3(ROOT 两个节点都要执行)# chown oracle:oinstall /dev/rdsk/c1t16d40s3(ROOT 两个节点都要执行)通过核查确认一下:ls -lL /dev/rdsk/c1
12、t16d40s3一期所有存储裸设备已经分配完。第二、配置VOTE和OCR设备名本部份要在两台机器上操作。*node01*rootnode01 # cd /app/oraclerootnode01 # mkdir VOTE OCRrootnode01 # cd VOTErootnode01 # ls -lL /dev/rdsk/c2t4d0s5crw-r-1 rootsys 32,157 Aug 27 22:01 /dev/rdsk/c2t4d0s5rootnode01 # mknod c2t4d0s5 c 32 157rootnode01 # chown oracle:dba c2t4d0s5
13、rootnode01 # cd ./OCRrootnode01 # ls -Ll /dev/rdsk/c2t4d0s6crw-r-1 rootsys 32,158 Aug 27 22:01 /dev/rdsk/c2t4d0s6rootnode01 # mknod c2t4d0s6 c 32 158rootnode01 # chown oracle:dba c2t4d0s6rootnode01 #*node02*rootnode02 # cd /app/oraclerootnode02 # mkdir VOTE OCRrootnode02 # cd VOTErootnode02 # ls -lL
14、 /dev/rdsk/c2t4d0s5crw-r-1 root sys 32,157 Aug 27 22:01 /dev/rdsk/c2t4d0s5rootnode02# mknod c2t4d0s5 c 32 157rootnode02# chown oracle:dba c2t4d0s5rootnode02 # cd ./OCRrootnode02 # ls -Ll /dev/rdsk/c2t4d0s6crw-r-1 rootsys 32,158 Aug 27 22:01 /dev/rdsk/c2t4d0s6rootnode02 # mknod c2t4d0s6 c 32 158rootn
15、ode02 # chown oracle:dba c2t4d0s6rootnode02 #第三、Solaris 10 X86安装Oracle 10g RAC一、概述本文详细介绍了如何在基于Solaris 10 X86的节点上来安装Oracle 10g RAC的具体步骤和注意事项,同时也提供了具体的命令操作以及安装过程的截屏,最后是创建一个Cluster数据库的具体步骤。二、系统环境两台Sun的基于 AMD64的机器(V20Z) 一台Sun的Storage(3510)一个百兆交换机Solaris 10 X86 1/06Oracle 10g 10.1.0.3 EE RAC for Solaris
16、X86 with Oracle patch 4186426其中两个V20Z节点通过光纤卡直接和Storage3510相连接三、安装前期配置本文中的Oracle RAC的安装是基于两个节点的配置,很多步骤需要在两个节点(RAC1 和RAC2)上都要完成,以下是安装Oracle RAC前需要做的准备工作:1.在所有节点上创建Oracle用户组和帐号bash# groupadd -g 100 oinstallbash# groupadd -g 101 dbabash# mkdir -p /export/homebash# useradd -u 200 -g oinstall -G dba -s /u
17、sr/bin/bash -d /export/home/oracle -m oraclebash# id -a oracleuid=200(oracle) gid=100(oinstall) groups=101(dba)添加完用户后需要为oracle用户设置密码,使得帐号生效。2.在所有节点上验证用户nobody是否存在bash# id -a nobodyuid=60001(nobody) gid=60001(nobody) groups=60001(nobody)3.为所有的节点设置网络地址对于每个节点,Oracle RAC需要设置一个公共的网络地址,一个虚拟的未用网络地址和一个私有网络地
18、址,对于公共的网络地址,这里假设已经在安装系统时已经配置完成,即将bge0配置为公共地址,以下是配置其他网络地址的具体步骤:bash# ifconfig bge0:1 plumb upbash# ifconfig bge0:1 10.0.100.212 netmask 255.255.255.0bash# ifconfig bge1 plumb upbash# ifconfig bge1 192.168.0.12 netmask 255.255.255.0可以将这些步骤写入/etc/profile,使得每次系统启动后,这些地址自动就配置完成。最终的网络配置为:bash# ifconfig -a
19、lo0: flags=2001000849 mtu 8232 index 1inet 127.0.0.1 netmask ff000000 bge0: flags=1000843 mtu 1500 index 2inet 10.0.100.222 netmask ffffff00 broadcast 10.0.100.255ether 0:9:3d:0:75:20 bge0:1: flags=1000843 mtu 1500 index 2inet 10.0.100.212 netmask ffffff00 broadcast 10.0.100.255bge1: flags=1000803 m
20、tu 1500 index 3inet 192.168.0.12 netmask ffffff00 broadcast 192.168.0.255ether 0:9:3d:0:75:21bash$ netstat -rnRouting Table: IPv4Destination Gateway Flags Ref Use Interface- - - - - -192.168.0.0 192.168.0.11 U 1 0 bge110.0.100.0 10.0.100.221 U 1 47 bge010.0.100.0 10.0.100.211 U 1 0 bge0:1224.0.0.0 1
21、0.0.100.221 U 1 0 bge0127.0.0.1 127.0.0.1 UH 23 25657 lo04.在所有节点上生成文件生成文件/etc/hostname.bge0 和/etc/hostname.bge1,具体内容如下,并需将网络配置写入文件/etc/hosts:bash$ more /etc/host*:/etc/hostname.bge0:RAC1:/etc/hostname.bge1:rac_priv_host1:/etc/hosts:# Internet host table#127.0.0.1 localhost 10.0.100.221 RAC RAC110.0.
22、100.222 RAC RAC210.0.100.211 RAC1-VIR RAC1-VIR10.0.100.212 RAC2-VIR RAC2-VIR192.168.0.11 rac_priv_host1192.168.0.12 rac_priv_host25.配置信任主机Oracle RAC需要将所有节点配置成为信任主机,即在所有节点上生成具有以下内容的文件/etc/hosts.equiv,并进行测试bash$ more /etc/hosts.equivRAC oracleRAC oracleRAC1 oracleRAC2 oracleoracle:RAC1rsh RAC2 dateThu
23、 Jan 19 02:12:12 CST 2006oracle:RAC1rsh RAC2 hostnameRAC26.在所有节点上创建Oracle RAC安装目录并设置权限bash# mkdir -p /u01/app/oracle/product/10.1.0.3/oraclebash# chown -R oracle:oinstall /u01/app/oracle /product/10.1.0.3/oraclebash# chmod -R 755 /u01/app/oracle/product/10.1.0.3/oraclebash# mkdir -p /u01/crs/oracle/
24、product/10.1.0.3/crsbash# chown -R oracle:oinstall /u01/crs/oracle/product/10.1.0.3/crsbash# chmod -R 755 /u01/crs/oracle/product/10.1.0.3/crs为安装Oracle CRS在所有节点上设置Oracle的环境变量在$HOME/.profile,$HOME为用户oracle的起始目录。bash$ cat .profileORACLE_BASE=/u01/app/oracleexport ORACLE_BASEORACLE_HOME=/u01/crs/oracle
25、/product/10.1.0.3/crsexport ORACLE_HOMEPATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/usr/ccs/bin:/bin:/usr/openwin/binexport PATH在所有节点上将以下系统设置写入文件/etc/systemset semsys:seminfo_semmni 100set semsys:seminfo_semmns 1024set semsys:seminfo_semmsl 256set semsys:seminfo_semvmx 32767set shmsys:shminfo_shmmax 429496
26、7295set shmsys:shminfo_shmmin 1007存储设备的配置:在这里,我们用了Sun Storage3510来做为安装Oracle 10g RAC的设备,并将其配置为raw partitions,以下为具体的需求:Oracle和Oracle CRS需要的Raw Partitions数目和大小 从以上的表格可以看出,对于两个节点的Oracle RAC,我们需要在存储器上配置17个raw partitions(创建Oracle数据库需要15个,安装Oracle CRS需要2个),由于每个Solaris的磁盘最多只能有7个slice供使用(slice 2,8,9是不能用做分区的
27、),所以需要在Storage 3510上来分多个磁盘来满足需要,然后在Solaris中对每个盘进行分区,注意的是为了避免CRS或是Oracle数据库文件覆盖磁盘中的分区表,在分slices时不能从cylinder 0(比如slice 2)开始。由于3510的分区在Solaris中的设备名为一个很长的字符串,为了更方便的表示这些设备,这里采用了创建连接到这些设备的方法,并设置相应的属性和权限,这两个设备是为Oracel CRS安装用的,见以下步骤:root:RAC1# mkdir /ORACLEroot:RAC1# cd /ORACLEroot:RAC1# ln -s /dev/rdsk/c3t
28、600C0FF00000000007D35237AD84C802d0s0 ocrroot:RAC1# chown -RL root:oinstall ocrroot:RAC1# chmod -R 640 ocrroot:RAC1# ln -s /dev/rdsk/c3t600C0FF00000000007D35237AD84C802d0s1 voteroot:RAC1# chown -RL oracle:dba voteroot:RAC1# chmod -R 640 vote四、安装Oracle CRS当以上所有的配置完成后,我们就可以进行Oracle CRS的安装了,启动Oracle CRS安装脚本,注意参数-ignoreSysPrereqs是为了忽略版本检查带来的错误。oracle:RAC1# ./runInstaller -ignoreSysPrereqs以下是具体的安装步骤和图示,1.欢迎界面,直接点击next指定详细目录和凭证 此时会弹出一个提示栏要求在RAC1上运行一个脚本,如下:root:RAC1# /u01/crs/oracle/oraInventory/orainstRoot.shchmod: WARNING:
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1