前言
在实际生产环境中,大部分的数据库都是以集群模式存在,来降低性能压力,Oracle从9i起推出了实时应用集群(RAC Real Application Cluster),使得这一可能变成了现实,Oracle RAC是真正意义上的HA高可用+LB负载均衡,让我们来看一下
虚拟存储
Oracle RAC需要一套独立的共享存储,才能保证数据的一致性与完整性,当然,我们在练习环境是买不起存储的,555,所以呢,有一款非常好用的软件满足了我们的需求,那就是FreeNAS,我们先来看一下他的安装
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470093wU61.png"></a>
开启虚拟机选择自定义模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470095Zutw.png"></a>
选择VMware 9的版本,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470097XIyT.png"></a>
选择稍后安装操作系统,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470098V9zf.png"></a>
操作系统选择其他,从下拉框中找到FreeBSD,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470099anDS.png"></a>
根据实际情况确定名称与路径,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470100cudv.png"></a>
根据实际情况确定CPU个数与内核数,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470102ZC3v.png"></a>
设置内存大小,最小256M,建议512M,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_136247010357Js.png"></a>
根据实际情况确定网络模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470105lEvy.png"></a>
确定I/O控制器模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470106jmBS.png"></a>
选择新建一个虚拟磁盘,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470108TiFD.png"></a>
磁盘类型选择SCSI模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470109dK7X.png"></a>
OS空间一般说来有2G足矣,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470110MHi5.png"></a>
确定磁盘文件名称,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470112FNk4.png"></a>
确定无误后,点击Finish完成
增加存储磁盘
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_136247011328TQ.png"></a>
选择更改虚拟机配置
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470114FF0o.png"></a>
选择Add按钮后,选择Hard Disk,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470116GJH9.png"></a>
选择创建一个新的虚拟磁盘,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470117Hcgb.png"></a>
选择SCSI模式硬盘,使用物理硬盘格式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701206D2v.png"></a>
硬盘选择20G一个,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470122Fx82.png"></a>
确定虚拟磁盘文件名,点击Finish完成
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470122AbAX.png"></a>
点击Advanced按钮进行一些配置
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470124xvJp.png"></a>
将磁盘顺序放到节点1:0上,点击OK按钮
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470126LOcO.png"></a>
如上述操作,根据自己实际情况配置磁盘(最少不要低于3块,建议5块起),完成后点击OK按钮
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701273Bt4.png"></a>
选择好磁盘镜像后,点击启动虚拟机,出现上图所示欢迎页面后,直接回车即可
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470130ktTF.png"></a>
键入9回车,安装系统
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701323nR8.png"></a>
选择第三项,安装全部的系统到硬盘
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470133PwoB.png"></a>
确认无误,点击OK
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470134pivG.png"></a>
确认光驱无误后,点击OK
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470135PPyg.png"></a>
使用第一块磁盘做为OS系统安装盘(即2G那块盘,千万别搞错^_^)
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701350VyC.png"></a>
空间不得低于380M,这里熊熊分了512M,点击OK继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470136kHtC.png"></a>
选择Yes分配交换分区
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701376k2C.png"></a>
交换分区同样也给他512M
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470138WjDq.png"></a>
完成后,点击回车继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470139jkEY.png"></a>
选择Exit退出
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470140Orpt.png"></a>
取出光盘镜像后,选择第7项重启
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470140tykR.png"></a>
确定重启,选择Yes后回车,开始重启系统
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470141RzU5.png"></a>
重启后,选择第2项来配置网络IP
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701421F5H.png"></a>
不使用DHCP模式,选择No回车
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470143LaKV.png"></a>
根据实际情况配置所需的IP地址,点击OK回车
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470143EXGK.png"></a>
根据实际情况配置掩码,点击OK回车
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_136247014452uh.png"></a>
根据实际情况配置网关IP,点击OK回车
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470145ezzO.png"></a>
根据实际情况配置DNS地址,点击OK回车
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470145e51O.png"></a>
无需IPv6支持,点击No回车
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470146FUpa.png"></a>
配置完成后,同样选择7来重启,使新IP生效
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470147QpcZ.png"></a>
在浏览器上输入刚才设置好的IP,默认用户名为admin,密码是freenas,点击login登录
在系统(System)——常规(General)里进行一些基本修改(包括域名、地域、时间等等)
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470149bCFv.png"></a>
在硬盘——管理中将那几块20G的硬盘都挂上(注意使用软RAID模式),然后点击应用更改使其全部成为在线状态
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470150HGmg.png"></a>
在硬盘——软RAID中将所有硬盘都作为RAID5,完成后会变成COMPLETE状态
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470152KdqF.png"></a>
在服务——iSCSI服务的目标里将设备增加
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470154uTax.png"></a>
在设置中启动设备,拉到最下面保存并重启服务
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470155np4k.png"></a>
点击服务可以看到iSCSI服务已经启动,至此,FreeNAS安装配置完毕
安装Centos系统
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701568iVT.png"></a>
选择高级选项,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470158ZSnp.png"></a>
选择VMware9.0版本,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470160mWkM.png"></a>
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470161q6EW.png"></a>
操作系统选择Linux,在版本里选择Centos,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701628Tdb.png"></a>
根据实际情况设置虚拟机名称与存放路径,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701634DnC.png"></a>
确定CPU个数与CPU内核数,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701646W9J.png"></a>
根据实际需求设置内存大小,最低不要低于1G,建议2G起,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701659hVl.png"></a>
根据实际需求确定网络连接模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701672s4u.png"></a>
确定I/O控制器类型,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470168MHbq.png"></a>
创建一个新的虚拟磁盘,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470169LZj9.png"></a>
选择磁盘类型,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_136247017063AC.png"></a>
因为数据都存储在共享存储上,本地无需太大,20G即可,建议30G,稍微富裕点,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701726G5G.png"></a>
确定虚拟磁盘文件名,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470173nIaK.png"></a>
添加另一块网卡,使用Host-only模式
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470173rIZA.png"></a>
正式安装系统
开启新建的虚拟机
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470175tcAg.png"></a>
在引导页面直接回车即可
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470176FrJy.png"></a>
无需检查磁盘镜像,点击Skip跳过
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470179VQdQ.png"></a>
在欢迎页面点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470181h1m1.png"></a>
选择默认英文语言,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470183dlu1.png"></a>
选择美式英语键盘,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470186WCpJ.png"></a>
选择自定义安装模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470188FfJs.png"></a>
使用自动分区(LVM),点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624701903hVa.png"></a>
选择删除所有分区,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470193ie3O.png"></a>
确定LVM分区,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470196ceiF.png"></a>
确定boot引导,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470199NJUt.png"></a>
根据实际情况配置IP与主机名等网络信息,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624702017fou.png"></a>
关闭防火墙与SELinux,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624702042qXt.png"></a>
语言支持里增加简体中文,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470209Oocx.png"></a>
时区选择亚洲上海,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470211zCu0.png"></a>
设置root密码,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_13624702143AyW.png"></a>
图省事,选择所有的安装包,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470216avfo.png"></a>
安装完毕后,取出镜像,点击Rebot重启
配置Centos系统
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470220Ab25.png"></a>
重启后,在欢迎页面点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470222PF8U.png"></a>
同意授权,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470225o0Fl.png"></a>
使用NTP时间模式,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470227E1lh.png"></a>
确定分辨率大小,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470230jDwd.png"></a>
暂不设置其他系统用户,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470232nOPQ.png"></a>
暂不添加其他软件包,点击Next继续
<a href="http://bearlovecat.blog.51cto.com/attachment/201303/5/1293914_1362470235CtRP.png"></a>
确定完成完整,点击Next继续
本文转自bear_cat51CTO博客,原文链接: http://blog.51cto.com/bearlovecat/1147624,如需转载请自行联系原作者