Dell PowerEdge Systems Oracle 11g R2 Database on Enterprise Linux x86_64 Getting Started Guide
Notes, Cautions, and Warnings NOTE: A NOTE indicates important information that helps you make better use of your computer. CAUTION: A CAUTION indicates potential damage to hardware or loss of data if instructions are not followed. WARNING: A WARNING indicates a potential for property damage, personal injury, or death. _______________ Information in this publication is subject to change without notice. © 2011 Dell Inc. All rights reserved.
Contents 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . Before You Begin . . . . . . . . . . . . . . . . . . . . . 5 Hardware Requirements . . . . . . . . . . . . . . . 5 Network Requirements . . . . . . . . . . . . . . . . 6 . . . . . . . . . . 6 . . . . . . . . . . . . . . . 7 Operating System Requirements . 2 5 Preparing Nodes for Oracle Installation . Attaching to RHN/ULN Repository . . . . . . . . . . . . . 7 Installing the Dell Validated RPM . . . . . . . . . .
3 Preparing Shared Storage for Oracle RAC Installation . . . . . . . . . . . . . . . . . . . . . . . 19 Partitioning the Shared Disk . . . . . . . . . . . . . . . Adjusting the Stripe Element Size on a Primary Partition . . . . . . . . . . . . . . . . . . 23 Installing and Configuring ASMlib . . . . . . . . . . . 25 Using ASMLib to Mark the Shared Disks as Candidate Disks . . . . . . . . . . . . 4 . . . . . 25 . . . . . . . . . . . . . 29 . . . . . . . . . . . . . . . . . . . .
Overview This document applies to Oracle Database 11g R2 running on Red Hat Enterprise Linux 5.x AS x86_64 or Oracle Enterprise Linux 5.x AS x86_64. Before You Begin Hardware Requirements • Oracle requires 1.5 gigabytes (GB) of physical memory. • Swap space must be equal to the amount of RAM allocated to the system. • Oracle's temporary space (/tmp) must be at least 1 GB in size. • A monitor that supports resolution of 1024 x 768 to correctly display the Oracle Universal Installer (OUI).
Network Requirements • It is recommended that you ensure each node contains at least three network interface cards (NICs). One NIC for public network and two NICs for private network to ensure high availability of the Oracle Real Application Clusters (RAC). • Public and private interface names must be the same on all nodes. For example, if eth0 is used as the public interface on node one, all other nodes require eth0 as the public interface.
Preparing Nodes for Oracle Installation Attaching to RHN/ULN Repository NOTE: The documentation provided below discusses how to set up a local yum repository using your operating system installation media. If you would like to connect to the Red Hat Network (RHN)/Unbreakable Linux Netwrok (ULN) channels, see the appropriate documentation. For Red Hat, see redhat.com/red_hat_network. For information relating to ULN network, see linux.oracle.com.
2 To install and configure the http daemon, configure the machine that will host the repository for all other machines to use the DVD image locally. Create the file /etc/yum.repos.d/local.
The following is an example of the configuration using the RHEL 5.x Server media in the configuration file /etc/yum.repos.d/myRepo.repo [myRepo] name=RHEL5.5 DVD baseurl= http://reposerver.mydomain.com/RHEL5_5/Server enabled=1 gpgcheck=0 NOTE: Replace reposerver.mydomain.com with your server's DNS name or IP address.
4 Untar the Dell-Oracle-Deployment release using the command: # tar -xvf Dell-Oracle-Deployment-o-y-m.tar NOTE: Where, o is the operating system version, y is the year, and m is the month of the tar release.
3 To go to your working directory, type the following command: # cd 4 To Untar the Dell-Oracle-Deployment release type the following command: # tar -xvf Dell-Oracle-Deployment-o-y-m.tar NOTE: Where, o is the operating system version, y is the year, and m is the month of the tar release.
Setting up the Network Public Network NOTE: Ensure that the public IP address is a valid and routable IP address. To configure the public network on each node: 1 Log in as root. 2 Edit the network device file /etc/sysconfig/network-scripts/ifcfg-eth# where # is the number of the network device: NOTE: Ensure that the Gateway address is configured for the public network interface. If the Gateway address is not configured, the Oracle Grid installation may fail.
Private Network NOTE: Each of the two NIC ports for the private network must be on separate PCI buses. The grid infrastructure of Oracle 11gR2 (11.2.0.2) supports IP failover natively using a newly introduced feature known as Redundant Interconnect. Oracle uses its ora.cluster_interconnect.haip resource to communicate with Oracle RAC, Oracle ASM, and other related services. The Highly Available Internet Protocol (HAIP) has the ability to activate a maximum of four private interconnect connections.
DEVICE=eth2 HWADDR=00:1E:C9:4B:71:24 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.0.141 NETMASK=255.255.255.0 2 Once you have saved both the configuration files, restart your network service using service network restart. The completion of the steps above have now prepared your system to enable HAIP using the Oracle Grid Infrastructure installer.
TX packets:4270790 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3037449975 (2.8 GiB) bytes:2705797005 (2.5 GiB) eth1:1 Link encap:Ethernet 00:1E:C9:4B:72:22 TX HWaddr inet addr:169.254.167.163 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth2 Link encap:Ethernet 00:1E:C9:4B:71:24 HWaddr inet addr:192.168.0.141 Bcast:192.168.0.255 Mask:255.255.255.
eth2:1 Link encap:Ethernet 00:1E:C9:4B:71:24 HWaddr inet addr:169.254.167.164 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 For more information on Redundant Interconnect and ora.cluster_interconnect.haip, see metalink note: 1210883.1 at support.oracle.com. IP Address and Name Resolution Requirements The steps below show how to set up your cluster nodes for using Domain Name System (DNS).
Table 2-1 describes the different interfaces, IP address settings and the resolutions in a cluster. Table 2-1. Cluster Requirements for DNS Interface Type Resolution Public Static DNS Private Static Not required Node virtual IP Static DNS SCAN virtual IP Static DNS Configuring a DNS Server To configure changes on a DNS server for an Oracle 11g R2 cluster using a DNS (without GNS): 1 Configure SCAN NAME resolution on DNS server.
Configuring a DNS Client To configure the changes required on the cluster nodes for name resolution: 1 Configure the resolv.conf on all the nodes in the cluster to contain name server entries that are resolvable to the appropriate DNS server. Provide an entry similar to the following: /etc/resolv.conf: search ns1.domainserver.com nameserver 192.0.2.100 Where, 192.0.2.100 is a valid DNS server address in your network and ns1.domainserver.com is the domain server in your network.
Preparing Shared Storage for Oracle RAC Installation NOTE: In this section, the terms disk(s), volume(s), virtual disk(s), LUN(s) mean the same and are used interchangeably, unless specified otherwise. Similarly, the terms Stripe Element Size and Segment Size both can be used interchangeably. Oracle RAC requires shared LUNs for storing your Oracle Cluster Registry (OCR), voting disks, Oracle Home using ACFS, Oracle Database files, and Flash Recovery Area (FRA).
Partitioning the Shared Disk This section describes how to use Linux’s native partition utility fdisk to create and align a single partition on a volume/virtual disk that spans the entire disk. CAUTION: In a system running the Linux operating system, align the disk prior to being written to the Volume/Virtual Disk (VD). Failure to do so will cause all data on the disk to be destroyed.
d First sector (63-xxxxxx, default 63): Where the Stripe Element Size(SES) or the Segment Size (SS) is the amount of disk space that is consumed on a single physical disk by a Stripe Element as part of Stripe. For example, a stripe that contains 256 KB of disk space and has 64 KB of data residing on each disk in the stripe. Here the stripe element size is 64 KB and the stripe size is 256 KB.
The system displays the following message: The partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks. If you get a warning message instead saying the kernel still reads the old partition table, then follow step 3 for the kernel to be able to re-read the new partition table. 2 Repeat step 1 for all the disks that need to be aligned.
Adjusting the Stripe Element Size on a Primary Partition To use the fdisk utility to adjust a disk partition, perform the following steps: NOTE: This article assumes that the disk to be aligned already contains a single primary partition. If you want to the create primary partition, follow the steps in "Partitioning the Shared Disk" on page 20. CAUTION: In a system running the Linux operating system, align the partition table before the data is written to the Volume.
e. Expert command (m for help): w # write NOTE: 128 blocks/64 KB is the default Stripe Element Size of EqualLogic PS Series and 256 blocks/256 KB is the default Stripe Element Size of the PowerVault MD 32xx/32xxi Line of storage arrays. 2 Repeat step 1 for all the disks that need to be aligned.
Installing and Configuring ASMlib 1 Use oracle.com/technetwork/server-storage/linux/downloads/rhel5084877.html to download the following files: • oracleasm-support • oracleasmlib • oracleasm NOTE: If your current OS distribution is Oracle Linux, you can obtain the software from the Unbreakable Linux Network using ULN. NOTE: Download the latest versions of oracleasm-support and oracleasmlib but the version of oracleasm must match the current kernel used in your system.
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y NOTE: In this setup the default user is set to grid and the default group is set to asmadmin. Ensure that the oracle user is part of the asmadmin group. You can do so by using the dell-validated and dell-oracle-utilities rpms. The boot time parameters of the Oracle ASM library are configured and a sequential text interface configuration method is displayed.
5 Verify the presence of the disks in the ASM library by running the following command as root: /usr/sbin/oracleasm listdisks All the instances of DISKNAME from the previous command(s) are displayed. To delete an ASM disk,run the following command: /usr/sbin/oracleasm deletedisk DISKNAME 6 To discover the Oracle ASM disks on other nodes in the cluster, run the following command on the remaining cluster nodes: /usr/sbin/oracleasm scandisks.
Preparing Shared Storage
Installing Oracle 11g R2 Grid Infrastructure This section gives you the installation information for Oracle 11g R2 grid infrastructure for a cluster. Before You Begin Before you install the Oracle 11g R2 RAC software on your system: • Ensure that you have already configured your operating system, network, and storage based on the steps from the previous sections within this document. • Locate your Oracle 11g R2 media kit.
Configuring Node One The following steps are for node one of your cluster environment, unless otherwise specified. 1 Log in as root. 2 If you are not in a graphical environment, start the X Window System by typing: startx 3 Open a terminal window and type: xhost + 4 Mount the Oracle Grid Infrastructure media. 5 Log in as grid user, for example: su - grid.
12 In the Cluster Node Information window, click Add to add additional nodes that must be managed by the Oracle Grid Infrastructure. • Enter the public Hostname information • Enter the Virtual IP name • Repeat step 12 for each node within your cluster 13 Click SSH Connectivity and configure your passwordless SSH connectivity by entering the OS Password for the grid user and click Setup.
20 In the Privileged Operating Systems Groups window, select: • asmdba for Oracle ASM DBA (OSDBA for ASM) Group • asmoper for Oracle ASM Operator (OAOPER for ASM) Group • asmadmin for Oracle ASM Administrator (OSASM) Group 21 In the Installation Location window, specify the values of your Oracle Base and Software Location as configured within the Dell Oracle utilities RPM.
Configuring Shared Oracle Home for Database Binary Using ACFS The following steps are applicable for node one of your cluster environment, unless otherwise specified: 1 Log in as root and type: xhost + 2 Log in as grid user and run the asmca utility by typing: $/bin/asmca 3 In the ASM Configuration Assistant window, select the Disk Groups tab, click Create, and perform the following steps: • Enter a name of the disk group. For example, ORAHOME.
7 As root, run the acfs_script.sh mentioned in the RUN ACFS Script window. This automounts the new ACFS Home on all nodes. 8 Click Close to exit ACFS script window.
Installing Oracle 11g R2 Database (RDBMS) Software The following steps are for node one of your cluster environment, unless otherwise specified. 1 Log in as root and type: xhost +. 2 Mount the Oracle Database 11g R2 media. 3 Log out as root user and log in as Oracle user by typing: su - oracle 4 Run the installer script from your Oracle database media: /runInstaller 5 In the Configure Security Updates window, enter your My Oracle Support credentials to receive security updates, else click Next.
11 In the Installation Location window, • Specify the location of your Oracle Base configured within the Dell oracle utilities RPM. • Enter the ACFS shared Oracle home address for Software Location. NOTE: The default locations used within the Dell Oracle utilites RPM are as follows: • Oracle Base—/u01/app/oracle. • Software Location—/u01/app/oracle/product/11.2.0/db_1.
Creating Diskgroup Using ASM Configuration Assistant (ASMCA) This section contains procedures to create the ASM disk group for the database files and Flashback Recovery Area (FRA). 1 Log in as grid user. 2 Start the ASMCA utility by typing: $/bin/asmca 3 In the ASM Configuration Assistant window, select the Disk Groups tab. 4 Click Create. 5 Enter the appropriate Disk Group Name, for example: DBDG. 6 Select External for Redundancy.
Diskgroup Creation Using ASMCA
Creating Database Using DBCA The following steps are applicable for node one of your cluster environment, unless otherwise specified: 1 Log in as oracle user. 2 From $, run the DBCA utility by typing: $/bin/dbca & 3 In the Welcome window, select Oracle Real Application Cluster Database and click Next. 4 In the Operations window, select Create Database, and click Next. 5 In the Database Templates window, select Custom Database, and click Next.
10 In the Recovery Configuration window: a Select Specify Flash Recovery Area. b Browse and select the ASM disk group that you created for Flash Recovery Area. c Enter a value for Flash Recovery Area Size. d Select Enable Archiving. e Click Next. 11 In the Database Content window, click Next. 12 In the Initialization Parameters window: • Select Custom. • For the Memory Management section, select Automatic Shared Memory Management. • Specify appropriate values for the SGA Size and PGA Size.
Dell PowerEdge 系统 Enterprise Linux x86_64 上的 Oracle 11g R2 Database 使用入门指南
注、小心和警告 注:“注”表示可以帮助您更好地使用计算机的重要信息。 小心:“小心”表示如果不遵循说明,就有可能损坏硬件或导致数据 丢失。 警告: “警告”表示可能会导致财产损失、人身伤害甚至死亡。 _______________ 本出版物中的信息如有更改,恕不另行通知。 © 2011 Dell Inc. 版权所有,翻印必究。 未经 Dell Inc. 书面许可,严禁以任何形式复制这些材料。 本文中使用的商标:Dell™、 DELL 徽标、 PowerEdge™ 是 Dell Inc. 的商标。 Red Hat® 和 Red Hat® Enterprise Linux® 是 Red Hat, Inc. 在美国和 / 或其它国家 / 地区的注册商标。 Novell® 和 SUSE™ 分别是 Novell Inc. 在美国和其它国家 / 地区的注册商标和商标。 Oracle® 是 Oracle Corporation 和 / 或其子公司的注册商标。 本出版物中述及的其它商标和商品名称是指拥有相应商标和商品名称的公司或其产品。 Dell Inc.
目录 1 概览 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 开始之前 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 网络要求 . . . . . . . . . . . . . . . . . . . . . . 46 . . . . . . . . . . . . . . . . . . . 准备节点用于 Oracle 安装 46 . . . . . . . . . . . 47 连接到 RHN/ULN 存储库 . . . . . . . . . . . . . . . . 47 安装经 Dell 认证的 RPM . . . . . . . . . . . . . . . . 49 安装 Dell Oracle 公用程序 RPM . . . . . . . . . . . . 50 . . . . . . . . . . . . . 51 .
4 安装 Oracle 11g R2 Grid Infrastructure . . . . . . . . 开始之前 . . . . . . . . . . . . . . 69 . . . . . . . . . . . . . . . . . . . . . . . . 69 配置所有节点的系统时钟设置 . 配置节点一 5 6 7 8 44 . . . . . . . . . 69 . . . . . . . . . . . . . . . . . . . . . . . 70 为使用 ACFS 的数据库二进制程 序配置共享的 Oracle 主目录 . . . . . . . . . 安装 Oracle 11g R2 Database (RDBMS) 软件 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 使用 ASM 配置助手 (ASMCA) 创建磁盘组 . . . . . . . . . . . . . . . 使用 DBCA 创建数据库 . 目录 73 . 75 . . . . . . .
概览 本说明文件适用于在 Red Hat Enterprise Linux 5.x AS x86_64 或 Oracle Enterprise Linux 5.x AS x86_64 上运行的 Oracle Database 11g R2。 开始之前 硬件要求 • Oracle 需要 1.5 GB 的物理内存。 • 交换空间必须等于分配给系统的 RAM 容量。 • Oracle 的临时空间 (/tmp) 大小必须至少为 1 GB。 • 支持 1024 x 768 分辨率以正确显示 Oracle Universal Installer (OUI) 的显 示器。 • 有关 Dell 支持的硬件配置,请参阅 dell.com/oracle 上针对每个 Dell Validated Component(经 Dell 验证的组件)的 Software Deliverable List(可提供的软件列表,SDL)。 表 1-1 说明了 Oracle 安装所需的磁盘空间。 表 1-1. 最低磁盘空间要求 软件安装位置 所需大小 Grid Infrastructure 主目录 4.
网络要求 • 建议确保每个节点至少包含三个网络接口卡 (NIC)。一个 NIC 用于公 用网络,两个 NIC 用于专用网络,以确保 Oracle Real Application Clusters (RAC) 的高可用性。 • 公用和专用接口名称在所有节点上都必须相同。例如,如果 eth0 用作 节点一上的公用接口,则所有其它节点均需要 eth0 作为公用接口。 • 每个节点的所有公用接口都应能够与群集内的所有节点通信。 • 每个节点的所有专用接口都应能够与群集内的所有节点通信。 • 每个节点的主机名都必须遵循 RFC 952 标准 (www.ietf.org/rfc/rfc952.txt)。主机名不允许包含下划线(“_”)。 • 群集中的每个节点均需要以下 IP 地址: • 一个公用 IP 地址 • 两个专用 IP 地址 • 一个虚拟 IP 地址 • 三个用于群集的单客户端访问名称 (SCAN) 地址 操作系统要求 • Red Hat Enterprise Linux 5.x AS x86_64 • Oracle Linux 5.
准备节点用于 Oracle 安装 连接到 RHN/ULN 存储库 注:下面提供的说明文件讨论如何使用操作系统安装介质设置本地 yum 存 储库。如果要连接到 Red Hat Network (RHN)/Unbreakable Linux Netwrok (ULN) 通道,请参阅相应的说明文件。有关 Red Hat,请参阅 redhat.com/red_hat_network。有关与 ULN 网络有关的信息,请参阅 linux.oracle.com。 建议的配置为通过 http 使用 Apache 服务器提供文件(软件包名称: httpd)。 本节讨论从本地文件系统存储器托管存储库文件。尽管存在托管存储库文件 的其它选项,但不属于本说明文件的范畴。强烈建议使用本地文件系统存储 器以加快和简化维护。 1 可使用物理介质或 ISO 映像加载 DVD 映像。 • 使用物理介质:将 DVD 插入服务器,即应自动加载至 /media 目录。 • 使用 ISO 映像:作为 root 用户运行以下命令,代替字段 myISO.
2 要安装和配置 http 守护程序,配置将托管所有其它计算机的存储库以 本地使用 DVD 映像的计算机。创建文件 /etc/yum.repos.d/local.
• 最后一步是收集将托管存储库的服务器的 DNS 名称或 IP。托管服 务器的 DNS 名称或 IP 将用于在客户端服务器上配置 yum 存储库 repo 文件。下面是在配置文件中使用 RHEL 5.x Server 介质的配置 示例 /etc/yum.repos.d/myRepo.repo [myRepo] name=RHEL5.5 DVD baseurl= http://reposerver.mydomain.com/RHEL5_5/Server enabled=1 gpgcheck=0 注:使用服务器的 DNS 名称或 IP 地址替换 reposerver.mydomain.
4 使用以下命令解压缩 Dell-Oracle-Deployment 发行包: # tar -xvf Dell-Oracle-Deployment-o-y-m.tar 注:其中,o 是操作系统版本,y 是年份,而 m 是 tar 的发行月份。 5 将目录更改为 Dell-Oracle-Deployment-o-y-m 6 使用以下命令将经 Dell 认证的 RPM 软件包安装在所有群集节点上: # yum localinstall dell-validated* --nogpgcheck 安装 Dell Oracle 公用程序 RPM Dell Oracle 公用程序 RPM 旨在进行以下 Dell 和 Oracle 建议的设置: • 创建 Grid Infrastructure 目录,设置所有权和权限。 • 创建网格用户。 • 创建 Oracle 数据库 (RDBMS) 目录,设置所有权和权限。 • 创建 Oracle base 目录,设置所有权和权限。 • 设置 pam 限制在 (/etc/pam.
5 将目录更改为 Dell-Oracle-Deployment-o-y-m 6 要在所有群集节点上安装 Dell Oracle 公用程序 RPM 软件包,请键入以 下命令: # yum localinstall dell-oracle-utilities* --nogpgcheck 7 安装 rpm 后,运行 dodeploy 脚本按如下所示设置环境:# dodeploy -g -r 11gR2 有关 Dell Oracle 公用程序 RPM 及其选项的详情,请使用以下命令检查 手册页:# man 8 dodeploy 注:Dell-Oracle-Deplyoment tar 包含可提供的软件列表 (SDL) 中提供的 最新支持驱动程序。请查看 Dell-Oracle-Deployment tar 内包含的自述 文件,获取最新驱动程序的安装说明。 Oracle 软件二进制位置 Oracle 软件二进制文件应位于群集的节点一上。请特别注意,通过 Oracle 11g R2 (11.2.0.
设置网络 公用网络 注:确保公用 IP 地址是有效且可路由的 IP 地址。 要在每个节点上配置公用网络,请执行以下步骤: 1 作为 root 登录。 2 编辑网络设备文件 /etc/sysconfig/network-scripts/ifcfg-eth#,其中 # 是 网络设备的编号: 注:确保已配置公用网络接口的网关地址。如果没有配置网关地址, Oracle Grid 安装可能会失败。 DEVICE=eth0 ONBOOT=yes IPADDR=< 公用 IP 地址 > NETMASK=< 子网掩码 > BOOTPROTO=static HWADDR= SLAVE=no GATEWAY=< 网关地址 > 3 编辑 /etc/sysconfig/network 文件,如果有必要,使用合格的公用节点名 称替换 localhost.localdomain。例如,节点 1 的命令将为:hostname= node1.domain.
专用网络 注:专用网络的两个 NIC 端口必须分别位于不同的 PCI 总线上。 Oracle 11gR2 (11.2.0.2) Grid Infrastructure 通过称为 Redundant Interconnect (冗余互连)的新引入功能支持本地 IP 故障转移。Oracle 使用其 ora.cluster_interconnect.haip 资源与 Oracle RAC、Oracle ASM 和其它相关 服务通信。高度可用互联网协议 (HAIP) 能够激活最多四个专用互连连接。 这些专用网络适配器可在 Oracle Grid 初始安装过程中或安装过程后使用 oifcfg 公用程序配置。 Oracle Grid 当前使用 HAIP 的 169.254.*.
2 保存两个配置文件后,使用 service network restart 重新启动 网络服务。 完成上述步骤后,您的系统即准备好使用 Oracle Grid Infrastructure 安 装程序启用 HAIP。完成所有 Oracle 前提条件并准备好安装 Oracle 时, 您将需要在 “Network Interface Usage (网络接口使用)”屏幕中选择 eth1 和 eth2 作为 “private (专用)”接口。 一旦 Oracle Grid Infrastructure 已成功完成并运行时,此步骤即可启用 冗余互连。 3 要验证使用 HAIP 的冗余互连是否正在运行,可使用 ifconfig 命令测试 此功能。输出示例如下所列。 ifconfig eth1 Link encap:Ethernet 00:1E:C9:4B:72:22 HWaddr inet addr:192.168.0.140 Bcast:192.168.0.255 Mask:255.255.255.
eth1:1 Link encap:Ethernet 00:1E:C9:4B:72:22 HWaddr inet addr:169.254.167.163 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth2 Link encap:Ethernet 00:1E:C9:4B:71:24 HWaddr inet addr:192.168.0.141 Bcast:192.168.0.255 Mask:255.255.255.
IP 地址和名称解析要求 下面的步骤介绍如何设置群集节点以便使用域名系统 (DNS)。有关如何使 用 GNS 设置群集节点的信息,请参阅 Wiki 文章 http://en.community.dell.com/dellgroups/enterprise_solutions/w/oracle_solutions/1416.aspx。 对于使用 DNS 的群集 使用 Oracle DNS(不带 GNS)设置 Oracle 11g R2 RAC: 1 每个节点中至少配置两个接口,一个用于专用 IP 地址,一个用于公用 IP 地址。 2 在 DNS 上配置 SCAN NAME 用于三个地址 (建议)或至少一个地址 的 DNS 循环解析。 SCAN 地址必须与虚拟 IP 地址和公用 IP 地址位于 同一子网。 注:为了获得高可用性和可扩展性,建议您将 SCAN 配置为使用三个 IP 地址的循环解析。SCAN 的名称不能以数字开头。要使安装成功, SCAN 必须解析至少一个地址。 表 2-1 介绍了不同的接口、IP 地址设置和群集中的解析。 表 2-1.
配置 DNS 服务器 为使用 DNS(不带 GNS)的 Oracle 11g R2 群集配置 DNS 服务器中的 更改: 1 配置 DNS 服务器中的 SCAN NAME 解析。 在 DNS 服务器上使用循环策略配置的 SCAN NAME 应解析为三个公 用 IP 地址 (建议),而最低要求是一个公用 IP 地址。 例如: scancluster IN A 192.0.2.1 IN A 192.0.2.2 IN A 192.0.2.3 其中 scancluster 是 Oracle Grid 安装期间提供的 SCAN NAME。 注:SCAN IP 地址必须可路由并且处于公用范围内。 配置 DNS 客户端 在群集节点上配置进行名称解析所需的更改: 1 在群集中的所有节点上配置 resolv.conf,以包含相应 DNS 服务器可解 析的名称服务器条目。提供类似如下的条目: /etc/resolv.conf: search ns1.domainserver.com nameserver 192.0.2.100 其中, 192.0.2.100 是网络中有效的 DNS 服务器地址, 而 ns1.
准备节点用于 Oracle 安装
为 Oracle RAC 安装准备共享存储 注:在本节中,除非另有说明,否则术语磁盘、卷、虚拟磁盘、LUN 均具 有相同意义且可互换使用。同样,术语“条带元素大小”和“分段大小” 也可互换使用。 Oracle RAC 需要共享 LUN,用于存储 Oracle 群集注册表 (OCR)、投票 磁盘、使用 ACFS 的 Oracle 主目录、Oracle 数据库文件和快擦写恢复区域 (FRA)。为确保 Oracle RAC 的高可用性,建议您具有: • 三个共享 LUN,每个 LUN 大小为 1 GB 用于普通冗余,或者五个 LUN 用于 Oracle 群集件的高度冗余。 • 至少两个共享磁盘用于存储数据库。每个共享磁盘均应具有相同的磁 盘速率和大小。 • 至少两个共享 LUN 用于存储自动存储管理群集文件系统 (ACFS)。 每个共享磁盘必须至少为 10 GB,总大小为 20 GB。 • 至少两个共享 LUN 或卷用于存储 FRA。理想情况下,FRA 空间应足够 大以复制所有 Oracle 数据文件和增量备份。有关最佳确定 FRA 大小的 详情,请参阅“我的 Oracle 支持 ID 305648.
对共享磁盘进行分区 本节说明如何使用 Linux 的本机分区公用程序 fdisk 在跨越整个磁盘的卷 / 虚拟磁盘上创建和对齐单个分区。 小心:在运行 Linux 操作系统的系统上,先对齐磁盘,再将磁盘写入卷 / 虚拟磁盘 (VD)。否则将导致磁盘上的所有数据损坏。 要使用 fdisk 公用程序创建分区并设置对齐,请执行以下操作: 1 在命令提示符下,键入以下命令之一: • #> fdisk – u /dev/< 块 _ 设备 > • fdisk – u /dev/mapper/< 多路径 _ 磁盘 > 其中, < 块 _ 设备 > 是您将在其上创建并对齐分区的块设备的名称。 例如,如果块设备为 /dev/sdb,则键入:fdisk – ul /dev/sdb 如果使用的是指向共享磁盘的多个路径,并且设备映射程序为多路径 软件,系统将显示以下信息: The number of cylinders for this disk is set to 8782.
使用以下公式设置上述值: 扇区中的条带元素大小 = 条带元素大小 (KB) * 2 第一扇区 = 扇区中的 条带元素大小 注:上述公式假设 1 扇区 = 512 字节或 0.
4 确认通过运行以下命令之一已对齐分区: • #> fdisk – ul /dev/< 块 _ 设备 > • #> fdisk – ul /dev/mapper/< 多路径 _ 设备 > 其中, < 块 _ 设备 > 或 < 多路径 _ 设备 > 是其分区已对齐的磁盘的 名称。 以下示例是上述命令在已对齐的块设备上的示例输出。如果您的分区 已正确对齐,则将看到在步骤 1 中设置的所需起始扇区位于您分区的 “Start (开始)”列下。 Disk /dev/mapper/mpath70: 53.
在主分区上调整条带元素大小 要使用 fdisk 公用程序调整磁盘分区,请执行以下步骤: 注:本文假定要对齐的磁盘已包含单个主分区。如果要创建主分区,请遵 循第 60 页上的“对共享磁盘进行分区”中的步骤。 小心:在运行 Linux 操作系统的系统中,请在将数据写入到卷之前对齐分 区表。未遵循预防措施可能导致卷上的所有数据损坏。 在命令提示符下键入: 1 #> fdisk -u /dev/< 块 _ 设备 > 其中 < 块 _ 设备 > 是您要调整的块设备的名称。例如,如果块设备为 /dev/mapper/db,则键入: fdisk /dev/mapper/db。 系统会显示以下信息: The number of cylinders for this disk is set to 8782.
c.Partition number (1-4): 1 # The partition number to be aligned (Partition number [1-4]: 1 # 要对齐的 分区编号) d.New beginning of data (128-xxxxx, default 128): 128 注:1 区块 = 512 字节; 128 区块 * 512 字节 = 64KB e.
安装和配置 ASMlib 1 通过 oracle.com/technetwork/server-storage/linux/downloads/ rhel5-084877.
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y (引导时修复 Oracle ASM 磁盘的权限 (y/n) [y]:y) 注:在此设置中,默认用户设置为 grid,默认组设置为 asmadmin。 确保 oracle 用户属于 asmadmin 组。使用经 Dell 认证的 dell oracle 公用 程序 rpm 可执行此操作。 Oracle ASM 库的引导时间参数已配置,并显示顺序文本接口配置 方法。 2 设置 /etc/sysconfig/oracleasm 中的 ORACLEASM_SCANORDER 参数 注:将 ORACELASM_SCANORDER 设置为一个值时,指定与您的设备映 射程序虚拟设备名称相关联的常用字符串。 例如,如果所有设备映射程序设备的前缀字符串中都有词 "asm" (/dev/mapper/asm-ocr1、/dev/mapper/asm-ocr2),则填充 ORACLEASM_SCANORDER 参数为:ORACLEASM_SCANORDER="asm"。 这将确保 oracleasm 会先扫描这些磁
5 作为 root 用户运行以下命令,验证 ASM 库中是否存在磁盘: /usr/sbin/oracleasm listdisks 将显示以前命令中的 DISKNAME 的所有实例。 要删除 ASM 磁盘,请运行以下命令: /usr/sbin/oracleasm deletedisk DISKNAME 6 要查找群集中其它节点上的 Oracle ASM 磁盘,请在剩余群集节点上运 行以下命令:/usr/sbin/oracleasm scandisks。 为 Oracle RAC 安装准备共享存储 67
为 Oracle RAC 安装准备共享存储
安装 Oracle 11g R2 Grid Infrastructure 本节为您提供有关群集的 Oracle 11g R2 Grid Infrastructure 的安装信息。 开始之前 在系统上安装 Oracle 11g R2 RAC 软件之前: • 请确保已根据本说明文件内前面小节中的步骤配置您的操作系统、 网络和存储设备。 • 找到您的 Oracle 11g R2 介质套件。 配置所有节点的系统时钟设置 为避免在安装过程中出现故障,请为所有节点配置完全相同的系统时钟 设置。将节点系统时钟与 Oracle 11g R2 中内置的群集时间同步服务 (CTSS) 同步。要启用 CTSS,请依次使用以下命令禁用操作系统网络时间协议守护 程序 (ntpd) 服务: 1 service ntpd stop 2 chkconfig ntpd off 3 mv /etc/ntp.conf /etc/ntp.conf.orig 4 rm /var/run/ntpd.
配置节点一 除非另有说明,否则以下步骤适用于群集环境的节点一。 1 作为 root 登录。 2 如果您不在图形环境中,则键入以下命令启动 X Window 系统: startx 3 打开终端窗口,然后键入:xhost + 4 装入 Oracle Grid Infrastructure 介质。 5 作为 grid 用户登录,例如:su - grid。 6 键入以下命令以启动 Oracle Universal Installer: /runInstaller 7 在 Download Software Updates (下载软件更新)窗口,输入 My Oracle Support (我的 Oracle 支持)凭据以下载最新增补更新。如果 您选择不下载最新增补更新,则选择 Skip software updates (跳过软件 更新)。 8 在 Select Installation Option (选择安装选项)窗口中,选择 Install and Configure Grid Infrastructure for a Cluster (安装并配置群集的 Grid Infrastru
12 在 Cluster Node Information (群集节点信息)窗口中,单击 Add (添加)以添加必须由 Oracle Grid Infrastructure 管理的额外节点。 • 输入公用 Hostname (主机名)信息 • 输入 Virtual IP name (虚拟 IP 名称) • 对群集内的每个节点重复步骤 12 13 单击 SSH Connectivity (SSH 连接),为网格用户输入 OS Password (操作系统密码)并单击 Setup (设置),配置无密码的 SSH 连接。 注:经 Dell 认证的 Dell Oracle 公用程序 RPM 为网格用户及 Oracle 用户 设置的默认密码均为“oracle”。 14 单击 Ok (确定),然后单击 Next (下一步)转至下一个窗口。 15 在 Network Interface Usage (网络接口使用情况)窗口中,确保为接 口名称选定正确的接口类型。从 Interface Type (接口类型)下拉列 表中,选择所需的接口类型。可用的选项为 Private (专用)、 Public (公用)和 D
19 在 Failure Isolation Support (故障隔离支持)窗口中,选择 Do Not use Intelligent Platform Management Interface (IPMI) (请勿使用智能 平台管理接口 [IPMI])。 有关启用 IPMI 的信息,请参阅 Wiki 文章: http://en.community.dell.com/dellgroups/enterprise_solutions/w/oracle_solutions/1414.
为使用 ACFS 的数据库二进制程 序配置共享的 Oracle 主目录 除非另有说明,否则以下步骤适用于群集环境的节点一: 1 作为 root 用户登录并键入:xhost + 2 作为 Grid 用户登录并通过键入以下命令运行 asmca 公用程序: $/bin/asmca 3 在 ASM Configuration Assistant (ASM 配置助手)窗口中,选择 Disk Groups (磁盘组)选项卡,单击 Create (创建)并执行以下步骤: • 输入磁盘组的名称。例如, ORAHOME。 • 选择 External Redundancy (外部冗余),然后选择要用于共享数 据库主目录的 ASM stamped disk (ASM 标记磁盘)。 注:如果未显示任何候选磁盘,则单击 Change Discovery Path(更改发 现路径)并输入 ORCL:* or /dev/oracleasm/disks/* 注:确保已标记 Oracle ASM 磁盘。有关详情,请参阅第 65 页上的 “使用 ASMLib 将共享磁盘标记为候选磁盘”。 4 单击 Ok (确定)。 5
7 作为 root 用户,运行 RUN ACFS Script (运行 ACFS 脚本)窗口中提 到的 acfs_script.
安装 Oracle 11g R2 Database (RDBMS) 软件 除非另有说明,否则以下步骤适用于群集环境的节点一。 1 作为 root 用户登录并键入:xhost +。 2 安装 Oracle Database 11g R2 介质。 3 作为 root 用户注销,然后通过键入以下命令作为 Oracle 用户登录: su - oracle 4 运行 Oracle 数据库介质中的 installer 脚本: /runInstaller 5 在 Configure Security Updates (配置安全更新)窗口中,输入 My Oracle Support (我的 Oracle 支持)凭据以接收安全更新,否则请单 击 Next (下一步)。 6 在 Download Software Updates (下载软件更新)窗口中,输入 My Oracle Support (我的 Oracle 支持)凭据以下载初始发布后可用的增 补更新。如果您选择不在此时更新,可选择 Skip software updates (跳过软件更新)并单击 Next (下一步)。 7 在 Select Ins
9 在 Select Product Languages (选择产品语言)窗口中,将 Language Option (语言选项)选择为 English (英语),然后单击 Next (下一步)。 10 在 Select Database Edition (选择数据库版本)窗口中,选择 Enterprise Edition (企业版),然后单击 Next (下一步)。 11 在 Installation Location (安装位置)窗口中, • 指定在 Dell oracle 公用程序 RPM 内配置的 Oracle Base 的位置。 • 输入 ACFS 共享的 Oracle 主目录地址作为 Software Location (软件位置)。 注:Dell Oracle 公用程序 RPM 内使用的默认位置如下: •Oracle Base — /u01/app/oracle。 •Software Location (软件位置)— /u01/app/oracle/product/11.2.
使用 ASM 配置助手 (ASMCA) 创建 磁盘组 本节包含的步骤可创建用于数据库文件和回闪恢复区域 (FRA) 的 ASM 磁盘组。 1 作为 Grid 用户登录。 2 键入以下命令启动 ASMCA 公用程序: $/bin/asmca 3 在 ASM Configuration Assistant (ASM 配置助手)窗口中,选择 Disk Groups (磁盘组)选项卡。 4 单击 Create (创建)。 5 输入合适的 Disk Group Name (磁盘组名称),例如:DBDG。 6 为 Redundancy (冗余)选择 “External (外部)”。 7 选择合适的成员磁盘用于存储数据库文件,例如:ORCL:DB1、 ORCL:DB2.
使用 ASM 配置助手 (ASMCA) 创建磁盘组
使用 DBCA 创建数据库 除非另有说明,否则以下步骤适用于群集环境的节点一: 1 作为 oracle 用户登录。 2 通过键入以下命令从 $ 运行 DBCA 公用程序: $/bin/dbca & 3 在 Welcome (欢迎)窗口中,选择 Oracle Real Application Cluster Database (Oracle Real Application Cluster 数据库),然后单击 Next (下一步)。 4 在 Operations (操作)窗口中,选择 Create Database (创建数 据库),然后单击 Next (下一步)。 5 在 Database Templates (数据库模板)窗口中,选择 Custom Database (自定义数据库),然后单击 Next (下一步)。 6 在 Database Identification (数据库标识)窗口中: a 选择 Admin-Managed (管理员管理)作为 Configuration Type (配置类型)。 b 为 Global Database Na
9 在 Database File Location (数据库文件位置)窗口中,选择: • Automatic Storage Management (ASM) (自动存储管理 [ASM]) 作为 Storage Type (存储类型)。 • Use Oracle-Managed Files(使用 Oracle 管理的文件)作为 Storage Location (存储位置)。 • 浏览以选择您创建用于存储数据库文件 (DBDG) 的 ASM 磁盘组作 为 Database Area (数据库区域)。 10 在 Recovery Configuration (恢复配置)窗口中: a 选择 Specify Flash Recovery Area (指定快擦写恢复区域)。 b 浏览并选择您创建用于 Flash Recovery Area (快擦写恢复区域) 的 ASM 磁盘组。 c 输入 Flash Recovery Area Size (快擦写恢复区域大小)的值。 d 选择 Enable Archiving (启用存档)。 e 单击 Next (下一步)。 11 在 Databa
Systèmes Dell PowerEdge Installation d'Oracle 11g R2 Database sous Enterprise Linux x86_64 Guide de mise en route
Remarques, précautions et avertissements REMARQUE : une REMARQUE indique des informations importantes qui peuvent vous aider à mieux utiliser votre ordinateur. PRÉCAUTION : une PRÉCAUTION indique un risque de dommage matériel ou de perte de données en cas de non-respect des instructions. AVERTISSEMENT : un AVERTISSEMENT vous avertit d’un risque d'endommagement du matériel, de blessure corporelle ou même de mort.
Table des matières 1 Présentation . . . . . . . . . . . . . . . . . . . . . . Avant de commencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 88 . . . . . . . . . . . . . 88 Configuration réseau requise Configuration requise pour le système d'exploitation . 87 . . . . . . . . . . . . Configuration matérielle requise 2 87 Préparation des nœuds pour l'installation d'Oracle . . . . . . . . . . . . . . . . . . . . . . . . . 89 Connexion à la logithèque RHN ou ULN . . . . . . . . .
3 Préparation du stockage partagé pour l'installation d'Oracle RAC . . . . . . . . . Partitionnement du disque partagé . 103 . . . . . . . . . . 104 Réglage de la taille de l'élément de bande sur la partition principale . . . . . . . . . . . . . . Installation et configuration d'ASMlib . . . 107 . . . . . . . . 109 Utilisation d'ASMLib pour marquer les disques partagés comme disques candidats . . . . . . 4 . 110 . . . . . 113 . . . . . . . . . . . . . . . . .
7 Création d'un groupe de disques à l'aide d'ASM Configuration Assistant (ASMCA) . . . . . . . . . . . . . . . . . . . . . . . . 125 8 Création d'une base de données à l'aide de DBCA . . . . . . . . . . . . . . . . . .
Table des matières
Présentation Ce document s'applique à Oracle Database 11g R2 exécutée sous Red Hat Enterprise Linux 5.x AS x86_64 ou Oracle Enterprise Linux 5.x AS x86_64.
Configuration réseau requise • Il est recommandé d'attribuer au moins trois cartes d'interface réseau (NIC) à chaque nœud : une pour le réseau public et deux pour le réseau privé, de façon à assurer une haute disponibilité des clusters Oracle RAC (Real Application Clusters). • Les noms des interfaces publiques et privées doivent être les mêmes sur tous les nœuds.
Préparation des nœuds pour l'installation d'Oracle Connexion à la logithèque RHN ou ULN REMARQUE : la documentation ci-dessous explique comment configurer une logithèque yum locale à l'aide du support d'installation de votre système d'exploitation. Pour vous connecter aux canaux Red Hat Network (RHN) ou Unbreakable Linux Network (ULN), veuillez consulter la documentation correspondante : redhat.com/red_hat_network pour Red Hat et linux.oracle.com pour le réseau ULN.
2 Pour installer et configurer le démon http, veuillez configurer la machine qui hébergera la logithèque pour toutes les autres machines afin d'utiliser l'image de DVD en local. Créez le fichier /etc/yum.repos.d/local.
• L'étape finale est de rassembler le nom DNS ou l'adresse IP du serveur qui héberge la logithèque. Ils sont utilisés pour configurer le fichier repo de votre logithèque yum sur le serveur client. Voici un exemple de configuration utilisant le support de serveur RHEL 5.x dans le fichier de configuration /etc/yum.repos.d/myRepo.repo [myRepo] name=RHEL5.5 DVD baseurl= http://reposerver.mydomain.com/RHEL5_5/Server enabled=1 gpgcheck=0 REMARQUE : remplacez reposerver.mydomain.
3 Pour accéder à votre répertoire de travail, veuillez saisir la commande suivante : # cd 4 Décompressez la version Dell-Oracle-Deployment à l'aide de la commande suivante : # tar -xvf Dell-Oracle-Deployment-s-a-m.tar REMARQUE : s correspond à la version du système d'exploitation, a est l'année et m le mois de la version du fichier tar. 5 Remplacez le répertoire par Dell-Oracle-Deployment-s-a-m.
Le processus d'installation du progiciel Dell Oracle Utilities RPM est le suivant : 1 Téléchargez le plus récent fichier tar du déploiement Dell Oracle à partir de l'adresse suivante : http://en.community.dell.com/dellgroups/enterprise_solutions/m/oracle_db_gallery/default.aspx REMARQUE : le nom du fichier respecte la convention suivante : Dell-OracleDeployment-version SE-année-mois.tar. Par exemple : Dell-OracleDeployment-Lin-2011-07.
Emplacement des fichiers binaires du logiciel Oracle Les fichiers binaires du logiciel Oracle doivent être situés sur le nœud 1 de votre cluster. Il est important de noter qu'à partir d'Oracle 11g R2 (11.2.0.2), les ensembles de correctifs d'Oracle Database correspondent à une installation complète du logiciel Oracle. Pour plus d'informations sur la façon dont cela affecte les futurs déploiements d'Oracle, consultez l'article de My Oracle Support : 1189783.
3 Modifiez le fichier /etc/sysconfig/network. Le cas échéant, remplacez localhost.localdomain par le nom qualifié du nœud public. Par exemple, la commande pour le nœud 1 (node 1) sera : hostname= node1.domain.com 4 Tapez service network restart pour démarrer le service réseau. 5 Tapez ifconfig pour vérifier que les adresses IP sont configurées correctement.
L'exemple ci-dessous propose des instructions étape par étape sur l'activation de l'interconnexion redondante à l'aide du protocole HAIP sur une installation récente d'Oracle 11gR2 (11.2.0.2) Grid Infrastructure. 1 Modifiez le fichier /etc/sysconfig/network-scripts/ifcfg-ethX, où X correspond au numéro du périphérique eth ; les fichiers de configuration ifcfg-ethX des cartes réseau doivent servir pour votre interconnexion privée. Dans l'exemple suivant, eth1 et eth2 utilisent un sous-réseau 192.168.0.*.
3 Pour vérifier que votre interconnexion redondante utilisant le protocole HAIP fonctionne, vous pouvez tester cette fonction à l'aide de la commande ifconfig. Voici un exemple de résultat . ifconfig eth1 Link encap:Ethernet 00:1E:C9:4B:72:22 HWaddr inet addr:192.168.0.140 Bcast:192.168.0.255 Mask:255.255.255.
inet6 addr: fe80::216:3eff:fe11:1122/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6369306 errors:0 dropped:0 overruns:0 frame:0 TX packets:4270790 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3037449975 (2.8 GiB) bytes:2705797005 (2.5 GiB) eth2:1 Link encap:Ethernet 00:1E:C9:4B:71:24 TX HWaddr inet addr:169.254.167.164 Bcast:169.254.255.255 Mask:255.255.0.
Pour un cluster utilisant un système DNS Pour configurer Oracle 11g R2 RAC à l'aide d'Oracle DNS (sans GNS), procédez comme suit : 1 Configurez au moins deux interfaces sur chaque nœud, une pour l'adresse IP privée et une pour l'adresse IP publique. 2 Configurez un NOM SCAN sur le système DNS pour la résolution « round robin » (répétition alternée) vers trois adresses (recommandé) ou au moins une adresse.
Configuration d'un serveur DNS Pour configurer les modifications sur un serveur DNS pour un cluster Oracle 11g R2 avec un DNS (sans GNS) : 1 Configurez la résolution NOM SCAN sur le serveur DNS. Un NOM SCAN configuré sur le serveur DNS à l'aide de la stratégie « round robin » doit résoudre vers trois adresses IP publiques (recommandé). Un minimum d'une adresse IP est exigé. Par exemple : scancluster IN A 192.0.2.1 IN A 192.0.2.2 IN A 192.0.2.
2 Vérifiez l'ordre de la configuration. Le fichier /etc/nsswitch.conf gère l'ordre des services de noms. Dans certaines configurations, le NIS peut provoquer des incidents avec la résolution d'adresses Oracle SCAN. Il est recommandé de placer l'entrée NIS à la fin de la liste de recherche et de placer l'entrée dns en premier. Par exemple, hosts: dns files nis Lorsque vous avez modifié le fichier /etc/nsswitch.
Préparation des nœuds pour l'installation d'Oracle
Préparation du stockage partagé pour l'installation d'Oracle RAC REMARQUE : dans cette section, les termes disque(s), volume(s), disque(s) virtuel(s), LUN sont synonymes et interchangeables, sauf indication contraire. De même, les termes Taille de l'élément de bande et Taille du segment sont interchangeables. Oracle RAC nécessite des LUN partagés pour le stockage d'Oracle Cluster Registry (OCR), des disques de vote, d'Oracle Home à l'aide d'ACFS, des fichiers Oracle Database et de Flash Recovery Area (FRA).
Partitionnement du disque partagé Cette section explique comment utiliser l'utilitaire de partitionnement natif fdisk de Linux pour créer et aligner une partition unique sur un volume/disque virtuel qui s'étend sur le disque entier. PRÉCAUTION : sur un système exécutant le système d'exploitation Linux, alignez le disque avant qu'il ne soit inscrit sur le volume/disque virtuel. Sinon, toutes les données du disque risquent d'être détruites.
d First sector (63-xxxxxx, default 63): Stripe Element Size (SES, taille d'élément de bande) ou Segment Size (SS, taille de segment) correspond au volume d'espace disque consommé sur un disque physique unique par un élément de bande. Il s'agit par exemple d'une bande de 256 Ko d'espace disque, et 64 Ko de données sur chaque disque de la bande. Dans ce cas, la taille d'élément de bande est 64 Ko et la taille de bande 256 Ko.
Le système affiche le message suivant : The partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks. Si vous obtenez à la place un message d'avertissement indiquant que le noyau lit encore l'ancienne table de partition, veuillez suivre l'étape 3 afin que le noyau puisse lire de nouveau la nouvelle table de partition. 2 Répétez l'étape 1 pour tous les disques devant être alignés.
Réglage de la taille de l'élément de bande sur la partition principale Pour utiliser l'utilitaire fdisk pour régler une partition de disque, effectuez les étapes suivantes : REMARQUE : on suppose ici que le disque à aligner contient déjà une partition principale unique. Si vous souhaitez créer une partition principale, veuillez consulter les étapes de la section « Partitionnement du disque partagé », à la page 104.
c. Partition number (1-4): 1 # The partition number to be aligned d. New beginning of data (128-xxxxx, default 128): 128 REMARQUE : 1 bloc = 512 octets ; 128 blocs * 512 octets = 64 Ko e. Expert command (m for help): w # write REMARQUE : 128 blocs/64 Ko correspond à la taille d'élément de bande (Stripe Element Size) par défaut d'EqualLogic PS Series et 256 blocs/256 Ko correspond à la taille d'élément de bande par défaut de la gamme de matrices de stockage PowerVault MD 32xx/32xxi.
Units = sectors of 1 * 512 = 512 bytes DeviceBoot Start End Blocks /dev/mapper/mpat h70p1 128 104872319 52436096 Id Systèm 83 Linux 5 Veuillez redémarrer le système si votre partition nouvellement créée et alignée ne s'affiche pas. Installation et configuration d'ASMlib 1 Accédez à oracle.com/technetwork/server-storage/linux/downloads/ rhel5-084877.
Utilisation d'ASMLib pour marquer les disques partagés comme disques candidats 1 Pour configurer ASM, utilisez le script init fourni avec le progiciel oracleasm-support. La méthode recommandée consiste à exécuter la commande suivante en tant que root : # /usr/sbin/oracleasm configure -i REMARQUE : Oracle recommande l'utilisation de la commande oracleasm située sous /usr/sbin. Le chemin /etc/init.
3 Définissez le paramètre ORACLEASM_SCANEXCLUDE dans /etc/sysconfig/oracleasm afin d'exclure les périphériques non multiacheminement. Par exemple : ORACLEASM_SCANEXCLUDE= REMARQUE : pour être certain d'exclure les disques de chemin unique dans /dev/, comme sda et sdb, il est nécessaire de définir la chaîne ORACLEASM_SCANEXCLUDE comme suit : ORACLEASM_SCANEXCLUDE= "sda sdb".
Préparation du stockage partagé
Installation d'Oracle 11g R2 Grid Infrastructure La présente section contient les informations d'installation d'Oracle 11g R2 Grid Infrastructure pour un cluster. Avant de commencer Avant d'installer le logiciel Oracle 11g R2 RAC sur le système : • Vérifiez que vous avez configuré le système d'exploitation, le réseau et le stockage en suivant les étapes des sections précédentes de ce document. • Identifiez le kit de support d'Oracle 11g R2.
Configuration du nœud 1 Les étapes suivantes concernent le nœud 1 de votre environnement de cluster, sauf indication contraire. 1 Ouvrez une session en tant que root. 2 Si vous ne vous trouvez pas dans un environnement graphique, démarrez le système X Window en tapant : startx 3 Ouvrez une fenêtre de terminal et entrez : xhost + 4 Montez le support d'Oracle Grid Infrastructure. 5 Ouvrez une session en tant qu'utilisateur grid, par exemple : su - grid.
11 Dans la fenêtre Grid Plug and Play Information (Informations Plug and Play de la grille), entrez les informations suivantes : • Cluster Name (Nom du cluster) : entrez un nom pour votre cluster. • SCAN Name (Nom SCAN) : entrez le nom enregistré dans le serveur DNS ; il s'agit d'un nom unique pour la totalité du cluster. Pour plus d'informations sur la configuration du nom SCAN, consultez la section « Configuration requise pour l'adresse IP et la résolution de nom », à la page 98.
16 Dans la fenêtre Storage Option Information (Informations sur les options de stockage), sélectionnez Automatic Storage Management (ASM) (Gestion du stockage automatique) et cliquez sur Next (Suivant). 17 Dans la fenêtre Create ASM Disk Group (Créer un groupe de disques ASM), entrez les informations suivantes : • ASM diskgroup (Groupe de disques ASM) : entrez un nom, par exemple OCR_VOTE.
21 Dans la fenêtre Installation Location (Emplacement d'installation), indiquez les valeurs Oracle Base (Base Oracle) et Software Location (Emplacement du logiciel) selon la configuration de Dell Oracle Utilities RPM. REMARQUE : les emplacements par défaut utilisés dans Dell Oracle Utilites RPM sont les suivants : • Oracle Base - /u01/app/grid • Software Location - /u01/app/11.2.
Installation d'Oracle 11g R2 Grid Infrastructure
Configuration du répertoire racine Oracle partagé pour le fichier binaire de base de données à l'aide d'ACFS Les étapes suivantes concernent le nœud 1 de votre environnement de cluster, sauf indication contraire : 1 Ouvrez une session en tant qu'utilisateur root et tapez : xhost + 2 Ouvrez une session en tant qu'utilisateur grid et exécutez l'utilitaire asmca en tapant : $/bin/asmca 3 Dans la fenêtre ASM Configuration Assistant (Assistant de configuration ASM), sélectionnez l'onglet Disk Groups
6 Dans la fenêtre Create ACFS Hosted Database Home Volume (Créer un volume pour le répertoire racine de base de données hébergé par ACFS) : • Entrez le nom du volume (par exemple, ORAHOME). • Entrez le nom du point de montage pour le répertoire racine de base de données (par exemple, /u01/app/oracle/acfsorahome). • Entrez la taille du répertoire racine de base de données (Database Home Size) (au moins 20 Go).
Installation du logiciel Oracle 11g R2 Database (RDBMS) Les étapes suivantes concernent le nœud 1 de votre environnement de cluster, sauf indication contraire. 1 Ouvrez une session en tant qu'utilisateur root et tapez : xhost +. 2 Montez le support Oracle Database 11g R2.
8 Dans la fenêtre Grid Installation Option (Option d'installation de grille) : • Sélectionnez Oracle Real Application Clusters database installation (Installation de la base de données Oracle RAC) puis sélectionnez tous les nœuds en cliquant sur le bouton Select All (Tout sélectionner). • Cliquez sur SSH Connectivity (Connectivité SSH) et configurez votre connectivité SSH sans mot de passe en entrant le mot de passe du SE pour l'utilisateur oracle. Cliquez ensuite sur Setup (Configuration).
13 Dans la fenêtre Perform Prerequisite Checks (Effectuer des vérifications préalables), vérifiez le statut général de tous les prérequis. • Si l'un des prérequis échoue et affiche l'état Fixable (Réparable), cliquez sur le bouton Fix & Check Again (Réparer et vérifier de nouveau). • Exécutez le script runfixup.sh fourni par Oracle OUI. REMARQUE : si d'autres prérequis affichent l'état Error, répétez l'étape 13.
Installation du logiciel Oracle Database
Création d'un groupe de disques à l'aide d'ASM Configuration Assistant (ASMCA) Cette section indique les procédures de création du groupe de disques ASM pour les fichiers de base de données et la zone de récupération flashback (FRA). 1 Ouvrez une session en tant qu'utilisateur grid. 2 Démarrez l'utilitaire ASMCA en entrant : $/bin/asmca 3 Dans la fenêtre ASM Configuration Assistant (Assistant de configuration ASM), sélectionnez l'onglet Disk Groups (Groupes de disques).
9 Recommencez la procédure de l'étape 4 à l'étape 8 afin de créer un autre groupe de disques pour votre zone FRA. REMARQUE : assurez-vous de marquer votre groupe de disques FRA différemment de votre groupe de disques de base de données. Pour la dénomination de vos disques Oracle ASM, voir « Utilisation d'ASMLib pour marquer les disques partagés comme disques candidats », à la page 110. 10 Cliquez sur Exit (Quitter) pour quitter ASM Configuration Assistant (Assistant de configuration ASM).
Création d'une base de données à l'aide de DBCA Les étapes suivantes concernent le nœud 1 de votre environnement de cluster, sauf indication contraire : 1 Ouvrez une session en tant qu'utilisateur oracle. 2 From $, exécutez l'utilitaire DBCA en entrant : $/bin/dbca & 3 Dans la fenêtre Welcome (Bienvenue), sélectionnez Oracle Real Application Cluster Database (Base de données Oracle Real Application Cluster), puis cliquez sur Next (Suivant).
7 Dans la fenêtre Management Options (Options de gestion), sélectionnez les valeurs par défaut, puis cliquez sur Next (Suivant). 8 Dans la fenêtre Database Credentials (Autorisations de la base de données), entrez les autorisations correspondant à votre base de données. 9 Dans la fenêtre Database File Location (Emplacement des fichiers de la base de données), sélectionnez : • Automatic Storage Management (ASM) sous Storage Type (Type de stockage).
13 Dans la fenêtre Database Storage (Stockage de la base de données), cliquez sur Next (Suivant). 14 Dans la fenêtre Creation Options (Options de création), cliquez sur Finish (Terminer). 15 Dans la fenêtre Summary (Résumé), cliquez sur Ok pour créer une base de données. REMARQUE : le processus de création de base de données peut être assez long. 16 Une fois la base de données créée, cliquez sur Exit (Quitter) dans la fenêtre Database Configuration Assistant (Assistant de configuration de base de données).
Création d'une base de données à l'aide de DBCA
Dell PowerEdge-Systeme Installation von Oracle 11g R2 Database auf Enterprise Linux x86_64 Handbuch zum Einstieg
Anmerkungen, Vorsichtshinweise und Warnungen ANMERKUNG: Eine ANMERKUNG macht auf wichtige Informationen aufmerksam, mit denen Sie den Computer besser einsetzen können. VORSICHTSHINWEIS: Ein VORSICHTSHINWEIS macht Sie auf potenzielle Gefahrenquellen aufmerksam, die Hardwareschäden oder Datenverlust zur Folge haben können, wenn die Anweisungen nicht befolgt werden.
Inhalt 1 Übersicht . . . . . . . . . . . . . . . . . . . . . . . Bevor Sie beginnen . . . . . . . . . . . . . . . . . . . 137 Hardwareanforderungen . . . . . . . . . . . . . 137 Netzwerkanforderungen . . . . . . . . . . . . . 138 . . . . . . . . . 138 . . . . . . . . . . 139 Betriebssystem-Anforderungen . 2 137 Vorbereiten der Knoten für die Oracle-Installation . . . . Anschließen an ein RHN/ULN-Repository . Installation des Dell Validated RPM . . . . . . . 139 . . . . . . . . .
3 Vorbereiten des gemeinsamen Speichers für die Installation von Oracle RAC . . . . . . . . . . . . . . . . . . . Partitionieren des gemeinsamen Datenträgers . Anpassen der Streifenelementgröße auf einer primären Partition . . . . . . . . 154 . . . . . . . . . 158 Installation und Konfiguration von ASMlib . . . . . . Verwenden von ASMLib zum Markieren der gemeinsamen Datenträger als mögliche Datenträger . . . . . . . . . 4 134 162 165 . . . . . . . . . . . . . . . . . .
7 8 Erstellen der Datenträgergruppe mit dem ASM Configuration Assistant (ASMCA) . . . . . . . . . . . . . . . . . . . . . . . Erstellen der Datenbank mit DBCA . 177 . . . .
Inhalt
Übersicht Dieses Dokument betrifft Oracle Database 11g R2 unter Red Hat Enterprise Linux 5.x AS x86_64 oder Oracle Enterprise Linux 5.x AS x86_64. Bevor Sie beginnen Hardwareanforderungen • Oracle benötigt 1,5 Gigabyte (GB) physikalischen Speicher. • Der Swap-Speicher muss ebenso groß sein wie der Umfang des RAM, der dem System zugewiesen ist. • Oracles temporärer Speicherplatz (/tmp) muss mindestens 1 GB umfassen.
Netzwerkanforderungen • Es wird empfohlen, sicherzustellen, dass jeder Knoten mindestens drei Netzwerkkarten (NICs) enthält: ein NIC für das öffentliche Netzwerk und zwei NICs für das private Netzwerk, um eine hohe Verfügbarkeit der Oracle Real Application Clusters (RAC) zu gewährleisten. • Die Namen der privaten und öffentlichen Schnittstellen müssen auf allen Knoten identisch sein. Wenn z. B.
Vorbereiten der Knoten für die Oracle-Installation Anschließen an ein RHN/ULN-Repository ANMERKUNG: Die folgende Dokumentation befasst sich mit der Einrichtung eines lokalen yum-Repositorys unter Verwendung der Installationsmedien für das Betriebssystem. Wenn Sie eine Verbindung mit den Kanälen Red Hat Network (RHN) bzw. Unbreakable Linux Network (ULN) herstellen möchten, schlagen Sie in der entsprechenden Dokumentation nach. Informationen zum Red Hat Network finden Sie unter redhat.com/red_hat_network.
2 Zur Installation und Konfiguration des http-Daemons konfigurieren Sie das System, das das Repository für alle anderen Systeme hosten wird, für eine lokale Verwendung des DVD-Images. Erstellen Sie die Datei /etc/yum.repos.d/local.
• Als letzter Schritt muss der DNS-Name oder die IP-Adresse des Servers erfasst werden, der als Host für das Repository fungiert. Der DNS-Name oder die IP-Adresse des Hostservers wird verwendet, um die repo-Datei für Ihr yum-Repository auf dem Clientserver zu konfigurieren. Im Folgenden finden Sie ein Konfigurationsbeispiel, in dem das RHEL 5.x Server-Medium in der Konfigurationsdatei /etc/yum.repos.d/myRepo.repo verwendet wird. [myRepo] name=RHEL5.5 DVD baseurl= http://reposerver.mydomain.
2 Kopieren Sie die Dell-Oracle-Deployment-tar-Datei in ein Arbeitsverzeichnis für alle Clusterknoten. 3 Um in das Arbeitsverzeichnis zu wechseln, geben Sie den folgenden Befehl ein: # cd 4 Entpacken Sie die Dell-Oracle-Deployment-Version mit dem folgenden Befehl: # tar -xvf Dell-Oracle-Deployment-o-y-m.tar ANMERKUNG: Dabei steht o für die Betriebssystemversion, während y bzw. m für das Jahr bzw. den Monat der tar-Version stehen.
Die Installation des Dell-Oracle-Dienstprogramme-RPM umfasst die folgenden Schritte: 1 Laden Sie die aktuelle Dell-Oracle-Deployment-tar-Datei von http://en.community.dell.com/dellgroups/enterprise_solutions/m/oracle_db_gallery/default.aspx herunter. ANMERKUNG: Der Dateiname baut auf der folgenden Konvention auf: DellOracle-Deployment-Betriebssystemversion-Jahr-Monat.tar (z. B. Dell-OracleDeployment-Lin-2011-07.tar).
Speicherort für Binärdateien der Oracle-Software Die Binärdateien der Oracle-Software sollten auf Knoten Eins Ihres Knotens abgelegt werden. Beachten Sie bitte unbedingt, dass Oracle DatabasePatchsets beginnend mit Oracle 11g R2 (11.2.0.2) eine Komplettinstallation der Oracle-Software umfassen. Weitere Informationen über die Auswirkungen dieser Änderung auf zukünftige Oracle-Einrichtungen finden Sie in dem My Oracle Support-Artikel: 1189783.1 Important Changes to Oracle Database Patch Sets Starting with 11.
3 Öffnen Sie die Datei /etc/sysconfig/network und ersetzen Sie localhost.localdomain gegebenenfalls durch den vollständigen Namen des öffentlichen Knotens. Der Befehl für Knoten1 lautet z. B. folgendermaßen: hostname=knoten1.domain.com 4 Geben Sie service network restart ein, um den Netzwerkdienst neu zu starten. 5 Geben Sie ifconfig ein, um zu überprüfen, ob die IP-Adressen richtig eingerichtet wurden.
Oracle Grid erstellt auf Ihren privaten Netzwerkadaptern derzeit für das HAIP eine Alias-IP-Adresse (auch virtuelle private IP-Adresse genannt) im Subnetz 169.254.*.*. Wenn der Subnetzbereich bereits verwendet wird, versucht Oracle Grid nicht, ihn zu nutzen. Der Zweck von HAIP ist der Lastenausgleich zwischen allen aktiven Verbindungsschnittstellen und ein Failover zu anderen verfügbaren Schnittstellen, falls einer der vorhandenen privaten Adapter nicht mehr reagiert.
2 Nachdem Sie beide Konfigurationsdateien gespeichert haben, verwenden Sie den Befehl service network restart, um den Netzwerkdienst neu zu starten. Mit dem Abschluss der oben aufgeführten Schritte ist das System darauf vorbereitet, dass HAIP mit dem Installationsprogramm für die Oracle Grid-Infrastruktur aktiviert werden kann.
eth1:1 Link encap:Ethernet 00:1E:C9:4B:72:22 HWaddr inet addr:169.254.167.163 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 eth2 Link encap:Ethernet 00:1E:C9:4B:71:24 HWaddr inet addr:192.168.0.141 Bcast:192.168.0.255 Mask:255.255.255.
Weitere Informationen über redundante Verbindungen und ora.cluster_interconnect.haip finden Sie im Metalink-Artikel 1210883.1 unter support.oracle.com. Anforderungen für die Auflösung der IP-Adresse und des Namens Die nachfolgenden Schritte zeigen die Einrichtung der Clusterknoten für die Verwendung von DNS (Domain Name System). Informationen über die Einrichtung von Clusterknoten unter Verwendung von GNS finden Sie im Wiki-Artikel http://en.community.dell.
Konfiguration eines DNS-Servers So konfigurieren Sie Änderungen an einem DNS-Server für einen Oracle 11g R2-Cluster mit einem DNS (ohne GNS): 1 Konfigurieren Sie die SCAN-NAME-Auflösung auf dem DNS-Server. Ein SCAN-NAME, der auf dem DNS-Server mithilfe der Round-RobinRichtlinie konfiguriert wird, sollte auf drei öffentliche IP-Adressen auflösen (empfohlen), obwohl die Mindestanforderung nur eine öffentliche IP-Adresse verlangt. Beispiel: scancluster IN A 192.0.2.1 IN A 192.0.2.2 IN A 192.0.2.
2 Überprüfen Sie die Reihenfolge der Konfiguration. /etc/nsswitch.conf regelt die Reihenfolge der Namensdienste. In einigen Konfigurationen kann der NIS Probleme mit der Oracle SCAN-Adressauflösung verursachen. Es wird empfohlen, den NIS-Eintrag am Ende der Suchliste und den DNS-Eintrag am Anfang zu platzieren. Beispiel: hosts: files dns nis Nachdem Sie die Datei /etc/nsswitch.
Vorbereiten der Knoten für die Oracle-Installation
Vorbereiten des gemeinsamen Speichers für die Installation von Oracle RAC ANMERKUNG: In diesem Abschnitt haben die Begriffe Datenträger, Volume(s), virtuelle(r) Datenträger und LUN(s) dieselbe Bedeutung und sind austauschbar (falls nicht anders angegeben). In gleicher Weise können die Begriffe Streifenelementgröße und Segmentgröße untereinander ausgetauscht werden.
ANMERKUNG: Es wird empfohlen, für optimale Leistung und permanente Namensbindung auf allen Knoten im Cluster den Device Mapper Multipath zu verwenden. ANMERKUNG: Weitere Informationen über den Anschluss von LUNs/Volumes finden Sie in der Wiki-Dokumentation unter: http:// en.community.dell.com/dellgroups/enterprise_solutions/w/oracle_solutions/3-storage.aspx.
Wenn mehrere Pfade zu einem gemeinsamen Datenträger verwendet werden und die Multipath-Software der Device Mapper ist, zeigt das System die folgende Meldung an: The number of cylinders for this disk is set to 8782 (Als Anzahl der Zylinder für diesen Datenträger ist 8782 festgelegt).
Legen Sie den obenstehenden Wert anhand der folgenden Formel fest: Streifenelementgröße in Sektoren = Streifenelementgröße in KB * 2 Erster Sektor = Streifenelementgröße in Sektoren ANMERKUNG: Die obenstehende Formel beruht auf der Annahme, dass 1 Sektor = 512 Byte oder 0,5 KB.
Wenn stattdessen eine Warnmeldung angezeigt wird, die besagt, dass der Kernel immer noch die alte Partitionstabelle liest, befolgen Sie Schritt 3, damit der Kernel in die Lage versetzt wird, die neue Partitionstabelle neu einzulesen. 2 Wiederholen Sie Schritt 1 für alle Datenträger, die angeglichen werden müssen.
Anpassen der Streifenelementgröße auf einer primären Partition Um das Dienstprogramm fdisk zum Anpassen einer Datenträgerpartition zu verwenden, gehen Sie folgendermaßen vor: ANMERKUNG: Dieser Abschnitt setzt voraus, dass der Datenträger, der angeglichen werden soll, bereits eine einzelne primäre Partition enthält. Wenn Sie die primäre Partition erstellen möchten, befolgen Sie die Schritte in „Partitionieren des gemeinsamen Datenträgers“ auf Seite 154.
b. Expert command (m for help): b (Expertenbefehl [m für Hilfe]) # Zum Verschieben des Beginns des Datenbereichs in einer Partition c. Partition number (1-4): 1 (Partitionsnummer) # Die Nummer der Partition, die angeglichen werden soll d. New beginning of data (128-xxxxx, default 128): 128 (Neuer Beginn des Datenbereichs [128-xxxxx, Standardwert 128]) ANMERKUNG: 1 block = 512 bytes; 128 blocks * 512 bytes = 64KB (1 Block = 512 Byte; 128 Blöcke * 512 Byte = 64KB) e.
4 Vergewissern Sie sich, dass die Partition angeglichen wurde, indem Sie den folgenden Befehl ausführen: #> fdisk -ul /dev/ Dabei ist der Name des Blockgeräts. Im Folgenden finden Sie eine Beispielausgabe des Befehls, ausgeführt auf einem Blockgerät, das angeglichen wurde. Wenn die Partition ordnungsgemäß angeglichen ist, wird für die Partition der Wert 128 in der Spalte Start angezeigt. Disk /dev/mapper/mpath70: 53.
Installation und Konfiguration von ASMlib 1 Rufen Sie die Seite oracle.com/technetwork/serverstorage/linux/downloads/rhel5-084877.html auf, um die folgenden Dateien herunterzuladen: • oracleasm-support • oracleasmlib • oracleasm ANMERKUNG: Wenn Sie derzeit die Betriebssystem-Distribution Oracle Linux verwenden, können Sie die Software über ULN vom Unbreakable Linux Network beziehen. ANMERKUNG: Laden Sie die aktuellen Versionen von oracleasm-support und oracleasmlib herunter.
Verwenden von ASMLib zum Markieren der gemeinsamen Datenträger als mögliche Datenträger 1 Zur Konfiguration von ASM verwenden Sie das init-Skript, das im Paket oracleasm-support enthalten ist. Es wird empfohlen, den folgenden Befehl als root auszuführen: # /usr/sbin/oracleasm configure -i ANMERKUNG: Oracle empfiehlt die Verwendung des Befehls oracleasm unter /usr/sbin. Der Pfad /etc/init.
2 Stellen Sie den Parameter ORACLEASM_SCANORDER in /etc/sysconfig/oracleasm ein. ANMERKUNG: Wenn Sie ORACELASM_SCANORDER auf einen Wert einstellen, geben Sie eine allgemeine Zeichenfolge ein, die mit dem Pseudogerätenamen des Device Mappers verknüpft ist. Wenn z. B. alle Device-Mapper-Geräte die Zeichenfolge "asm" als Präfix verwenden würden (/dev/mapper/asm-ocr1, /dev/mapper/asm-ocr2), belegen Sie den Parameter ORACLEASM_SCANORDER folgendermaßen: ORACLEASM_SCANORDER="asm".
5 Überprüfen Sie, dass die Datenträger in der ASM-Bibliothek enthalten sind, indem Sie den folgenden Befehl als root ausführen: /usr/sbin/oracleasm listdisks Alle Instanzen von DATENTRÄGERNAME aus dem/den vorherigen Befehl(en) werden angezeigt.
Installation der Oracle 11g R2 GridInfrastruktur Dieser Abschnitt enthält die Informationen für die Installation der Oracle 11g R2 Grid-Infrastruktur für einen Cluster. Bevor Sie beginnen Bevor Sie die Oracle 11g R2 RAC-Software auf dem System installieren: • Stellen Sie sicher, dass Sie Ihr Betriebssystem, das Netzwerk und den Speicher bereits anhand der Schritte aus den vorherigen Abschnitten in diesem Dokument konfiguriert haben. • Halten Sie das Oracle 11g R2-Medien-Kit bereit.
Konfiguration von Knoten Eins Soweit nicht anders angegeben ist, gelten die folgenden Schritte für Knoten Eins in der Clusterumgebung. 1 Melden Sie sich als root beim System an. 2 Wenn Sie nicht in einer grafischen Umgebung arbeiten, starten Sie das X-Window-System mit der folgenden Eingabe: startx 3 Öffnen Sie ein Terminalfenster und geben Sie Folgendes ein: xhost + 4 Mounten Sie das Oracle Grid Infrastructure-Medium. 5 Melden Sie sich als Benutzer grid an, z. B.: su - grid.
11 Geben Sie im Fenster Grid Plug and Play Information (Grid-Plug-andPlay-Informationen) die folgenden Informationen ein: • Cluster Name (Clustername) – Geben Sie für den Cluster einen Namen ein. • SCAN Name (SCAN-Name) – Geben Sie den im DNS-Server registrierten Namen ein, der im gesamten Cluster eindeutig ist. Weitere Informationen über das Einrichten des SCAN-Namens finden Sie in „Anforderungen für die Auflösung der IP-Adresse und des Namens“ auf Seite 149.
15 Vergewissern Sie sich, dass für die Schnittstellennamen im Fenster Network Interface Usage (Verwendung der Netzwerkschnittstelle) die richtigen Schnittstellentypen ausgewählt sind. Wählen Sie in der Dropdown-Liste Interface Type (Schnittstellentyp) den entsprechenden Schnittstellentyp aus. Die verfügbaren Optionen sind Private (Privat), Public (Öffentlich) und Do not use (Nicht verwenden). Klicken Sie auf Next (Weiter).
20 Wählen Sie im Fenster Privileged Operating Systems Groups (Privilegierte Betriebssystemgruppen) die folgenden Optionen: • asmdba für Oracle ASM DBA (OSDBA for ASM) Group (Oracle ASM DBA (OSDBA for ASM)-Gruppe) • asmoper für Oracle ASM Operator (OAOPER for ASM) Group (Oracle ASM Operator (OAOPER for ASM)-Gruppe) • asmadmin für Oracle ASM Administrator (OSASM) Group (Oracle ASM Administrator (OSASM)-Gruppe) 21 Geben Sie im Fenster Installation Location (Speicherort der Installation) die Werte für Ora
24 Klicken Sie im Fenster Summary (Übersicht) auf Install (Installieren). Nach Abschluss des Installationsvorgangs wird der Assistent Execute Configuration Scripts (Konfigurationsskripts ausführen) angezeigt. 25 Folgen Sie den Anweisungen des Assistenten und klicken Sie auf OK. 26 Klicken Sie im Fenster Finish (Fertig stellen) auf Close (Schließen).
Konfiguration des gemeinsamen Oracle-Stammpfads für Datenbankdateien mit ACFS Soweit nicht anders angegeben ist, gelten die folgenden Schritte für Knoten Eins in Ihrer Clusterumgebung: 1 Melden Sie sich als root an und geben Sie Folgendes ein: xhost + 2 Melden Sie sich als Benutzer grid an und führen Sie das Dienstprogramm asmca aus, indem Sie Folgendes eingeben: $/bin/asmca 3 Wählen Sie im Fenster ASM Configuration Assistant (ASMKonfigurationsassistent) die Registerkarte Disk Groups (Datent
6 Führen Sie im Bildschirm Create ACFS Hosted Database Home Volume (Volume für von ACFS gehosteten Datenbankstammpfad erstellen) folgende Schritte durch: • Geben Sie einen Namen für das Volume ein (z. B. ORAHOME). • Geben Sie einen Namen für den Bereitstellungspunkt des Datenbankstammpfads ein (z. B. /u01/app/oracle/acfsorahome). • Geben Sie die Database Home Size (Größe des Datenbankstammpfads) ein (muss mindestens 20 GB betragen).
Installation der Oracle 11g R2 Database (RDBMS)-Software Soweit nicht anders angegeben ist, gelten die folgenden Schritte für Knoten Eins in Ihrer Clusterumgebung. 1 Melden Sie sich als root an und geben Sie Folgendes ein: xhost +. 2 Mounten Sie das Oracle Database 11g R2-Medium.
• Klicken Sie auf SSH Connectivity (SSH-Verbindungen) und konfigurieren Sie Ihre kennwortlosen SSH-Verbindungen, indem Sie unter OS Password das Betriebssystem-Kennwort für den Benutzer oracle eingeben und Setup (Einrichten) auswählen. Klicken Sie auf OK und klicken Sie auf Next (Weiter), um zum nächsten Fenster zu wechseln.
13 Überprüfen Sie im Fenster Perform Prerequisite Checks (Voraussetzungen überprüfen) den Gesamtstatus aller Voraussetzungen. • Wenn eine Voraussetzung nicht erfüllt ist und den Status Fixable (Behebbar) aufweist, klicken Sie auf die Schaltfläche Fix & Check Again (Beheben und erneut überprüfen). • Führen Sie das Skript runfixup.sh aus, das von dem Oracle OUI bereitgestellt wird. ANMERKUNG: Wenn noch andere Voraussetzungen den Status Error (Fehler) aufweisen, wiederholen Sie Schritt 13.
Installation der Datenbanksoftware
Erstellen der Datenträgergruppe mit dem ASM Configuration Assistant (ASMCA) Dieser Abschnitt enthält Anweisungen zum Erstellen der ASMDatenträgergruppe für die Datenbankdateien und den FlashbackWiederherstellungsbereich (FRA). 1 Melden Sie sich als Benutzer grid an. 2 Starten Sie das Dienstprogramm ASMCA mit der folgenden Eingabe: $/bin/asmca 3 Wählen Sie im Fenster ASM Configuration Assistant (ASM-Konfigurationsassistent) die Registerkarte Disk Groups (Datenträgergruppen).
9 Wiederholen Sie Schritt 4 bis Schritt 8, um eine weitere Datenträgergruppe für den Flashback-Wiederherstellungsbereich (FRA) zu erstellen. ANMERKUNG: Stellen Sie sicher, dass Sie der FRA-Datenträgergruppe einen anderen Namen geben als den Namen der Datenbank-Datenträgergruppe.
Erstellen der Datenbank mit DBCA Soweit nicht anders angegeben ist, gelten die folgenden Schritte für Knoten Eins in Ihrer Clusterumgebung: 1 Melden Sie sich als Benutzer oracle an. 2 Führen Sie von $ das Dienstprogramm DBCA aus, indem Sie Folgendes eingeben: $/bin/dbca & 3 Wählen Sie im Fenster Welcome (Willkommen) die Option Oracle Real Application Cluster Database (Oracle Real Application ClusterDatenbank) und klicken Sie auf Next (Weiter).
8 Geben Sie im Fenster Database Credentials (Datenbank-Zugriffsinformationen) die geeigneten Zugriffsinformationen für die Datenbank ein. 9 Wählen Sie im Fenster Database File Location (Speicherort für Datenbankdateien) die folgenden Optionen: • Automatic Storage Management (ASM) (Automatische Speicherverwaltung) für Storage Type (Speichertyp). • Use Oracle-Managed Files (Von Oracle verwaltete Dateien verwenden) für Storage Location (Speicherort).
13 Klicken Sie im Fenster Database Storage (Datenbankspeicher) auf Next (Weiter). 14 Klicken Sie im Fenster Creation Options (Erstellungsoptionen) auf Finish (Fertig stellen). 15 Klicken Sie im Fenster Summary (Übersicht) auf OK, um die Datenbank zu erstellen. ANMERKUNG: Die Erstellung der Datenbank kann einige Zeit in Anspruch nehmen. 16 Nachdem die Erstellung der Datenbank abgeschlossen ist, klicken Sie im Fenster Database Configuration Assistant (DatenbankkonfigurationsAssistent) auf Exit (Beenden).
Erstellen der Datenbank mit DBCA
Dell PowerEdge システム Enterprise Linux x86_64 で使 用する Oracle 11g R2 データ ベース はじめに
メモ、注意、警告 メモ:コンピュータを使いやすくするための重要な情報を説明してい ます。 注意:手順に従わないと、ハードウェアの損傷やデータの損失につながる 可能性があることを示しています。 警告: 物的損害、けが、または死亡の原因となる可能性があることを示 しています。 _______________ 本書の内容は予告なく変更されることがあります。 © 2011 すべての著作権は Dell Inc. にあります。 Dell Inc. の書面による許可のない複製は、いかなる形態においても厳重に禁じられてい ます。 本書に使用されている商標:Dell™、DELL ロゴ、PowerEdge™ は Dell Inc. の商標です。 Red Hat® および Red Hat? Enterprise Linux® は米国および / またはその他の国における Red Hat, Inc. の登録商標です。Novell® は、米国およびその他の国における Novell Inc. の 登録商標です。SUSE™ は、米国およびその他の国における Novell Inc.
目次 1 概要 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 作業を開始する前に . . . . . . . . . . . . . . . . . . 189 ハードウェア要件 . . . . . . . . . . . . . . . . 189 ネットワーク要件 . . . . . . . . . . . . . . . . 190 . . . . . . . . . . . . . . . . . . . . . 190 OS の要件 2 189 Oracle インストールへの各ノー ドの準備 . . . . . . . . . . . . . . . . . . . . RHN/ULN リポジトリへの接続 . . . . 191 . . . . . . . . . . . . Dell Validated RPM のインストール . . . . . . . . . Dell Oracle ユーティリティ RPM のイ ンストール . . . . . . . . . . . . . . .
3 Oracle RAC インストール用の共有 ストレージの準備 . . . . . . . . . . . . . 共有ディスクのパーティション分割 . . . 205 . . . . . . . 206 プライマリパーティション上のストライプ エレメントサイズの調整 . . . . . . . . . . . ASMlib のインストールと設定 . . . 209 . . . . . . . . . . . 212 ASMLib を使用して共有ディスクを候補 ディスクとしてマークする . . . . . . . . 4 . . 212 . . . . . 215 . . . . . . . . . . . . . . . . 215 Oracle 11g R2 Grid Infrastructure のインストール . . . . . . . . . . . . . 作業を開始する前に . すべてのノードのシステムクロッ クの設定 . . . . . . . . . . . . . . . ノード 1 の設定 . 186 . . . . . . 215 .
7 8 ASM Configuration Assistant (ASMCA)を使用したディスクグ ループの作成 . . . . . . . . . . . . . . . . . DBCA を使用したデータベース の作成 . . . . . . . . . . . . . . . . . . . . . . . . 227 . . . . .
目次
概要 本書の説明は、Red Hat Enterprise Linux 5.x AS x86_64 または Oracle Enterprise Linux 5.x AS x86_64 上で実行されている Oracle Database 11g R2 に適用されます。 作業を開始する前に ハードウェア要件 • Oracle は 1.5 ギガバイト(GB)の物理メモリを必要とします。 • スワップスペースは、システムに割り当てられている RAM の量と等 しく設定されている必要があります。 • Oracle の一時スペース(/tmp)は少なくとも 1 GB 必要です。 • Oracle Universal Installer (OUI)を正しく表示するために、 1024 x 768 の解像度をサポートするモニタが必要です。 • デルがサポートしているハードウェア構成については、 dell.
ネットワーク要件 • 各ノードに少なくとも 3 枚のネットワークインタフェースカード (NIC)を使用することを推奨します。Oracle Real Application Clusters(RAC)に高可用性を確保するには、パブリックネットワー クに 1 枚、プライベートネットワークに 2 枚の NIC を使用します。 • パブリックインタフェース名とプライベートインタフェース名はす べてのノードで同一でなければなりません。たとえば、ノード 1 に eth0 がパブリックインタフェースとして使用されている場合、他の すべてのノードにパブリックインタフェースとして eth0 を使用する 必要があります。 • 各ノードのすべてのパブリックインタフェースが、クラスタ内のす べてのノードと通信できる必要があります。 • 各ノードのすべてのプライベートインタフェースが、クラスタ内の すべてのノードと通信できる必要があります。 • 各ノードのホスト名は、RFC 952 標準 (www.ietf.org/rfc/rfc952.
Oracle インストールへの各ノー ドの準備 RHN/ULN リポジトリへの接続 メモ:以下のマニュアルでは、OS のインストールメディアを使用して ローカル yum リポジトリを設定する方法を説明しています。Red Hat Network(RHN)/Unbreakable Linux Netwrok(ULN)のチャネルに接続する 場合は、該当するマニュアルを参照してください。Red Hat については、 redhat.com/red_hat_network を参照してください。ULN ネットワークに関す る情報は、linux.oracle.
2 http デーモンをインストールし、設定するには、他のすべてのマシ ンのリポジトリをホストするマシンが DVD イメージをローカルで使 用するように設定します。ファイル /etc/yum.repos.d/local.
• 最後の手順は、リポジトリをホストするサーバーの DNS 名また は IP を集めることです。ホスティングサーバーの DNS 名または IP は、クライアントサーバー上の yum リポジトリ repo ファイ ルの設定に使用されます。以下は、設定ファイル /etc/yum.repos.d/myRepo.repo 内に RHEL 5.x サーバー メディアを使用した設定の例です。 [myRepo] name=RHEL5.5 DVD baseurl= http://reposerver.mydomain.com/RHEL5_5/Server enabled=1 gpgcheck=0 メモ:reposerver.mydomain.
Dell Validated RPM のインストール 各ノードを適切な yum リポジトリに接続したら、Dell Validated RPM パッケージをインストールします。Dell Validated RPM パッケージで は、Oracle RAC のインストールに必要とされるインストール処理の一 部が自動化されています。 Dell Validated RPM パッケージのインストール手順は以下のとおり です。 1 最新の Dell Oracle Deployment tar ファイルを http://en.community.dell.com/dellgroups/enterprise_solutions/m/oracle_db_gallery/default.aspx から ダウンロードします。 メモ:ファイル名の命名規則は次のとおりです : Dell-Oracle- Deployment-OS バージョン - 年 - 月 .tar。たとえば、Dell-OracleDeployment-Lin-2011-07.
Dell Oracle ユーティリティ RPM のインス トール Dell Oracle ユーティリティ RPM は、デルと Oracle が推奨する以下の 設定を実行するように設計されています。 • Grid Infrastructure ディレクトリの作成、所有権と許可の設定。 • Grid ユーザーの作成。 • Oracle Database(RDBMS)ディレクトリの作成、所有権と許可の 設定。 • Oracle ベースディレクトリの作成、所有権と許可の設定。 • pam の制限の設定(/etc/pam.d/login)。 • /etc/profile の設定。 • SELinux を Disabled(無効)に設定。 • • Dell PowerEdge システムコンポーネントのドライバのインストール (該当する場合)。 カーネルパラメータの設定。 Dell Oracle ユーティリティ RPM のインストール手順は以下のとおり です。 1 最新の Dell Oracle Deployment tar ファイルを http://en.community.dell.
5 ディレクトリを Dell-Oracle-Deployment-o-y-m に変更します。 6 すべてのクラスタノードに Dell Oracle ユーティリティ RPM パッ ケージをインストールするには、次のコマンドを入力します。 # yum localinstall dell-oracle-utilities* --nogpgcheck 7 rpm がインストールされたら、dodeploy スクリプトを実行して環境 を次のようにセットアップします。 # dodeploy -g -r 11gR2 Dell Oracle ユーティリティ RPM とそのオプションの詳細につい ては、コマンド # man 8 dodeploy を使用して man ページを確認 してください。 メモ:Dell-Oracle-Deplyoment tar には、Software Deliverable List(SDL) から提供されたサポートされている最新のドライバが含まれてい ます。最新のドライバをインストールする手順については、DellOracle-Deployment tar 内の README ファイルを参照してくださ
ネットワークのセットアップ パブリックネットワーク メモ:パブリック IP アドレスが有効でルータブルな IP アドレスであるこ とを確認してください。 各ノードのパブリックネットワークを設定するには、次の手順を実行し ます。 1 root としてログインします。 2 ネットワークデバイスファイル /etc/sysconfig/network-scripts/ifcfgeth# を編集します(# はネットワークデバイスの番号を表します)。 メモ:Gateway アドレスがパブリックネットワークインタフェース用 に設定されていることを確認します。Gateway アドレスが設定されて いない場合は、Oracle Grid のインストールが失敗するおそれがあり ます。 DEVICE=eth0 ONBOOT=yes IPADDR=< パブリック IP アドレス > NETMASK=< サブネットマスク > BOOTPROTO=static HWADDR= SLAVE=no GATEWAY=< ゲートウェイアドレス > 3 /etc/sysconfig/network ファイルを編集し、必要に
6 ネットワークの設定をテストするには、クラスタに属していない LAN のクライアントから各パブリック IP アドレスに対して ping を 実行します。 7 各ノードに接続して、パブリックネットワークが機能していること を確認します。ssh <ÉpÉuÉäÉbÉN IP> と入力して、セキュア シェル(ssh)コマンドが機能していることを確認します。 プライベートネットワーク メモ:プライベートネットワーク用の 2 個の NIC ポートは、それぞれ別々 の PCI バス上に置かれている必要があります。 Oracle 11gR2(11.2.0.2)のグリッドインフラストラクチャは、冗長相 互接続(RI)という名の新たに導入された機能を使用して、IP フェイル オーバーをネイティブでサポートしています。Oracle は ora.cluster_interconnect.
以下の例は、新規インストールされた Oracle 11gR2(11.2.0.2)Grid Infrastructure に HAIP を使用して冗長相互接続を有効にする詳細な手 順を示したものです。 1 ファイル /etc/sysconfig/network-scripts/ifcfg-ethX を編集します。 X は eth デバイスの数、ifcfg-ethX はプライベート相互接続に使用 するネットワークアダプタの設定ファイルです。次の例は、 192.168.0.* サブネットを使用した eth1 と eth2 を示したものです。 DEVICE=eth1 BOOTPROTO=static HWADDR=00:1E:C9:4B:72:22 ONBOOT=yes IPADDR=192.168.0.140 NETMASK=255.255.255.0 DEVICE=eth2 HWADDR=00:1E:C9:4B:71:24 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.0.141 NETMASK=255.255.255.
3 HAIP を使用した冗長相互接続が実行中であることを確認するには、 ifconfig コマンドを使用してこの機能をテストします。出力の例を 以下に示します。 ifconfig eth1 Link encap:Ethernet 00:1E:C9:4B:72:22 HWaddr inet addr:192.168.0.140 Bcast:192.168.0.255 Mask:255.255.255.128 inet6 addr: fe80::216:3eff:fe11:1122/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6369306 errors:0 dropped:0 overruns:0 frame:0 TX packets:4270790 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3037449975 (2.8 GiB) bytes:2705797005 (2.
inet6 addr: fe80::216:3eff:fe11:1122/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6369306 errors:0 dropped:0 overruns:0 frame:0 TX packets:4270790 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3037449975 (2.8 GiB) bytes:2705797005 (2.5 GiB) eth2:1 Link encap:Ethernet 00:1E:C9:4B:71:24 TX HWaddr inet addr:169.254.167.164 Bcast:169.254.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 冗長相互接続(RI)および ora.
DNS を使用するクラスタの場合 Oracle DNS を使用して(GNS を使用せずに)Oracle 11g R2 RAC を セットアップするには、以下の手順を行う必要があります。 1 各ノードで少なくとも 2 つのインタフェース(プライベート IP アド レス用とパブリック IP アドレス用)を設定します。 2 ラウンドロビン解決を実行する DNS に対して SCAN 名を 3 つのアド レス(推奨)または少なくとも 1 つのアドレスに設定します。SCAN アドレスは、仮想 IP アドレスおよびパブリック IP アドレスと同じサ ブネット上に設定する必要があります。 メモ:可用性とスケーラビリティを高めるために、3 つの IP アドレス に対してラウンドロビン解決を使用するように SCAN を設定すること を推奨します。SCAN 用の名前は先頭を数字にすることができませ ん。インストールを成功させるには、SCAN が少なくとも 1 つのアド レスを解決するように設定しておく必要があります。 1 つのクラスタ内のさまざまなインタフェース、IP アドレスの設定、 および解決を 表 2-1 に示します。
DNS サーバーの設定 DNS を使用して(GNS を使用せずに)Oracle 11g R2 クラスタ用に DNS サーバーに変更を設定するには、次の手順を実行します。 1 DNS サーバー上で SCAN 名解決を設定します。 ラウンドロビンポリシーを使用して DNS サーバー上に設定された SCAN NAME は、3 つのパブリック IP アドレス(推奨)に対して解 決を与えるべきです。ただし、最小要件はパブリック IP アドレス 1 つです。 たとえば、次のとおりです。 scancluster IN A 192.0.2.1 IN A 192.0.2.2 IN A 192.0.2.3 scancluster は Oracle Grid のインストール中に与えた SCAN 名です。 メモ:SCAN IP アドレスはルータブルで、パブリックレンジ内にある 必要があります。 DNS クライアントの設定 名前解決のためにクラスタノード上で必要な変更を設定するには、以下 の手順を実行します。 1 クラスタ内のすべてのノードに resolv.
2 設定の順序を確認します。/etc/nsswitch.conf はネームサービスの順 序を制御します。構成によっては、NIS が原因で Oracle SCAN のア ドレス解決に問題が発生する場合があります。NIS エントリを検索リ ストの最後に、dns エントリを最初に置くことを推奨します。たと えば、hosts: dns files nis のような順序にします。 /etc/nsswitch.
Oracle RAC インストール用の共 有ストレージの準備 メモ:本項では、特にことわりがないかぎり、ディスク、ボリューム、 仮想ディスク、LUN という語はどれも同じ意味で使われています。同様 に、ストライプエレメントサイズとセグメントサイズも同義語です。 Oracle RAC では、ACFS、Oracle Database ファイル、およびフラッ シュリカバリ領域(FRA)を使用して Oracle Cluster Registry(OCR) 、 仮想ディスク、Oracle Home を保存するために、共有 LUN が必要 です。Oracle RAC に高可用性を確保するには、以下を用意することを 推奨します。 • Oracle Clusterware に通常の冗長性を確保するには各 1 GB の共有 LUN を 3 つ、高冗長性を確保するには LUN を 5 つ。 • データベース格納用に少なくとも 2 台の共有ディスク。各共有ディ スクは速度とサイズが共通している必要があります。 • ACFS(Automatic Storage Management Cluster File System)
共有ディスクのパーティション分割 本項では、Linux のネイティブパーティションユーティリティ fdisk を 使用して、ディスク全体にまたがるボリューム / 仮想ディスク上に単一 のパーティションを作成してアラインメントを行う方法について説明し ます。 注意:Linux を実行しているシステムでは、ディスクがボリューム / 仮想 ディスク(VD)に書き込まれる前にディスクのアラインメントを行ってく ださい。これを行わないと、ディスク上のすべてのデータが破壊され ます。 fdisk ユーティリティを使用してパーティションを作成し、アラインメ ントを行うには、以下の手順に従います。 1 コマンドプロンプトで以下のいずれか 1 つを入力します。 • #> fdisk –u /dev/< ブロックデバイス > • fdisk –u /dev/mapper/< マルチパスディスク > < ブロックデバイス > は、パーティションを作成してアラインメン トを行うブロックデバイスの名前です。 たとえば、ブロックデバイスが /dev/sdb の場合は、fdisk –u /dev/sdb と入力します。 共有ディスクへ
b Command action extended primary partition (1-4):P # プライマリパーティションの作成 c Partition number (1-4): 1(パーティション番号 (1-4): 1) d First sector (63-xxxxxx, default 63): < セクターの 点から見たストライプエレメントのサイズまたはセグメントサ イズ >(第 1 セクター(63-xxxxxx、デフォルト 63)) ストライプエレメントのサイズ(SES)またはセグメントサイズ (SS)は、ストライプエレメントがストライプの一部として単一 の物理ディスク上で消費するディスクスペースの量です。 たとえば、256 KB のディスクスペースを持ち、各ディスクに 64 KB のデータを格納しているストライプです。この場合、スト ライプエレメントのサイズは 64 KB で、ストライプのサイズは 256 KB です。 次の式を使用して上記の値を設定します。 セクター内のストライプエレメントのサイズ = ストライプエレメン トのサイズ(KB)* 2 最初のセクター = セクター内
最後のセクターまたは + サイズ、または + サイズ M、または + サイ ズ K(1024-xxxxx、デフォルト xxxxxx): < デフォルト値を入力する か、リターンキーを押します > # 単一のパーティションがディスク 全体にまたがるようにするには、デフォルト値を入力します。 Command (m for help): wq(コマンド(ヘルプは m))# 書き込 んで終了 次のメッセージが表示されます。 The partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.
1 でパーティションに対して任意に設定した開始セクターが表示さ れます。 Disk /dev/mapper/mpath70: 53.
The number of cylinders for this disk is set to 8782. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with:(このディスクのシリンダ数は 8782 に設定されています。それ自体には何ら問題はありませんが、 1024 を上回っており、そのため、セットアップによっては次の ものに問題が発生する可能性があります。) 1) software that runs at boot time (e.g., old versions of LILO)(起動時に実行されるソフトウェア(LILO の旧バージョンなど)) 2)booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)(他の OS からの起動と パーティション分割用ソフトウェア(たとえば、DOS FDISK、 OS/2 FDISK) ) a.
3 Device Mapper 使用時に次のコマンドを実行して、ノード 1 のすべ てのパーティションを再スキャンします。 #> kpartx -a /dev/mapper/< デバイス名 > 他のすべてのノードで次のコマンドを実行します。 #> kpartx -l /dev/mapper/< デバイス名 > メモ:デバイス名の末尾が "p1" でない場合は、システムを再起動し ます。適切な命名規則では末尾に "p1" を付けて、 /dev/mapper/ACFSp1 のように表示します。 4 次のコマンドを実行して、パーティションのアラインメントができ ていることを確認します。 #> fdisk -ul /dev/< ブロックデバイス > < ブロックデバイス > は、ブロックデバイスの名前です。 次の例は、アラインメントが行われたブロックデバイスにコマン ドを実行した際のサンプル出力です。パーティションのアラインメ ントが正しく行われている場合は、パーティションの Start(スタ ート)行の下に 128 が表示されます。 Disk /dev/mapper/mpath70: 53.
ASMlib のインストールと設定 1 oracle.com/technetwork/server-storage/linux/downloads/rhel5084877.
Default group to own the driver interface(ドライバ インタフェースを所有するデフォルトグループ)[ ]: asmadmin Start Oracle ASM library driver on boot(起動時に Oracle ASM ライブラリドライバを開始する)(y/n) [n]: y Fix permissions of Oracle ASM disks on boot(起動時 に Oracle ASM ディスクの権限を修正する)(y/n) [y]: y メモ:このセットアップでは、デフォルトユーザーが grid に、デフォ ルトグループが asmadmin に設定されています。oracle ユーザーが必 ず asmadmin グループの一部になるようにしてください。dell-validated および dell-oracle-utilities rpms を使用して行います。 Oracle ASM ライブラリのブートタイムパラメータが設定され、シー ケンシャルテキストインタフェースの設定方法が表示されます。 2 /etc/sysconfig/oracleas
4 管理が可能で Oracle データベースのインストールに使用できる ASM ディスクを作成するには、root として次のコマンドを実行し ます。 /usr/sbin/oracleasm createdisk DISKNAME /dev/mapper/diskpartition メモ:DISKNAME および /dev/mapper/diskpartition という 2 つのフィー ルドは、それぞれお使いの環境に適した名前に置き換える必要があ ります。 メモ:Oracle 関連のディスクはすべて Oracle ASM 内に入れておくこ とを強く推奨します。これには、OCR ディスク、投票ディスク、デー タベースディスク、フラッシュバックリカバリディスクが含まれ ます。 5 root として次のコマンドを実行することで、ASM ライブラリ内に ディスクがあることを確認します。 /usr/sbin/oracleasm listdisks 前のコマンドからの DISKNAME のインスタンスすべてが表示され ます。 ASM ディスクを削除するには、次のコマンドを実行します。 /usr/sbin/oracl
Oracle 11g R2 Grid Infrastructure の インストール 本項では、クラスタ用の Oracle 11g R2 グリッドインフラストラクチャ のインストール方法について説明します。 作業を開始する前に Oracle 11g R2 RAC ソフトウェアをシステムにインストールする前に、 以下の手順を実行してください。 • 本書の前項までに説明した手順に従って、OS、ネットワーク、およ びストレージが設定済みであることを確認します。 • Oracle 11g R2 メディアキットを用意します。 すべてのノードのシステムクロックの設定 インストール中のエラーを避けるために、すべてのノードでシステムク ロックの設定を同一にしてください。ノードのシステムクロックを、 Oracle 11g R2 に内蔵されているクラスタ時刻同期サービス(CTSS)と 同期します。CTSS を有効にするには、以下のコマンドを順に実行して、 OS ネットワークタイムプロトコルデーモン(ntpd)サービスを無効に します。 1 service ntpd stop 2 chkconfig ntpd off 3
ノード 1 の設定 以下の手順は、特に指示がない限り、クラスタ環境のノード 1 に適用 されます。 1 root としてログインします。 2 グラフィカル環境になっていない場合は、startx と入力して X Window System を起動します。 3 ターミナルウィンドウを開き、xhost + と入力します。 4 Oracle Grid Infrastructure メディアをマウントします。 5 Grid ユーザーとしてログインします(たとえば su - grid)。 6 次のコマンドを入力して、Oracle Universal Installer を起動し ます。 /runInstaller 7 Download Software Updates(ソフトウェアアップデートのダウン ロード)ウィンドウに My Oracle Support 資格情報を入力し、最新 のパッチアップデートをダウンロードします。最新のパッチをダウ ンロードしない場合は、Skip software updates(ソフトウェアアッ プデートを省略する)を選択します。 8 Select Install
11 Grid Plug and Play Information(グリッドのプラグアンドプレイ情 報)ウィンドウに以下の情報を入力します。 • Cluster Name(クラスタ名)— お使いのクラスタの名前を入力 します。 • SCAN Name(SCAN 名)— DNS サーバーに登録されている、ク ラスタ全体にとって一意な名前を入力します。SCAN 名の設定の 詳細については、201 ページの「IP アドレスと名前を解決する ための要件」を参照してください。GNS を有効にする手順の詳 細については、Wiki の記事 en.community.dell.com/dellgroups/enterprise_solutions/w/oracle_solutions/ 1416.
15 Network Interface Usage(ネットワークインタフェースの用途) ウィンドウで、インタフェース名に対して正しいインタフェースタ イプが選択されていることを確認します。Interface Type(インタ フェースタイプ)ドロップダウンリストから、必要なインタフェー スタイプを選択します。使用可能なオプションは、Private(プライ ベート)、Public(パブリック)、および Do Not Use(使用しない) です。Next(次へ)をクリックします。 16 Storage Option Information(ストレージオプション情報) ウィンドウで、Automatic Storage Management(ASM)を選択 し、Next(次へ)をクリックします。 17 Create ASM Disk Group(ASM ディスクグループの作成)ウィンド ウに次の情報を入力します。 • ASM diskgroup(ASM ディスクグループ)— たとえば OCR_VOTE などの名前を入力します。 • Redundancy(冗長性)— お使いの OCR と投票ディスクについ て、
19 Failure Isolation Support(エラーの分離のサポート)ウィンドウ で、Do Not use Intelligent Platform Management Interface (IPMI) (インテリジェントプラットフォーム管理インタフェース [IPMI] を使 用しない)を選択します。 IPMI を有効にする手順の詳細については、Wiki の記事 http://en.community.dell.com/dellgroups/enterprise_solutions/w/oracle_solutions/1414.
23 Perform Prerequisite Checks(前提条件の確認を行う)ウィンド ウで、すべての前提条件の全般的なステータスを確認します。失敗 した前提条件があり、そのステータスが Fixable(修正可能)である 場合は、Fix & Check Again(修正して再度確認する)をクリック し、Oracle Universal Installer(OUI)によって提供されている runfixup.
ACFS を使用してデータベースバ イナリ用の共有 Oracle ホームを 設定する方法 以下の手順は、特に指示がない限り、クラスタ環境のノード 1 に適用 されます。 1 root としてログインし、xhost + と入力します。 2 Grid ユーザーとしてログインし、次のコマンドを入力して asmca ユーティリティを実行します。 $/bin/asmca 3 ASM Configuration Assistant ウィンドウで、Disk Groups(ディス クグループ)タブを選択し、Create(作成)をクリックし、以下の 手順を実行します。 • ディスクグループの名前を入力します。たとえば、ORAHOME と入力します。 • External Redundancy(外部冗長性)を選択し、共有データベー スのホームに使用する ASM stamped disk(ASM スタンプディ スク)を選択します。 メモ:候補ディスクが表示されない場合は、Change Discovery Path (ディレクティブパスの変更)をクリックし、 ORCL:* または /dev/oraclea
6 Create ACFS Hosted Database Home Volume(ACFS がホストされ たデータベースホームのボリュームを作成する)画面で、次の手順 を実行します。 • ボリュームの名前を入力します(たとえば、ORAHOME)。 • データベースホームのマウントポイントの名前を入力します (たとえば、/u01/app/oracle/acfsorahome)。 • Database Home size(データベースホームのサイズ)を入力し ます(20 GB 以上)。 • Database Home Owner(データベースホームの所有者)の名前 を入力します(たとえば、oracle)。 • Database Home Owner Group(データベースホームの所有者グ ループ)の名前を入力します(たとえば、oinstall)。 • Ok をクリックします。 7 root として RUN ACFS Script(ACFS スクリプトの実行)ウィンドウ に表示されている acfs_script.
Oracle 11g R2 Database(RDBMS) ソフトウェアのインストール 以下の手順は、特に指示がない限り、クラスタ環境のノード 1 に適用 されます。 1 root としてログインし、xhost + と入力します。 2 Oracle Database 11g R2 メディアをマウントします。 3 root ユーザーとしてログアウトし、su - oracle と入力して Oracle ユーザーとしてログインします。 4 Oracle データベースメディアから installer スクリプトを実行し ます。 /runInstaller 5 セキュリティのアップデートを入手するための My Oracle Support 資格情報を Configure Security Updates(セキュリティ更新の設定) ウィンドウに入力し、Next(次へ)をクリックします。 6 Download Software Updates(ソフトウェアアップデートのダウン ロード)ウィンドウに My Oracle Support 資格情報を入力し、イニ シャルリリース後にリリースされたパッチのアッ
8 Grid Installation Options(グリッドのインストールオプション) ウィンドウで、次の手順を実行します。 • Oracle Real Application Clusters database installation(Oracle Real Application Clusters データベースのインストール)を選択 し、Select All(すべて選択)ボタンをクリックしてすべての ノードを選択します。 • SSH Connectivity(SSH 接続)をクリックし、oracle ユーザー用 の OS Password(OS のパスワード)を入力して Setup(セット アップ)を選択することで、パスワードなしの SSH 接続を設定 します。Ok をクリックし、Next(次へ)をクリックして次の ウィンドウに進みます。 メモ:dell-validated および dell-oracle-utilities rpms によって設定されて いるデフォルトパスワードは、Grid ユーザーと oracle ユーザーのどち らも oracle です。 9 Select Produ
12 Privileged Operating System Groups(特権が必要な OS グループ) ウィンドウで、Database Administrator (OSDBA) Group(データ ベース Administrator (OSDBA) グループ)に dba を、Database Operator (OSOPER) Group(データベースオペレータ (OSOPER) グ ループ)に asmoper を選択し、Next(次へ)をクリックします。 13 Perform Prerequisite Checks(前提条件の確認を行う)ウィンド ウで、すべての前提条件の全般的なステータスを確認します。 • 失敗した前提条件があり、そのステータスが Fixable(修正 可能)である場合は、Fix & Check Again(修正して再度確認 する)ボタンをクリックします。 • Oracle OUI によって提供されている runfixup.
データベースソフトウェアのインストール
ASM Configuration Assistant (ASMCA)を使用したディスク グループの作成 本項では、データベースファイルとフラッシュバックリカバリ領域 (FRA)用の ASM ディスクグループを作成する手順を説明します。 1 grid ユーザーとしてログインします。 2 次のように入力して、ASMCA ユーティリティを起動します。 $/bin/asmca 3 ASM Configuration Assistant ウィンドウで、Disk Groups(ディス クグループ)タブを選択します。 4 Create(作成)をクリックします。 5 適切な Disk Group Name(ディスクグループ名)、たとえば DBDG を入力します。 6 Redundancy(冗長性)に External(外付け)を選択します。 7 データベースファイルの格納に使用する適切なメンバーディスクを 選択します。たとえば、ORCL:DB1, ORCL:DB2.
9 手順 4 から 手順 8 を繰り返して、フラッシュバックリカバリ領域 (FRA)用に別のディスクグループを作成します。 メモ:FRA ディスクグループにはデータベースディスクグループ名と は必ず異なるラベルを入力してください。Oracle ASM ディスクのラ ベリングについては、212 ページの「ASMLib を使用して共有ディスク を候補ディスクとしてマーク する」を参照してください。 10 Exit(終了)をクリックして ASM Configuration Assistant を終了し ます。 228 ASMCA を使用したディスクグループの作成
DBCA を使用したデータベース の作成 以下の手順は、特に指示がない限り、クラスタ環境のノード 1 に適用 されます。 1 oracle ユーザーとしてログインします。 2 $ から、次のように入力して DBCA ユーティリ ティを実行します。 $/bin/dbca & 3 Welcome(ようこそ)ウィンドウで Oracle Real Application Cluster Database(Oracle Real Application Cluster データベー ス)を選択してから、Next(次へ)をクリックします。 4 Operations(操作)ウィンドウで Create a Database(データ ベースの作成)を選択してから、Next(次へ)をクリックします。 5 Database Templates(データベーステンプレート)ウィンドウで Custom Database(カスタムデータベース)を選択してから、 Next(次へ)をクリックします。 6 Database Identification(データベース識別情報)ウィンドウで、 以下
7 Management Options(管理オプション)ウィンドウでデフォル ト値を選択し、Next(次へ)をクリックします。 8 Database Credentials(データベース資格証明)ウィンドウで、 お使いのデータベースにとって適切な資格情報を入力します。 9 Database File Location(データベースファイルの位置)ウィンド ウで、以下を選択します。 • Storage Type(ストレージタイプ)には、Automatic Storage Management (ASM)(自動ストレージ管理)。 • Storage Location(ストレージの位置)には、Use OracleManaged Files(Oracle-Managed Files の使用)。 • Database Area(データベース領域)には、データベースファ イル(DBDG)の格納のために作成した ASM ディスクグループ に移動して選択します。 10 Recovery Configuration(リカバリ設定)ウィンドウで、次の手 順を実行します。 a Specify Flash Recov
12 Initialization Parameters(初期化パラメータ)ウィンドウで、 以下の手順を実行します。 • Custom(カスタム)を選択します。 • Memory Management(メモリ管理)セクションには、 Automatic shared memory management(自動共有メモリ 管理)を選択します。 • SGA Size(SGA サイズ)と PGA Size(PGA サイズ)に適切な 値を指定します。 • Next(次へ)をクリックします。 13 Database Storage(データベースストレージ)ウィンドウで Next(次へ)をクリックします。 14 Creation Options(作成オプション)ウィンドウで、Finish (完了)をクリックします。 15 Summary(サマリ)ウィンドウで Ok をクリックして、データ ベースを作成します。 メモ:データベースの作成には多少時間がかかります。 16 データベースの作成が完了したら、Database Configuration Assistant ウィンドウで Exit(終了)をクリックします
DBCA を使用したデータベースの作成
Sistemas Dell PowerEdge Base de datos Oracle 11g R2 en Enterprise Linux x86_64 Guía de introducción
Notas, precauciones y avisos NOTA: una NOTA proporciona información importante que le ayudará a utilizar mejor el equipo. PRECAUCIÓN: Un mensaje de PRECAUCIÓN indica la posibilidad de daños en el hardware o la pérdida de datos si no se siguen las instrucciones. AVISO: un mensaje de AVISO indica el riesgo de daños materiales, lesiones o incluso la muerte. _______________ La información contenida en esta publicación puede modificarse sin previo aviso. © 2011 Dell Inc. Todos los derechos reservados.
Contenido 1 Descripción general . Antes de comenzar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 240 . . . . . . . . . 240 . . . . . . . . . . 241 Requisitos del sistema operativo 2 239 . . . . . . . . . . . . . . . . . Requisitos de hardware . Requisitos de red 239 Preparación de nodos para una instalación Oracle . . . Conexión con un repositorio RHN/ULN Instalación de Dell Validated RPM. . . . . . . . . 241 . . . . . . . . . .
3 Preparación del almacenamiento compartido para una instalación Oracle RAC . . . . . . . . . . . . . . . . . Particionamiento del disco compartido . . . . . . 255 . . . . . . . 256 Ajuste del tamaño del elemento de banda en una partición primaria . . . . . . . . . . . . . Instalación y configuración de ASMlib . . . . . 259 . . . . . . . 262 Uso de ASMLib para marcar los discos compartidos como discos candidatos . 4 Instalación de Oracle 11g R2 Grid Infrastructure . . . . . . . . . . . . . . .
7 8 Creación de grupos de discos mediantes el asistente para la configuración de ASM (ASMCA) Creación de una base de datos que utiliza DBCA . . . . . . . . . . . . . . . . . 277 . . . . . .
Contenido
Descripción general Este documento se aplica a la base de datos Oracle 11g R2 que se ejecuta en Red Hat Enterprise Linux 5.x AS x86_64 u Oracle Enterprise Linux 5.x AS x86_64. Antes de comenzar Requisitos de hardware • Oracle requiere 1,5 gigabytes (Gb) de memoria física. • El espacio de intercambio debe ser igual a la cantidad de RAM asignada al sistema. • El espacio temporal de Oracle (/tmp) debe tener un tamaño mínimo de 1 Gb.
Requisitos de red • Se recomienda que se asegure que cada nodo cuenta con al menos tres tarjetas de interfaz de red (NIC). Una NIC para la red pública y dos NIC para la red privada que aseguren alta disponibilidad de Oracle Real Application Clusters (RAC). • Los nombres de las interfaces públicas y privadas deben ser el mismo en todos los nodos. Por ejemplo, si eth0 se emplea como interfaz pública en el nodo uno, todos los demás nodos requieren que eth0 sea la interfaz pública.
Preparación de nodos para una instalación Oracle Conexión con un repositorio RHN/ULN NOTA: La documentación suministrada trata la forma de configurar un repositorio yum local con el soporte físico de instalación del sistema operativo. Si desea conectar con canales Red Hat Network (RHN)/Unbreakable Linux Netwrok (ULN), consulte la documentación correspondiente.. Para Red Hat, consulte redhat.com/red_hat_network. Para obtener información sobre una red ULN, consulte linux.oracle.com.
2 Para instalar y configurar el demonio http, configure el equipo que alojará el repositorio de todas las otras máquinas que utilizarán la imagen en DVD a nivel local. Cree el archivo /etc/yum.repos.d/local.
• El paso final es obtener el nombre DNS o la IP del servidor que aloja el repositorio. El nombre DNS o la IP del servidor de alojamiento se usará para configurar el archivo repo del repositorio yum en el servidor cliente. El siguiente es un ejemplo de configuración usando el soporte físico de RHEL 5.x Server en el archivo de configuración /etc/yum.repos.d/myRepo.repo [myRepo] name=RHEL5.5 DVD baseurl= http://reposerver.mydomain.com/RHEL5_5/Server enabled=1 gpgcheck=0 NOTA: Sustituya reposerver.mydomain.
3 Para ir al directorio de trabajo, escriba el comando siguiente: # cd 4 Desempaquete la versión del tar Dell-Oracle-Deployment mediante el siguiente comando: # tar -xvf Dell-Oracle-Deployment-o-y-m.tar NOTA: Donde o es la versión del sistema operativo, y el año y m el mes de la versión del tar.
El proceso de instalación del RPM de las utilidades Oracle de Dell es el siguiente: 1 Descargue el archivo tar de implementación Oracle de Dell más reciente de http://en.community.dell.com/dell-groups/ enterprise_solutions/m/oracle_db_gallery/default.aspx NOTA: El nombre del archivo tiene la siguiente convención: Dell-OracleDeployment-OS versión-año-mes.tar, por ejemplo: Dell-Oracle-DeploymentLin-2011-07.
Ubicación del software binario de Oracle El software binario de Oracle debe estar ubicado en el nodo uno del clúster. Es importante tener en cuenta que a partir de Oracle 11g R2 (11.2.0.2), los conjuntos de las revisiones de las bases de datos Oracle son instalaciones completas del software de Oracle. Para obtener más información sobre cómo se ven afectadas las futuras implementaciones de Oracle, consulte My Oracle Support, nota: 1189783.1 Important Changes to Oracle Database Patch Sets Starting with 11.2.
3 Edite el archivo /etc/sysconfig/network y, en caso necesario, sustituya localhost.localdomain por el nombre completo del nodo público. Por ejemplo, el comando para el nodo 1 será: hostname= node1.dominio.com 4 Escriba service network restart para reiniciar el servicio de red. 5 Escriba ifconfig para comprobar que las direcciones IP están definidas correctamente.
El ejemplo siguiente proporciona instrucciones detalladas, paso a paso, sobre la interconexión redundante mediante HAIP en una nueva instalación de Oracle 11gR2 (11.2.0.2) Grid Infrastructure. 1 Modifique el archivo /etc/sysconfig/network-scripts/ifcfg-ethX, donde X es el número del dispositivo eth, ifcfg-ethX los archivos de configuración de los adaptadores utilizados en la interconexión privada. El siguiente ejemplo muestra eth1 y eth2 empleando una subred 192.168.0.*.
3 Para verificar que la interconexión redundante mediante HAIP se está ejecutando, se puede probar dicha función con el comando ifconfig. A continuación se incluye un ejemplo del resultado. ifconfig eth1 Link encap:Ethernet 00:1E:C9:4B:72:22 HWaddr inet addr:192.168.0.140 Bcast:192.168.0.255 Mask:255.255.255.
inet6 addr: fe80::216:3eff:fe11:1122/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6369306 errors:0 dropped:0 overruns:0 frame:0 TX packets:4270790 errors:0 dropped:0 overruns:0 frame:0 collisions:0 txqueuelen:1000 RX bytes:3037449975 (2.8 GiB) bytes:2705797005 (2.5 GiB) eth2:1 Link encap:Ethernet 00:1E:C9:4B:71:24 TX HWaddr inet addr:169.254.167.163 Bcast:169.254.255.255 Mask:255.255.0.
Requisitos para las direcciones IP y la resolución de nombres Los siguientes pasos muestran cómo configurar los nodos del clúster para utilizar el sistema de de nombres de dominio (DNS). Para obtener información acerca de la forma de configurar nodos de clúster mediante GNS, consulte el artículo wiki http://en.community.dell.com/dellgroups/enterprise_solutions/w/oracle_solutions/1416.aspx.
Configuración de un servidor DNS Para configurar los cambios en un servidor DNS para un clúster Oracle 11g R2 que utiliza un DNS (sin GNS): 1 Configure la resolución del NOMBRE SCAN en el servidor DNS. Un NOMBRE SCAN configurado en el servidor DNS utilizando la directiva de operación por turnos debe resolverse en tres direcciones IP públicas (opción recomendada), pero el requisito mínimo es de una dirección IP pública. Por ejemplo: scancluster IN A 192.0.2.1 IN A 192.0.2.2 IN A 192.0.2.
2 Compruebe el orden de configuración. /etc/nsswitch.conf controla el orden del servicio de nombres. En algunas configuraciones, NIS puede causar problemas con la resolución de direcciones de SCAN de Oracle. Se recomienda colocar la entrada NIS al final de la lista de búsqueda y colocar primero la entrada dns. Por ejemplo, hosts: files dns nis Una vez modificado /etc/nsswitch.
Preparación de nodos para una instalación Oracle
Preparación del almacenamiento compartido para una instalación Oracle RAC NOTA: En esta sección, los términos disco, volumen, disco virtual y LUN tienen el mismo significado y se emplean indistintamente a menos que se indique lo contrario. Del mismo modo, los términos Tamaño del elemento de banda y Tamaño del segmento se usan indistintamente.
Particionamiento del disco compartido En esta sección se describe cómo utilizar la utilidad nativa de partición fdisk de Linux para crear y alinear un único volumen/disco virtual que se extienda a todo el disco. PRECAUCIÓN: En un sistema que ejecuta el sistema operativo Linux, alinee el disco antes de escribir en el volumen/disco virtual (VD). En caso contrario se perderán todos los datos en el disco.
c Partition number (1-4): 1 (Número de partición) d First sector (63-xxxxxx, default 63): Donde Tamaño del elemento de banda (SES) o Tamaño del segmento (SS) es la cantidad de espacio utilizada en un único disco físico por el elemento de banda como parte de la banda. Por ejemplo, una banda que contiene 256 Kb de espacio en disco y tiene 65 Kb de datos ubicados en cada disco de la banda.
El sistema muestra el mensaje siguiente: The partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks. (La tabla de partición ha sido alterada. Llamada a ioctl() para volver a leer la tabla de partición. Sincronizando discos.) Si en su lugar aparece un mensaje de aviso indicando que el kernel todavía está leyendo la tabla de partición antigua, efectúe el paso 3 para que el kernel pueda volver a leer la nueva tabla de partición.
Units = sectors of 1 * 512 = 512 bytes (Unidades = sectores de 1 * 512 = 512 bytes) DeviceBoot (Inicio de dispositivo) Start End (Fin) (Inicio) /dev/mapper/mpat h70p1 1024 Blocks (Bloques) Id System (Identi- (Sistema) ficativo) 104872319 52436096 83 Linux 5 Reinicie el sistema si la partición recién creada y alineada no se visualiza correctamente.
1) software that runs at boot time (e.g., old versions of LILO) (el software que se ejecuta en el momento del inicio [versiones antiguas de LILO]) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) (software de inicio y de particionamiento desde otro sistema operativo [por ejemplo, DOS FDISK, OS/2 FDISK]) a. Command (m for help): x # To enter the expert Mode (Comando (m para obtener ayuda): x # Para iniciar el modo experto) b.
3 Ejecute el siguiente comando para volver a analizar todas las particiones del nodo uno cuando se utiliza device mapper: #> kpartx -a /dev/mapper/ En todos los demás nodos ejecute: #> kpartx -l /dev/mapper/ NOTA: Si el nombre del dispositivo no termina en “p1”, reinicie el sistema. La convenciones de nombres propios añadirá “p1” y lo mostrará como /dev/mapper/ACFSp1.
Instalación y configuración de ASMlib 1 Descargue desde oracle.com/technetwork/server-storage/ linux/downloads/rhel5-084877.html los siguientes archivos: • oracleasm-support • oracleasmlib • oracleasm NOTA: Si el sistema operativo de distribución actual es Oracle Linux, puede obtener el software en Unbreakable Linux Network mediante ULN. NOTA: Descargue la versión más reciente de oracleasm-support y oracleasmlib pero la versión de oracleasm debe coincidir con el kernel utilizado en el sistema.
Default group to own the driver interface []: asmadmin (Grupo predeterminado propietario de la interfaz del controlador []: asmadmin) Start Oracle ASM library driver on boot (y/n) [n]: y (Iniciar el controlador de biblioteca ASM de Oracle al iniciar) Fix permissions of Oracle ASM disks on boot (y/n) [y]:y (Corregir permisos de discos ASM de Oracle al iniciar) NOTA: In esta configuración, el usuario predeterminado se establece como grid y el grupo predeterminado como asmadmin.
4 Para crear discos ASM que puedan ser administrados y utilizados por la instalación de la base de datos Oracle, ejecute el siguiente comando como usuario de raíz: /usr/sbin/oracleasm createdisk NOMBREDELDISCO /dev/mapper/particióndeldisco NOTA: Los campos NOMBREDELDISCO y /dev/mapper/particióndeldisco se deben sustituir respectivamente por los nombres apropiados del entorno. NOTA: Es muy recomendable tener todos los discos relativos a Oracle dentro de ASM de Oracle.
Instalación de Oracle 11g R2 Grid Infrastructure Esta sección ofrece información sobre la instalación de Oracle 11g R2 Grid Infrastructure para un clúster. Antes de comenzar Antes de instalar el software Oracle 11g R2 RAC en el sistema: • Asegúrese de que ya ha configurado el sistema operativo, la red y el almacenamiento en base a los pasos de las secciones anteriores de este documento. • Localice el conjunto de soportes físicos de Oracle 11g R2.
Configuración del nodo uno Los siguientes pasos se refieren al nodo uno del entorno de clústeres mientras no se especifique lo contrario. 1 Inicie la sesión como usuario de raíz. 2 Si no se encuentra en un entorno gráfico, inicie el Sistema X Window escribiendo: startx 3 Abra una ventana de terminal y escriba: xhost +. 4 Coloque el soporte físico de Oracle Grid Infrastructure. 5 Inicie sesión como usurario de grid, por ejemplo: su - grid.
11 En la ventana Grid Plug and Play Information (Información de Plug and Play de Grid), especifique la información siguiente: • Cluster Name (Nombre del clúster): escriba un nombre para el clúster. • SCAN Name (Nombre SCAN): introduzca el nombre registrado en el servidor DNS, que es exclusivo para todo el clúster. Para obtener información detallada sobre el nombre de SCAN, consulte “Requisitos para las direcciones IP y la resolución de nombres” en la página 251.
16 En la ventana Storage Options Information (Información de opciones de almacenamiento), seleccione Automatic Storage Management (ASM) y haga clic en Next (Siguiente).
21 En la ventana Installation Location (Ubicación de la instalación), especifique los valores de Oracle Base (Base Oracle) y Software Location (Ubicación del software) según estén configuradas en el RPM de las utilidades Oracle de Dell. NOTA: Las ubicaciones predeterminadas del RPM de las utilidades Oracle de Dell son: • Oracle Base (Base Oracle) - /u01/app/grid • Software Location (Ubicación del software) - /u01/app/11.2.
Instalación de Oracle 11g R2 Grid Infrastructure
Configuración de la ubicación principal de Oracle compartida para los binarios de la base de datos que utilizan ACFS Los siguientes pasos son aplicables al nodo uno del entorno de clústeres mientras no se especifique lo contrario: 1 Inicie la sesión como usuario de raíz y escriba: xhost + 2 Inicie la sesión como usuario de grid y ejecute la utilidad asmca escribiendo: $/bin/asmca 3 En la ventana ASM Configuration Assistant (Asistente para la configuración de ASM), seleccione la ficha Disk Gr
6 En la pantalla Create ACFS Hosted Database Home Volume (Crear volumen de la ubicación principal de la base de datos alojada de ACFS): • Especifique el nombre del volumen (por ejemplo, ORAHOME.) • Especifique el nombre para el punto de montaje para Database Home (Ubicación principal de la base de datos) (por ejemplo, /u01/app/oracle/acfsorahome). • Especifique Database Home Size (Tamaño de la ubicación principal de la base de datos) (al menos 20 Gb).
Instalación del software de bases de datos (RDBMS) Oracle 11g R2 Los siguientes pasos se refieren al nodo uno del entorno de clústeres mientras no se especifique lo contrario. 1 Inicie la sesión como usuario de raíz y escriba: xhost +. 2 Inserte el soporte físico de Oracle Database 11g R2.
8 En la ventana Grid Installation Options (Opción de instalación de Grid): • Seleccione Oracle Real Application Clusters database installation (Instalación de la base de datos Oracle Real Application Clusters) y seleccione todos los nodos haciendo clic en el botón Select All (Seleccionar todos). • Haga clic en SSH Connectivity (Conectividad SSH) y configure la conectividad SSH sin contraseña especificando la contraseña del sistema operativo del usuario y seleccione Setup (Configuración).
13 En la ventana Perform Prerequisite Checks (Ejecutar comprobaciones de requisitos previos), compruebe el estado general de todos los requisitos previos. • Si alguno de los requisitos previos falla y el estado es Fixable (Corregible), haga clic en el botón Fix & Check Again (Corregir y comprobar de nuevo), • Ejecute la secuencia de comandos runfixup.sh proporcionada por el OUI de Oracle.
Instalación del software de bases de datos
Creación de grupos de discos mediantes el asistente para la configuración de ASM (ASMCA) En esta sección se describen los procedimientos necesarios para crear el grupo de discos ASM para los archivos de base de datos y el área de recuperación flashback (FRA). 1 Inicie la sesión como usurario de grid. 2 Inicie la utilidad ASMCA escribiendo: $/bin/asmca 3 En la ventana ASM Configuration Assistant (Asistente para la configuración de ASM), seleccione la ficha Disk Groups (Grupos de discos).
8 Haga clic en Ok (Aceptar) para crear y montar los discos. 9 Repita del paso 4 al paso 8 para crear otro grupo de discos para el área de recuperación flashback (FRA). NOTA: Asegúrese de etiquetar el grupo de discos FRA de forma diferente que el nombre del grupo de discos de la base de datos.
Creación de una base de datos que utiliza DBCA Los siguientes pasos son aplicables al nodo uno del entorno de clústeres mientras no se especifique lo contrario: 1 Inicie la sesión como usuario oracle. 2 Desde $, ejecute la utilidad DBCA escribiendo: $/bin/dbca & 3 En la ventana Welcome (Bienvenido), seleccione Oracle Real Application Cluster Database (Base de datos Oracle Real Application Cluster) y haga clic en Next (Siguiente).
8 En la ventana Database Credentials (Credenciales de la base de datos), especifique las credenciales correspondientes a la base de datos. 9 En la ventana Database File Location (Ubicaciones de archivos de base de datos), seleccione: • Automatic Storage Management (ASM) para Storage Type (Tipo de almacenamiento). • Use Oracle-Managed Files (Utilizar archivos administrados por Oracle) para Storage Location (Ubicación del almacenamiento).
14 En la ventana Creation Options (Opciones de creación), haga clic en Finish (Finalizar). 15 En la ventana Summary (Resumen), haga clic en Ok (Aceptar) para crear la base de datos. NOTA: La creación de la base de datos puede tardar algún tiempo en completarse. 16 Haga clic en Exit (Salir) en la ventana Database Configuration Assistant (Asistente para la configuración de bases de dato) tras completarse la creación de la base de datos.
Creación de una base de datos que utiliza DBCA