




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、如何一步步搭建Exadata虚拟机Cell节点原文链接:/how_to_build_an_exadata_simulator_step_by_step_1_build_a_cell_nodeovermars同学在四月初就询问过我具体应该如何搭建一套Exadata虚拟机,当时我的回答是在五月前我会写一篇如何搭建Exadata虚拟机的文章,请到时关注我的blog。这里得向overmars同学道歉,因为由于一些个人的原因爽约了。 Anyway,Just hope it is not too late。我知道很多Oracle DBA对学习Exadata有兴趣,
2、却一直苦于身边没有一套可以学习测试Exadata的环境。要知道Exadata是Oracle是软硬件结合的一体机,单纯是通过自己的个人电脑是永远无法模拟出来真实的Exadata环境。所以这里说的Exadata虚拟机说白了只是按照猫话出来的老虎。Exadata虚拟机在Oracle内部一直就存在,但是仅限于OracleUniversity或者Oracle Internal用来培训或者学习Exadata之用,在Oracle内部的网站中这个虚拟机标识为“InternalUse Only, Strict Confidential” 的字样。本人无意违反O记的policy,所以需要自己从头到尾开始构建。好了
3、废话不多说了,要构建一套Exadata虚拟环境,至少需要两台虚拟机,一台用于Cell节点,一台用于DB节点。首先您的机器需要较高的配置: CPU Intel Core i3以上(或者AMD Athlon II X4以上), 推荐Core i5 (AMDPhenom II X4) ; 内存(Memory)至少4G以上,推荐配置8G; 磁盘(Harddisk)空余至少在40G以上,当然如果有SSD更好 安装好虚拟机, 推荐使用Oracle Virtualbox (/); Oracle Linux 5.7安装介质。 可前往 Linux 5.7的介质名
4、为V27570-01.zip, 解压后的文件名为OracleLinux-R5-U7-Server-x86_64-dvd.iso Exadata Cell的安装介质。可前往 的Cell介质名为V33693-01.zip解压后文件名为cellImageMaker_.0_LINUX.X64_120713-1.x86_64.tar; Oracle Clusterware 以及Oracle database 的Linux x86_64的安装介质,文件名为:p10404530_112030_Linux-x86-64_1of7
5、.zipp10404530_112030_Linux-x86-64_2of7.zipp10404530_112030_Linux-x86-64_3of7.zip 最新的补丁工具Opatch。 补丁号:6880880:OPatch patch of version .4 for Oracle software releases 11.2.0.x (APRIL 2013) Exadata RDBMS Bundle Patch 17 补丁号:16474946然后就可以正式开始我们的Exadata之旅了。首先需要在虚拟机中安装Oracle Linux 5.7, (Red Hat Ent
6、erprise Linux理论也可以,但我没有测试过),内存分配1GB通常就足够了。安装过程很简单,需要注意的是需要选上软件开发包,例如gcc/aio之类的,图形界面(GUI)可不装。推荐使用静态IP地址,我的网络配置如下:rootcell # cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Intel Corporation 82540EM Gigabit Ethernet ControllerDEVICE=eth0BOOTPROTO=staticBROADCAST=55HWADDR=08:00:27:B0:39:02I
7、PADDR=01NETMASK=NETWORK=ONBOOT=yesrootcell # cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.cell localhost.localdomain localhost:1localhost6.localdomain6 localhost6注意: 安装完成以后Oracle Linu
8、x默认使用UEK,如果这里使用UEK, 则在后面的步骤中无法正常启动cellsrv服务。可以修改grub的配置将其默认启动内核修改为redhat兼容内核:rootcell # vi /etc/grub.conf将default=0修改为default=1 ,然后重启。因为默认Oracle Linux启动了很多我们不需要的服务,为了节省资源,建议将以下服务停止并且禁用。chkconfig -level 2345 auditd off & service auditd stop chkconfig -level 2345 autofs off & service autofs stop chkco
9、nfig -level 2345 avahi-daemon off & service avahi-daemon stopchkconfig -level 2345 bluetooth off & service bluetooth stopchkconfig -level 2345 cups off & service cups stop chkconfig -level 2345 ip6tables off & service ip6tables stop chkconfig -level 2345 iptables off & service iptables stop chkconfi
10、g -level 2345 isdn off & service isdn stop chkconfig -level 2345 kudzu off & service kudzu stopchkconfig -level 2345 mcstrans off & service auditd stopchkconfig -level 2345 netfs off & service netfs stopchkconfig -level 2345 pcscd off & service pcscd stop chkconfig -level 2345 restorecond off & serv
11、ice restorecond stopchkconfig -level 2345 rhnsd off & service rhnsd stop chkconfig -level 2345 sendmail off & service sendmail stopchkconfig -level 2345 setroubleshoot off & service settroubleshoot stopchkconfig -level 2345 smartd off & service smartd stopchkconfig -level 2345 xinetd off & service x
12、inetd stopchkconfig -level 2345 yum-updatesd off & service yum-updatesd stop当然上述服务的禁用也可以通过 ntsysv level 2345在图形界面进行选择,取消掉不需要的服务,然后重启生效。然后我们将Exadata Cell ImageV33693-01.zip上传到虚拟机内,解压,得到cellImageMaker_.0_LINUX.X64_120713-1.x86_64.tar,继续解压得到一个名为dl180的文件夹。rootcell # unzip V33693-01.zipArchive: V
13、33693-01.zip inflating: README.txt inflating: cellImageMaker_.0_LINUX.X64_120713-1.x86_64.tar rootcell #tar -pxvf cellImageMaker_.0_LINUX.X64_120713-1.x86_64.tardl180.在dl180/boot/cellbits下找到cell.bin文件。这个bin文件实际上是一个zip压缩包, 我们使用unzip来对它进行解压:rootcell # unzip cell.bin Archive: cell.binwa
14、rning cell.bin: 6408 extra bytes at beginning or within zipfile (attempting to process anyway) inflating: cell-.1_LINUX.X64_130109-1.x86_64.rpm inflating: jdk-1_5_0_15-linux-amd64.rpm解压后得到cell-.1_LINUX.X64_130109-1.x86_64.rpm和jdk-1_5_0_15-linux-amd64.rpm两个rpm包我们先来安装jdk:rootcell # rpm
15、 -ivh jdk-1_5_0_15-linux-amd64.rpm然后再安装cell:rootcell # rpm -ivh cell-.1_LINUX.X64_130109-1.x86_64.rpm安装的时候报错,提示有LWP包依赖,这是因为默认没有安装perl-libwww-perl导致的,但是这个包的依赖较多,推荐使用yum进行安装。配置好yum源, 直接使用yum安装LWP:rootcell # yum install perl-libwww-perl再次安装cell,再一次提示错误,前提条件不满足。不过具体是什么前提条件不满足没有提示,rpm包管理就是这点不方便。只
16、能通过以下方式生成具体的检查条件的脚本, 然后再分析是什么条件不满足:rootcell # rpm -scripts -qp cell-.1_LINUX.X64_130109-1.x86_64.rpm diag.log打开diag.log,很快看到应该是/var/log/oracle目录不存在导致检查的前提条件通不过,于是手工建立这个目录, 并修改权限为775。rootcell # mkdir -p /var/log/oraclerootcell # chmod -R 775 /var/log/oracle再次安装cell这次没有报错。接下来的步骤应该是在cell虚拟机中建立对
17、应的虚拟的磁盘和闪盘:rootcell # mkdir -p /opt/oracle/cell/disks/rawrootcell cd /opt/oracle/cell/disks/rawrootcell vi dd.shrootcell cat dd.shdd if=/dev/zero of=disk01 bs=1M count=1000dd if=/dev/zero of=disk02 bs=1M count=1000dd if=/dev/zero of=disk03 bs=1M count=1000dd if=/dev/zero of=disk04 bs=1M count=1000dd
18、 if=/dev/zero of=disk05 bs=1M count=1000dd if=/dev/zero of=disk06 bs=1M count=1000dd if=/dev/zero of=disk07 bs=1M count=1000dd if=/dev/zero of=disk08 bs=1M count=1000dd if=/dev/zero of=disk09 bs=1M count=1000dd if=/dev/zero of=disk10 bs=1M count=1000dd if=/dev/zero of=disk11 bs=1M count=1000dd if=/d
19、ev/zero of=disk12 bs=1M count=1000dd if=/dev/zero of=FLASH01 bs=1M count=1000dd if=/dev/zero of=FLASH02 bs=1M count=1000dd if=/dev/zero of=FLASH03 bs=1M count=1000dd if=/dev/zero of=FLASH04 bs=1M count=1000执行dd.sh创建对应的磁盘和闪盘:其中磁盘12块,每块大小为1GB,闪盘4块,没块大小也是1GB。rootcell raw# chmod 660 *rootcell raw# ls -l
20、trtotal 16400068-rw-rw- 1 root root 692 May 16 16:24 dd.sh-rw-rw- 1 root root 1048576000 May 16 16:24 disk01-rw-rw- 1 root root 1048576000 May 16 16:24 disk02-rw-rw- 1 root root 1048576000 May 16 16:24 disk03-rw-rw- 1 root root 1048576000 May 16 16:24 disk04-rw-rw- 1 root root 1048576000 May 16 16:2
21、5 disk05-rw-rw- 1 root root 1048576000 May 16 16:25 disk06-rw-rw- 1 root root 1048576000 May 16 16:25 disk07-rw-rw- 1 root root 1048576000 May 16 16:26 disk08-rw-rw- 1 root root 1048576000 May 16 16:26 disk09-rw-rw- 1 root root 1048576000 May 16 16:27 disk10-rw-rw- 1 root root 1048576000 May 16 16:2
22、7 disk11-rw-rw- 1 root root 1048576000 May 16 16:27 disk12-rw-rw- 1 root root 1048576000 May 16 16:27 FLASH01-rw-rw- 1 root root 1048576000 May 16 16:27 FLASH02-rw-rw- 1 root root 1048576000 May 16 16:27 FLASH03-rw-rw- 1 root root 1048576000 May 16 16:28 FLASH04然后删除dd脚本,切换到celladmin用户,重新启动celld服务。ro
23、otcell # su - celladmincelladmincell $ cellcli -e alter cell restart services all发现cellsrv服务无法启动,查看/opt/oracle/cell.1_LINUX.X64_130109/log/diag/asm/cell/cell/trace/alert.log发现有类似如下的报错信息:CELLSRV version=.1,label=OSS_.1_LINUX.X64_130109,Wed_Jan_9_06:09:48_PST_2013Non critical e
24、rror DIA-48913 caught while writing to trace file /opt/oracle/cell.1_LINUX.X64_130109/log/diag/asm/cell/cell/trace/svtrc_2244_0.trcError message: DIA-48913: Writing into trace file failed, file size limit 0 reached从错误号就可以判断应该是最大文件数不足, 于是需要再修改操作系统的最大文件数限制:在/etc/sysctl.ctl最后添加一行:fs.file-max =
25、65536,然后刷新生效:rootcell # sysctl -pnet.ipv4.ip_forward = 0net.ipv4.conf.default.rp_filter = 2net.ipv4.conf.default.accept_source_route = 0kernel.sysrq = 0kernel.core_uses_pid = 1net.ipv4.tcp_syncookies = 1kernel.msgmnb = 65536kernel.msgmax = 65536kernel.shmmax = 68719476736kernel.shmall = 4294967296fs
26、.file-max = 65536在/etc/security/limit.conf文件最后添加两行:* soft nofile 65536* hard nofile 65536然后退出重新登录, 切换到 celladmin,使用ulimit -a进行查看是否生效:rootcell # ulimit -acore file size (blocks, -c) 0data seg size (kbytes, -d) unlimitedscheduling priority (-e) 0file size (blocks, -f) unlimitedpending signals (-i) 119
27、99max locked memory (kbytes, -l) 32max memory size (kbytes, -m) unlimitedopen files (-n) 65536pipe size (512 bytes, -p) 8POSIX message queues (bytes, -q) 819200real-time priority (-r) 0stack size (kbytes, -s) 10240cpu time (seconds, -t) unlimitedmax user processes (-u) 11999virtual memory (kbytes, -
28、v) unlimitedfile locks (-x) unlimited再次启动cell所有的服务:celladmincell $ cellcli -e alter cell restart services all这次发现cell下的cellsrv, ms, rs服务都可以正常启动了。接下来需要在cellinit.ora中添加网卡的信息:celladmincell $ cellcli -e create cell cell1 interconnect1=eth0执行成功以后,可以看到cellinit.ora文件中添加了一行ipaddress1=01/24类似的信息。
29、rootcell config# cat /opt/oracle/cell/cellsrv/deploy/config/cellinit.ora#CELL Initialization Parametersversion=0.0DEPLOYED=TRUEHTTP_PORT=8888RMI_PORT=23791SSL_PORT=23943JMS_PORT=9127BMC_SNMP_PORT=162ipaddress1=01/24接下来创建celldisk, griddisk, flashcache, flashlog:celladmincell $ cellcliCell
30、CLI: Release .1 - Production on Thu May 16 23:11:41 CST 2013Copyright (c) 2007, 2012, Oracle. All rights reserved.Cell Efficiency Ratio: 1CellCLI alter cell restart services allStopping the RS, CELLSRV, and MS services.The SHUTDOWN of services was successful.Starting the RS, CELLSRV, and MS
31、services.Getting the state of RS services. runningStarting CELLSRV services.The STARTUP of CELLSRV services was successful.Starting MS services.The STARTUP of MS services was successful.CellCLI create celldisk all CellDisk FD_00_cell1 successfully createdCellDisk FD_01_cell1 successfully createdCell
32、Disk FD_02_cell1 successfully createdCellDisk FD_03_cell1 successfully createdCellDisk CD_disk01_cell1 successfully createdCellDisk CD_disk02_cell1 successfully createdCellDisk CD_disk03_cell1 successfully createdCellDisk CD_disk04_cell1 successfully createdCellDisk CD_disk05_cell1 successfully crea
33、tedCellDisk CD_disk06_cell1 successfully createdCellDisk CD_disk07_cell1 successfully createdCellDisk CD_disk08_cell1 successfully createdCellDisk CD_disk09_cell1 successfully createdCellDisk CD_disk10_cell1 successfully createdCellDisk CD_disk11_cell1 successfully createdCellDisk CD_disk12_cell1 su
34、ccessfully createdCellCLI create flashcache all size=2GFlash cache cell1_FLASHCACHE successfully createdCellCLI create griddisk all harddisk prefix=dataGridDisk data_CD_disk01_cell1 successfully createdGridDisk data_CD_disk02_cell1 successfully createdGridDisk data_CD_disk03_cell1 successfully creat
35、edGridDisk data_CD_disk04_cell1 successfully createdGridDisk data_CD_disk05_cell1 successfully createdGridDisk data_CD_disk06_cell1 successfully createdGridDisk data_CD_disk07_cell1 successfully createdGridDisk data_CD_disk08_cell1 successfully createdGridDisk data_CD_disk09_cell1 successfully creat
36、edGridDisk data_CD_disk10_cell1 successfully createdGridDisk data_CD_disk11_cell1 successfully createdGridDisk data_CD_disk12_cell1 successfully createdCellCLI create flashlog allFlash log cell1_FLASHLOG successfully createdCellCLI list flashcache detail name: cell1_FLASHCACHE cellDisk: FD_00_cell1,
37、FD_03_cell1,FD_02_cell1,FD_01_cell1 creationTime: 2013-05-16T17:11:57+08:00 degradedCelldisks: effectiveCacheSize: 2G id: 33020341-ba55-4b35-9b3a-4030b5085475 size: 2G status: normalCellCLI list flashlog detail name: cell1_FLASHLOG cellDisk: FD_01_cell1,FD_03_cell1,FD_02_cell1,FD_00_cell1 creationTi
38、me: 2013-05-16T17:12:10+08:00 degradedCelldisks: effectiveSize: 512M efficiency: 100.0 id: f10e1ac7-5e3f-4c1e-8f3b-8e9ab19fffeb size: 512M status: normalCellCLI list cell cell1 onlineCellCLI list celldisk CD_disk01_cell1 normal CD_disk02_cell1 normal CD_disk03_cell1 normal CD_disk04_cell1 normal CD_
39、disk05_cell1 normal CD_disk06_cell1 normal CD_disk07_cell1 normal CD_disk08_cell1 normal CD_disk09_cell1 normal CD_disk10_cell1 normal CD_disk11_cell1 normal CD_disk12_cell1 normal FD_00_cell1 normal FD_01_cell1 normal FD_02_cell1 normal FD_03_cell1 normalCellCLI list griddisk data_CD_disk01_cell1 a
40、ctive data_CD_disk02_cell1 active data_CD_disk03_cell1 active data_CD_disk04_cell1 active data_CD_disk05_cell1 active data_CD_disk06_cell1 active data_CD_disk07_cell1 active data_CD_disk08_cell1 active data_CD_disk09_cell1 active data_CD_disk10_cell1 active data_CD_disk11_cell1 active data_CD_disk12_cell1 activeCellCLI list celldisk CD_disk01_cell1 detail name: CD_disk01_cell1 comment: creationTime: 2013-05-16T16:40:29+08:00 dev
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 《团队新风采》课件
- 《肾上腺罕见病变的影像学诊断》课件
- 高等数学之导数与微分:课件精讲
- 《零售促销策略》课件
- 陕西高考英语高频词汇单选题100道及答案
- 《建筑智能化系统集成》课件
- 《试井解释原理》课件
- 西樵镇第一次模拟考试物理试卷
- 文档面试技巧
- 与商会合作协议
- 2025新外研社版英语七年级下单词表
- 急救救援知识培训
- 牧场物语-矿石镇的伙伴们-完全攻略
- ISO 22003-1:2022《食品安全-第 1 部分:食品安全管理体系 审核与认证机构要求》中文版(机翻)
- 合规培训计划方案
- 大气简约南昌大学校园文化介绍宣传
- 部编人教版六年级下册语文全册课内阅读训练(含答案)
- 2024年江苏省无锡市中考地理试卷真题(含答案解析)
- 2024届高考地理一轮复习 课件第28讲 工业区位及其变化
- 从龙文化看中华文明的连续性
- 二年级数学上册苏教版第六单元《表内乘法和表内除法(二)》说课稿
评论
0/150
提交评论