Exadata虚拟环境搭建

(一)       配置要求

1.     CPU Intel Core i3以上(或者AMD AthlonⅡ X4以上),推荐Core i5以上(AMD PhenomⅡ X4以上);

2.     内存至少4GB以上,推荐配置8GB;

3.     磁盘空余至少在40GB以上;

4.     安装好虚拟机,推荐使用Oracle Virtualbox;

5.     有Oracle Linux 5安装介质。可前往https://edelivery.oracle.com/下载,介质名为V27570-01.ZIP。也可以到http://mirrors.dotsrc.org/oracle-linux/ 上下载。这里用的是OEL5.7;

6.     有Exadata 11.2.3.2 Cell的安装介质。下载地址同上,Cell介质名为V33693-01.ZIP;

7.     准备Oracle Clusterware以及Oracle database的安装介质,这里用的11.2.0.4版本;

8.     准备补丁工具Opatch;

9.     准备最新的Exadata RDBMS Bundle Patch。

(二)       安装步骤

1.     搭建Exadata存储服务器虚拟机

1)     安装OEL 5.7

安装过程省略,主要是内存和磁盘分配,分别给1GB内存和100GB的虚拟硬盘空间。注意的是需要选上软件开发包,例如gcc/aio之类的。这里安装完成之后可以先拷贝一份虚拟机镜像,后续用作数据库服务器。

2)     修改静态IP地址及hosts文件

点击(此处)折叠或打开

  1. [root@cell ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

  2. # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

  3. DEVICE=eth0
  4. BOOTPROTO=static
  5. IPADDR=192.168.56.101
  6. NETMASK=255.255.255.0
  7. NETWORK=192.168.56.0
  8. BROADCAST=192.168.56.255
  9. ONBOOT=yes
  10. HWADDR=00:0c:29:69:08:4a
  11. TYPE=Ethernet

  12. [root@cell ~]# cat /etc/hosts
  13. # Do not remove the following line, or various programs
  14. # that require network functionality will fail.
  15. 127.0.0.1 localhost.localdomain localhost
  16. ::1 localhost6.localdomain6 localhost6
  17. 192.168.56.101 cell.com
3)     修改内核

Oracle Linux默认使用UEK,如果使用UEK,则在后面的步骤中无法正常启动cellsrv服务。使用grub修改配置,将默认启动内核修改为redhat兼容内核:

[root@cell ~]# vi /etc/grub.conf

将default=0修改为default=1,然后重启。

4)     上传解压

解压V33693-01.ZIP得到cellImageMaker_11.2.3.2.0_LINUX.X64_120713-1.x86_64.tar,继续解压得到一个名为dl180的文件夹。

在dl180/boot/cellbits下找到cell.bin文件。这个bin文件实际上是一个zip压缩包。可以使用unzip对它进行解压。

点击(此处)折叠或打开

  1. [root@cell ~]# unzip V33693-01.zip

  2. [root@cell ~]# tar –pxvf cellImageMaker_11.2.3.2.0_LINUX.X64_120713-1.x86_64.tar
  3. [root@cell cellbits]# unzip cell.bin
  4. Archive: cell.bin
  5. warning [cell.bin]: 6408 extra bytes at beginning or within zipfile
  6.   (attempting to process anyway)
  7.   inflating: cell-11.2.3.2.0_LINUX.X64_120713-1.x86_64.rpm
  8.   inflating: jdk-1_5_0_15-linux-amd64.rpm

解压后得到cell-11.2.3.2.0_LINUX.X64_120713-1.x86_64.rpm和jdk-1_5_0_15-linux-amd64.rpm两个rpm包。

5)     安装jdk和cell

安装jdk:

点击(此处)折叠或打开

  1. [root@cell cellbits]# rpm -ivh jdk-1_5_0_15-linux-amd64.rpm
  2. Preparing... ########################################### [100%]
  3.    1:jdk ########################################### [100%]

安装cell可能会报错,提示有LWP依赖包,这是因为默认没有安装perl-libwww-perl,安装这个包建议使用yum配置。

点击(此处)折叠或打开

  1. [root@cell cellbits]# yum install perl-libwww-perl

再次安装cell,仍然出现报错:

点击(此处)折叠或打开

  1. [root@cell cellbits]# rpm -ivh cell-11.2.3.2.0_LINUX.X64_120713-1.x86_64.rpm
  2. Preparing... ########################################### [100%]
  3. Pre Installation steps in progress ...
  4. error: %pre(cell-11.2.3.2.0_LINUX.X64_120713-1.x86_64) scriptlet failed, exit status 1
  5. error: install: %pre scriptlet failed (2), skipping cell-11.2.3.2.0_LINUX.X64_120713-1

通过以下命令生成具体的检查条件的脚本,在进行分析:

点击(此处)折叠或打开

  1. [root@cell cellbits]# rpm --scripts -qp cell-11.2.3.2.0_LINUX.X64_120713-1.x86_64.rpm >>diag.log

查看diag.log文件,发现所有的的判断信息都会记录到/opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/.install_log.txt文件里,查看这个文件,发现里面只有一条记录,/var/log/oracle这个目录不存在。

点击(此处)折叠或打开

  1. [root@cell cellbits]# cat diag.log
  2. if [ $? == 0 ]; then
  3.     echo 'sage rpm is installed. Please remove it first using: "rpm -e sage". Then try installing cell rpm again.' >> /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/.install_log.txt 2>&1
  4.     exit 1
  5. fi
  6. if [ ! -d /ar/log/oracle ]; then
  7.   echo '/var/log/oracle does not exist or not found. Check it exists and is writable and retry.' >> /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/.install_log.txt 2>&1
  8.   exit 1
  9. fi………….
  10. [root@cell cellbits]# cat /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/.install_log.txt
  11. /var/log/oracle does not exist or not found. Check it exists and is writable and retry.

  12. 手工建立/var/log/oracle目录,并修改权限后再次安装cell:

  13. [root@cell cellbits]# rpm -ivh cell-11.2.3.2.0_LINUX.X64_120713-1.x86_64.rpm
  14. Preparing... ########################################### [100%]
  15. Pre Installation steps in progress ...
  16.    1:cell ########################################### [100%]
  17. Post Installation steps in progress ...
  18. Set cellusers group for /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/cellsrv/deploy/log directory
  19. Set 775 permissions for /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/cellsrv/deploy/log directory
  20. /
  21. Installation SUCCESSFUL.
  22. Starting RS and MS... as user celladmin
  23. Done. Please Login as user celladmin and create cell to startup CELLSRV to complete cell configuration.
  24. WARNING: Using the current shell as root to restart cell services.
  25. Restart the cell services using a new shell.
6)     建立虚拟磁盘和闪盘

执行dd.sh创建对应的磁盘和闪盘:其中磁盘12块,每块大小为1GB,闪盘4块,每块大小1GB,并修改权限为660:


点击(此处)折叠或打开

  1. [root@cell cell]# mkdir -p /opt/oracle/cell/disks/raw
  2. [root@cell cell]# cd /opt/oracle/cell/disks/raw
  3. [root@cell raw]# vi dd.sh
  4. [root@cell raw]# cat dd.sh
  5. dd if=/dev/zero of=disk01 bs=1M count=1000
  6. dd if=/dev/zero of=disk02 bs=1M count=1000
  7. dd if=/dev/zero of=disk03 bs=1M count=1000
  8. dd if=/dev/zero of=disk04 bs=1M count=1000
  9. dd if=/dev/zero of=disk05 bs=1M count=1000
  10. dd if=/dev/zero of=disk06 bs=1M count=1000
  11. dd if=/dev/zero of=disk07 bs=1M count=1000
  12. dd if=/dev/zero of=disk08 bs=1M count=1000
  13. dd if=/dev/zero of=disk09 bs=1M count=1000
  14. dd if=/dev/zero of=disk10 bs=1M count=1000
  15. dd if=/dev/zero of=disk11 bs=1M count=1000
  16. dd if=/dev/zero of=disk12 bs=1M count=1000
  17. dd if=/dev/zero of=FLASH01 bs=1M count=1000
  18. dd if=/dev/zero of=FLASH02 bs=1M count=1000
  19. dd if=/dev/zero of=FLASH03 bs=1M count=1000
  20. dd if=/dev/zero of=FLASH04 bs=1M count=1000

  21. [root@cell raw]# sh dd.sh
  22. [root@cell raw]# chmod 660 *
7)     启动cell服务

切换到celladmin用户(该用户在安装完cell之后会建立),然后重启celld服务:


点击(此处)折叠或打开

  1. [root@cell raw]# su - celladmin

  2. [celladmin@cell ~]$ cellcli -e alter cell restart services all
  3. Stopping the RS, CELLSRV, and MS services...
  4. The SHUTDOWN of services was successful.
  5. Starting the RS, CELLSRV, and MS services...
  6. Getting the state of RS services... running
  7. Starting CELLSRV services...
  8. The STARTUP of CELLSRV services was not successful.
  9. CELL-01547: CELLSRV startup failed due to unknown reasons.
  10. Starting MS services...
  11. The STARTUP of MS services was successful.

启动cellrv失败,可以去查看/opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/log/diag/asm/cell/cell/trace/alert.log,该日志是cellcli工具相关日志,可以看到报错说明cellinit.ora文件里缺少ip的参数。

点击(此处)折叠或打开

  1. Tue Jul 19 15:10:55 2016
  2. [RS] Started monitoring process /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/cellsrv/bin/cellrssmt with pid 6503
  3. Errors in file /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/log/diag/asm/cell/cell/trace/rstrc_6485_4.trc (incident=25):
  4. RS-7445 [Required IP parameters missing] [Check cellinit.ora] [] [] [] [] [] [] [] [] [] []
  5. Incident details in: /opt/oracle/cell11.2.3.2.0_LINUX.X64_120713/log/diag/asm/cell/cell/incident/incdir_25/rstrc_6485_4_i25.trc
  6. Sweep [inc][25]: completed
  7. [RS] Required IP parameters not configured in cellinit.ora. Err: 36
  8. OS Hugepage status:
  9.    Total/free hugepages available=12/12; hugepage size=2048KB
  10. [RS] Start service CELLSRV failed with error: -74.

在cellinit.ora中添加网卡的信息:

点击(此处)折叠或打开

  1. [celladmin@cell ~]$ cellcli -e create cell cell1 interconnect1=eth0


执行成功可以看到文件里添加了一行ipaddress1等的信息:

点击(此处)折叠或打开

  1. [celladmin@cell ~]$ cat /opt/oracle/cell/cellsrv/deploy/config/cellinit.ora

  2. #CELL Initialization Parameters
  3. version=0.0
  4. HTTP_PORT=8888
  5. bbuChargeThreshold=800
  6. SSL_PORT=23943
  7. RMI_PORT=23791
  8. ipaddress1=192.168.56.101/24
  9. bbuTempThreshold=60
  10. DEPLOYED=TRUE
  11. JMS_PORT=9127
  12. BMC_SNMP_PORT=162

然后再次重启celld服务,可以看到cellsrv、ms、rs都正常启动了:

点击(此处)折叠或打开

  1. [celladmin@cell ~]$ cellcli -e alter cell restart services all
  2. Stopping the RS, CELLSRV, and MS services...
  3. The SHUTDOWN of services was successful.
  4. Starting the RS, CELLSRV, and MS services...
  5. Getting the state of RS services... running
  6. Starting CELLSRV services...
  7. The STARTUP of CELLSRV services was successful.
  8. Starting MS services...
  9. The STARTUP of MS services was successful.
8)     创建celldisk、griddisk、flashcache和flashlog

登陆cellcli工具界面,创建celldisk,flashcache和flashlog也会自动创建,先创建完celldisk后再建立griddisk。


点击(此处)折叠或打开

  1. [celladmin@cell ~]$ cellcli

  2. CellCLI> create celldisk all
  3. CellDisk CD_disk01_cell1 successfully created
  4. CellDisk CD_disk02_cell1 successfully created
  5. CellDisk CD_disk03_cell1 successfully created
  6. CellDisk CD_disk04_cell1 successfully created
  7. CellDisk CD_disk05_cell1 successfully created
  8. CellDisk CD_disk06_cell1 successfully created
  9. CellDisk CD_disk07_cell1 successfully created
  10. CellDisk CD_disk08_cell1 successfully created
  11. CellDisk CD_disk09_cell1 successfully created
  12. CellDisk CD_disk10_cell1 successfully created
  13. CellDisk CD_disk11_cell1 successfully created
  14. CellDisk CD_disk12_cell1 successfully created

  15. CellCLI> create griddisk data_CD_disk01_cell1 celldisk=CD_disk01_cell1
  16. GridDisk data_CD_disk01_cell1 successfully created
  17. CellCLI> create griddisk data_CD_disk02_cell1 celldisk=CD_disk02_cell1
  18. GridDisk data_CD_disk02_cell1 successfully created
  19. CellCLI> create griddisk data_CD_disk03_cell1 celldisk=CD_disk03_cell1
  20. GridDisk data_CD_disk03_cell1 successfully created
  21. CellCLI> create griddisk data_CD_disk04_cell1 celldisk=CD_disk04_cell1
  22. GridDisk data_CD_disk04_cell1 successfully created
  23. CellCLI> create griddisk data_CD_disk05_cell1 celldisk=CD_disk05_cell1
  24. GridDisk data_CD_disk05_cell1 successfully created
  25. CellCLI> create griddisk data_CD_disk06_cell1 celldisk=CD_disk06_cell1
  26. GridDisk data_CD_disk06_cell1 successfully created
  27. CellCLI> create griddisk data_CD_disk07_cell1 celldisk=CD_disk07_cell1
  28. GridDisk data_CD_disk07_cell1 successfully created
  29. CellCLI> create griddisk data_CD_disk08_cell1 celldisk=CD_disk08_cell1
  30. GridDisk data_CD_disk08_cell1 successfully created
  31. CellCLI> create griddisk data_CD_disk09_cell1 celldisk=CD_disk09_cell1
  32. GridDisk data_CD_disk09_cell1 successfully created
  33. CellCLI> create griddisk data_CD_disk10_cell1 celldisk=CD_disk10_cell1
  34. GridDisk data_CD_disk10_cell1 successfully created
  35. CellCLI> create griddisk data_CD_disk11_cell1 celldisk=CD_disk11_cell1
  36. GridDisk data_CD_disk11_cell1 successfully created
  37. CellCLI> create griddisk data_CD_disk12_cell1 celldisk=CD_disk12_cell1
  38. GridDisk data_CD_disk12_cell1 successfully created

可以使用下面的命令查看信息,加detail可以查看详细信息:

点击(此处)折叠或打开

  1. CellCLI> list flashcache detail

  2.          name: cell1_FLASHCACHE
  3.          cellDisk: FD_02_cell1,FD_01_cell1,FD_00_cell1,FD_03_cell1
  4.          creationTime: 2016-07-19T15:13:20+08:00
  5.          degradedCelldisks:
  6.          effectiveCacheSize: 3.1875G
  7.          id: 895f521d-d20e-4c7c-b73c-45162654e498
  8.          size: 3.1875G
  9.          status: normal

  10. CellCLI> list flashlog detail
  11.          name: cell1_FLASHLOG
  12.          cellDisk: FD_02_cell1,FD_03_cell1,FD_01_cell1,FD_00_cell1
  13.          creationTime: 2016-07-19T15:13:09+08:00
  14.          degradedCelldisks:
  15.          effectiveSize: 512M
  16.          efficiency: 100.0
  17.          id: dec427f6-78a2-421e-8f2a-8d4a82e653e3
  18.          size: 512M
  19.          status: normal

  20. CellCLI> list cell
  21.          cell1 online

  22. CellCLI> list griddisk
  23.          data_CD_disk01_cell1 active
  24.          data_CD_disk02_cell1 active
  25.          data_CD_disk03_cell1 active
  26.          data_CD_disk04_cell1 active
  27.          data_CD_disk05_cell1 active
  28.          data_CD_disk06_cell1 active
  29.          data_CD_disk07_cell1 active
  30.          data_CD_disk08_cell1 active
  31.          data_CD_disk09_cell1 active
  32.          data_CD_disk10_cell1 active
  33.          data_CD_disk11_cell1 active
  34.          data_CD_disk12_cell1 active

  35. CellCLI> list griddisk data_CD_disk05_cell1 detail
  36.          name: data_CD_disk05_cell1
  37.          availableTo:
  38.          cachingPolicy: default
  39.          cellDisk: CD_disk05_cell1
  40.          comment:
  41.          creationTime: 2016-07-19T15:57:22+08:00
  42.          diskType: HardDisk
  43.          errorCount: 0
  44.          id: aab593f4-a694-48d2-8d73-84496697571c
  45.          offset: 48M
  46.          size: 944M
  47.          status: active

到这一步,我们的存储节点虚拟机就基本创建完成了。

1.     搭建Exadata数据库服务器虚拟机

1)     安装OEL 5.7

这里我们直接使用之前克隆的一台虚拟机做为数据库服务器的虚拟机,修改相应配置,这里也是需要选择开发的安装包,如果没有也可以直接通过oracle-validated来配置,虚拟机的内存最好也相应调大一点。

2)     修改静态IP地址及安装oracle-validated

点击(此处)折叠或打开

  1. [root@db ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

  2. # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)

  3. DEVICE=eth0
  4. BOOTPROTO=none
  5. HWADDR=00:0C:29:2B:82:02
  6. ONBOOT=yes
  7. NETMASK=255.255.255.0
  8. IPADDR=192.168.56.102
  9. GATEWAY=192.168.56.1
  10. TYPE=Ethernet
  11. USERCTL=no
  12. IPV6INIT=no
  13. PEERDNS=yes

  14. [root@db yum.repos.d]# yum -y install oracle-validated

安装完成后就会把所有Oracle需要的rpm包并且默认创建好所有用户组和用户,但无GRID用户,需要另外创建。

同时建议关闭SELinux,在/etc/selinux/config中将SELINUX=disabled,重启操作系统就能关闭SELinux,或者使用命令echo 0 >/selinux/enforce关闭SELinux。

点击(此处)折叠或打开

  1. [root@db yum.repos.d]# echo 0 >/selinux/enforce
  2. [root@db yum.repos.d]# cat /etc/selinux/config
  3. # This file controls the state of SELinux on the system.
  4. # SELINUX= can take one of these three values:
  5. # enforcing - SELinux security policy is enforced.
  6. # permissive - SELinux prints warnings instead of enforcing.
  7. # disabled - SELinux is fully disabled.
  8. SELINUX=disabled
  9. # SELINUXTYPE= type of policy in use. Possible values are:
  10. # targeted - Only targeted network daemons are protected.
  11. # strict - Full SELinux protection.
  12. SELINUXTYPE=targeted
1)     创建Exadata所需的配置文件

Cellinit.ora,此文件中填入数据库节点的IP地址和子网掩码:

Cellip.ora,此文件填入存储节点的IP地址:

点击(此处)折叠或打开

  1. [root@db u01]# mkdir -p /etc/oracle/cell/network-config
  2. [root@db u01]# chown -R grid:oinstall /etc/oracle/cell/network-config/
  3. [root@db u01]# vi /etc/oracle/cell/network-config/cellinit.ora
  4. [root@db u01]# cat /etc/oracle/cell/network-config/cellinit.ora
  5. ipaddress1=192.168.56.102/24
  6. [root@db u01]# vi /etc/oracle/cell/network-config/cellip.ora
  7. [root@db u01]# cat /etc/oracle/cell/network-config/cellip.ora
  8. cell="192.168.56.101"
2)     开始安装

这里由于内存不充足,所以只是搭建了Standalone Server的服务器,Exadata并不是强制要求安装RAC,如果内存充足可以搭建RAC,步骤都是和非Exadata的差不多,下面我只把有区别的部分截出来。


ASM这一步可以看到CellGriddisk了,这些以o/开头的ASM磁盘就是Exadata

 Cell端创建的griddisk

         如果没有找到griddisk,也可以手工修改ASM_DISKSTRING到“o/cellip地址/*”。如:“o/192.168.56.101/data*”。

         最后就按照标准的流程来安装Oracle Database,这样模拟的Exadata虚拟环境就搭建完成了。

(三)       报错问题

 

1.     ORA-56865

问题:

安装GI到最后一步ASMCA启动asm资源时失败,报错ORA-56865错误地址的CLELLINIT.ORA文件

 

日志:

点击(此处)折叠或打开

  1. INFO: Read: Configuring ASM failed with the following message:
  2. INFO: Read: Configuring HA resource failed. The following error occured:
  3. INFO: Read: PRCR-1079 : Failed to start resource ora.asm
  4. INFO: Read: CRS-5017: The resource action "ora.asm start" encountered the following error:
  5. INFO: Read: ORA-56865: Invalid IP address in CELLINIT.ORA
  6. INFO: Read: . For details refer to "(:CLSN00107:)" in "/u01/app/grid/product/11.2.0/grid/log/db/agent/ohasd/oraagent_grid/oraagent_grid.log".
  7. INFO: Read:
  8. INFO: Read: CRS-2674: Start of 'ora.asm' on 'db' failed

  9. ERROR: diskgroup DATA1 was not created
  10. ORA-15018: diskgroup cannot be created
  11. ORA-15072: command requires at least 2 regular failure groups, discovered only 1

解决:

检查CELLINIT.ORA文件,对比文档是否有差异

[oracle@db ~]$ cat /etc/oracle/cell/network-config/cellinit.ora

ipaddress1=192.168.56.102/24

无差异,后面改用DB介质为11.2.0.3之后就没有出现这个报错了。


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29123031/viewspace-2122244/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29123031/viewspace-2122244/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值