诗檀软件-Oracle数据库迁移及高可用方案

诗檀软件-Oracle数据库迁移及高可用方案

下载诗檀软件-Oracle数据库迁移及高可用方案.pdf

 

oracle database 11.2.0.1 AIX 7.1的认证

oracle database 11.2.0.1 AIX 7.1的认证:11.2.0.1是认证AIX 7.1操作系统的。

但要求AIX 7.1上安装以下三个APAR:

The customers must install the follow APARs (IBM OS Patches) on AIX7.1:

  • IZ87216
  • IZ87564
  • IZ89165

 

Screen Shot 2014-11-14 at 2.30.46 PM

 

 

Oracle Database 11.2.0.1.0 with IBM AIX on POWER Systems (64-bit) 7.1

Product: For general information relating to certification for the Oracle Database product, including virtualization, interoperability, binary compatibiliy, general release and patch set information, see Core Database Certification Information (Doc ID 1306539.1).

Platform: For details about certification of all Oracle Database releases on IBM AIX on Power, click here.

ACFS requires a minimum OS level of  AIX 6.1 TL4 SP2, AIX 7.1 is not supported at this time. For more details please review Oracle documentation

Oracle Database products are tested and certified on the AIX 5,  AIX 6  and AIX 7 operating systems. The customers must install the follow APARs (IBM OS Patches) on AIX7.1:

  • IZ87216
  • IZ87564
  • IZ89165

For further details on minimum software versions and patch requirements, refer to 282036.1

Certification: For details specific to the certification of Oracle Database Release 11.2 on IBM AIX on Power, click here.

The following notes apply to release 11.2.0.1.0 of Oracle Database:

ACFS: Oracle Cloud File System (ACFS) certification details are listed under the “Oracle Cloud File System” product

 

【转】在OEL/Redhat 5/6上安装Oracle Database 12.1 的要求

在 RHEL6 或 OL6 64 位 (x86-64) 上安装 Oracle Database 12.1 的要求 (Doc ID 1603241.1)

 

适用于:

Oracle Database – Standard Edition – 版本 12.1.0.1 和更高版本
Oracle Database – Enterprise Edition – 版本 12.1.0.1 和更高版本
Linux x86-64

用途

本说明介绍在 Red Hat Enterprise Linux 6.0 或 Oracle Linux 6(或更高版本的 6.x)64 位 (x86-64) 上成功安装 Oracle Database 12.1 版本需要满足的要求。

本说明并非重复介绍《Oracle Database 12.1 Installation Guide》中所提供的“方法”步骤。例如,本说明不包含如何创建名为“oracle”的 Linux OS 帐户,也不涉及如何设置环境变量。这些内容在《Oracle®Database Installation Guide 12c Release 1 (12.1) for Linux》中已充分说明。

适用范围

本过程面向在 64 位 (x86-64) 平台的 RHEL 6.0 上计划/安装 Oracle Database 12.1 的用户。由于明确目标是确保 Oracle Linux (OL) 与 RHEL 一样正常工作,本说明也完全适用于 64 位 (x86-64) OL 6.0。

本过程不适用于规划/安装 Grid Infrastructure(简称 GI)或任何其他 Oracle 产品。

详细信息

在 RHEL6 或 OL6 64 位 (x86_64) 上安装 Oracle Database 12.1 版本 64 位的要求。

在继续安装之前,请用一点时间认真复查以下各项要求,以避免安装二进制文件期间出现任何明显的问题。

1. 下载 Oracle Database 12.1 软件

– 从 My Oracle Support 下载 Oracle Database 12.1 软件
Note 1194734.1 Where do I find that on My Oracle Support (MOS) [Video]

– 下载软件之后,验证所下载软件的完整性
Note 549617.1 How To Verify The Integrity Of A Patch/Software Download? [Video]

– 如果在其他计算机上下载了软件,请使用二进制模式将 zip 文件传输到要进行安装的服务器上,然后使用 Oracle 软件用户身份解压缩文件。

 

I. 硬件:

1. 最低硬件要求

a.) 确保系统满足以下物理内存要求:
最低:1 GB RAM
推荐:2 GB RAM 或更多

b.) 交换磁盘空间与系统物理内存的比例如下:

RAM 交换空间
1 GB 到 2 GB 之间 RAM 大小的 1.5 倍
2 GB 到 16 GB 之间 等于 RAM 的大小
超过 16 GB 16 GB

注:以上推荐值(摘自《Oracle® Database Installation Guide 12c Release 1 (12.1) for Linux》)是安装的最低要求。优化/改进 RDBMS 性能可能需要更多 RAM 和交换空间。

c.) /tmp 目录中有 1.0 GB (1024MB) 磁盘空间(磁盘空间小于 2TB)。

如果 /tmp 目录中可用的空闲空间小于所需空间,则完成以下步骤之一:
– 从 /tmp 目录删除不必要的文件以满足磁盘空间要求。
– 在设置 Oracle 用户环境时设置 TMP 和 TMPDIR 环境变量。

d.) 约 6.5 GB 的本地磁盘空间用于数据库软件文件。

e.) 如果要在安装期间创建预配置数据库,则所选文件系统必须至少具有 2 GB 空闲磁盘空间。
对于生产数据库,必须根据数据库的使用来估算磁盘空间要求。

2. 支持在 ext2、ext3 和 ext4 文件系统上运行 Oracle 数据库(有关详细信息,请参阅 Note:236826.1)。

 

II. 软件:

1. 经过认证的 Linux 操作系统

Oracle Linux 6
Red Hat Enterprise Linux 6

2. Oracle 推荐使用默认软件程序包 (RPM) 安装 Linux 操作系统,并且在安装期间不要定制 RPM。有关“default-RPMs”的详细信息,请参阅 Note 376183.1, “Defining a “default RPMs” installation of the RHEL OS” 或 Note 401167.1, “Defining a “default RPMs” installation of the Oracle Enterprise Linux (OEL) OS”。

3. Linux 内核要求

采用 Unbreakable Enterprise 内核的 Oracle Linux 6:2.6.39-200.24.1.el6uek.x86_64 或更高版本
采用 Red Hat 兼容内核的 Oracle Linux 6:2.6.32-71.el6.x86_64 或更高版本
Red Hat Enterprise Linux 6:2.6.32-71.el6.x86_64 或更高版本
采用 Unbreakable Enterprise 内核的 Red Hat Enterprise Linux 6:2.6.32-100.28.5.el6.x86_64 或更高版本

Note 1508516.1 Is It Mandatory To Install UEK Kernel Under RHEL?

4. 所需操作系统组件(根据发行说明和安装指南)

a.) 此列表的确切版本号详细信息基于 64 位 (x86_64) RHEL 6.0。使用更高的“update”级别时,RPM 版本号(例如 4.4.4-13)可能略有不同。由于 RHEL 6 的更新通过了认证,因此只要仍使用 64 位 Linux (x86_64) RHEL 6 RPM 就不会有问题。

b.) 您开始使用的 Linux 的“default-RPMs”基础平台中可能已经满足了一些安装指南要求:

  1. binutils-2.20.51.0.2-5.11.el6 (x86_64)
  2. glibc-2.12-1.7.el6 (x86_64)
  3. libgcc-4.4.4-13.el6 (x86_64)
  4. libstdc++-4.4.4-13.el6 (x86_64)
  5. libaio-0.3.107-10.el6 (x86_64)
  6. libXext-1.1 (x86_64)
  7. libXtst-1.0.99.2 (x86_64)
  8. libX11-1.3 (x86_64)
  9. libXau-1.0.5 (x86_64)
  10. libxcb-1.5 (x86_64)
  11. libXi-1.3 (x86_64)
  12. make-3.81-19.el6
  13. sysstat-9.0.4-11.el6 (x86_64)

c.) 必须安装的剩余安装指南要求:

  1. compat-libcap1-1.10-1 (x86_64)
  2. compat-libstdc++-33-3.2.3-69.el6 (x86_64)
  3. gcc-4.4.4-13.el6 (x86_64)
  4. gcc-c++-4.4.4-13.el6 (x86_64)
  5. glibc-devel-2.12-1.7.el6 (x86_64)
  6. ksh  <== 任何版本的 ksh 都可以。
  7. libstdc++-devel-4.4.4-13.el6 (x86_64)
  8. libaio-devel-0.3.107-10.el6 (x86_64)

d.) 希望安装 Oracle Database 12.1 32 位客户端软件的客户还应安装以下程序包:

  1. compat-libstdc++-33-3.2.3-69.el6 (i686)
  2. glibc-2.12-1.7.el6 (i686)
  3. glibc-devel-2.12-1.7.el6 (i686)
  4. libgcc-4.4.4-13.el6 (i686)
  5. libstdc++-4.4.4-13.el6 (i686)
  6. libstdc++-devel-4.4.4-13.el6 (i686)
  7. libaio-0.3.107-10.el6 (i686)
  8. libaio-devel-0.3.107-10.el6 (i686)
  9. libXext-1.1 (i686)
  10. libXtst-1.0.99.2 (i686)
  11. libX11-1.3 (i686)
  12. libXau-1.0.5 (i686)
  13. libxcb-1.5 (i686)
  14. libXi-1.3 (i686)

5. 其他必需操作系统组件(根据 runInstaller OUI)
a.) 预留,目前没有

6. 其他必需操作系统组件(根据本文)

a.) 请勿草率运行、跳过或减少这一关键步骤。此列表基于 64 位 (x86_64) RHEL Server 6 的“default-RPMs”安装。如果执行 64 位 (x86_64) RHEL Server 6 的“less-than-default-RPMs”安装,则可能需要其他 RPM(在 Oracle 已知之外的任何程序包)。有关详细信息,请参阅 Note 376183.1, “Defining a “default RPMs” installation of the RHEL OS”

b.) 第 II.3.c 部分中列出的内容将需要多个 RPM 作为先决条件:

            cloog-ppl.x86_64 0:0.15.7-1.2.el6
cpp.x86_64 0:4.4.6-4.el6
glibc-headers.x86_64 0:2.12-1.80.el6
kernel-headers.x86_64 0:2.6.32-279.el6
mpfr.x86_64 0:2.4.1-6.el6
ppl.x86_64 0:0.10.2-11.el6
redhat-release-6Server-1.noarch (只针对于 RHEL)

7. Oracle 全球客户支持最近发现,安装过多 RPM 有可能会导致出现安装问题。例如:

a.) 在 Linux 上,无需安装您自己的 JDK 版本(在执行 Oracle 软件 runInstaller 之前),并且在 Linux 上不推荐这样做。预先安装的 JDK 通常会干扰 Linux Oracle 软件 runInstaller 将放置和使用的正确 JDK。

b.) 安装所需版本之外的 gcc/g++ RPM 通常会导致意外使用(即启用或激活)不正确的版本。如果相同 Linux 计算机上安装了多个 RDBMS 版本,则您可能需要管理多个版本的 gcc/g++。有关详细信息,请参阅 Note 444084.1, “Multiple gcc / g++ Versions in Linux”

8. 第 II. 部分中的所有 RPM 均位于 Red Hat Enterprise Linux 6 64 位 (x86_64) 分发介质上。

 

III. 环境:

1. 以下为数据库软件安装所需的最低推荐内核参数设置。请按以下所示修改 /etc/sysctl.conf 中的内核设置。

注:如果任何参数的当前值高于列出的值,请勿更改该参数的值。

kernel.shmall = 1/2 的物理内存页面数,此值将为 2097152。有关详细信息,请参阅 Note 301830.1。
kernel.shmmax = 1/2 的物理内存量(字节)。对于 4GB 物理 RAM 的系统,此值为 2147483648。

对于 32 位 Linux 系统:
最低:536870912 (512 MB)
最高:比 4 GB 少 1 个字节的值,也就是 4294967295
推荐:超过物理内存的一半

对于 64 位 Linux 系统:
最低:536870912 (512 MB)
最高:比物理内存少 1 个字节的值
推荐:超过物理内存的一半

有关配置 shmmax 的详细信息,请参阅 My Oracle Support Note 567506.1。

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576

注:此值限制并行未完成请求数,应设置此值以避免 I/O 子系统故障。

net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

2. 要在运行的内核空间中激活这些新设置,请以 root 身份运行“sysctl -p”命令。

3. 设置 Oracle 用户的 Shell 限制。假设“oracle”Unix 用户将执行安装,请执行以下操作:

a.) 将以下设置添加到安装所有者的 /etc/security/limits.conf 配置文件。

oracle              soft    nproc    2047
oracle              hard   nproc   16384
oracle              soft    nofile    1024
oracle              hard   nofile    65536
oracle              soft    stack    10240
oracle              hard   stack    10240

注:limits.conf 文件发生更改时,这些更改立即生效。但是,如果 Oracle 用户已登录,则这些更改将在注销这些用户并重新登录之后生效。必须先完成此操作,然后再使用这些帐户进行安装。

b.) 确保加载了最新版本的 PAM,然后在 /etc/pam.d/login 文件中添加或编辑以下行(如果还没有这些内容):

session required pam_limits.so

c.) 验证当前 ulimit,如果需要则增大。可以采用多种方式完成此操作,推荐方法是在 /etc/profile 中添加以下行:

if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

4. 以上 gcc-4.1.2 和 gcc-c++-4.1.2 RPM 项将确保安装了正确的 gcc/g++ 版本。还需要确保这些正确的 gcc/g++ 版本活动且处于使用中。确保命令“gcc –version”和“g++ –version”均返回“4.1.x”。

5. hostname 命令应返回完全合格的主机名,如下所示:

% hostname
hostname.domainname

6. 如果系统上安装了任何 Java 程序包,则取消设置 Java 环境变量,例如 JAVA_HOME。

7. 用于安装 Oracle Database 12.1 的 Oracle 帐户,默认情况下不应设置了任何与 Oracle 安装相关的变量。例如,应彻底避免设置 ORACLE_HOME、PATH、LD_LIBRARY_PATH 以在 .profile、.login 文件和 /etc/profile.d 中包括 Oracle 可执行程序。

a.) 推荐设置 $ORACLE_BASE(非 $ORACLE_HOME),因为这可以简化 OUI runInstaller 工具中的几个提示。
b.) 在成功安装后,建议设置 $ORACLE_HOME,并且设置 $PATH 以将 $ORACLE_HOME/bin 包括在 $PATH 字符串的开头。

8. 默认情况下,RHEL 6 x86_64 Linux 以“enforcing”模式启用 SELinux。对于 Oracle Database 12.1 安装过程而言,这没有问题。

9. 以 Oracle 用户身份登录,然后启动安装如下所示:

./runInstaller

a.) 最佳实践是不使用任何形式的“su”来启动 runInstaller,以避免潜在的与显示相关的问题。
b.) 执行 Oracle Database 12.1 安装时,确保使用随 Oracle Database 12.1 软件提供的“runInstaller”版本。
c.) 执行任何后续的 12.1.0.x 补丁集安装时,确保使用随补丁集提供的“runInstaller”版本。

 

附加说明

1. 从 Oracle Database 12.1 开始, 不再提供 32 位 Oracle 数据库服务器端软件。

2. 通过认证的 32 位 (x86) Oracle 数据库客户端软件可以运行在采用 x86_64 架构的 AMD64/EM64T 和 Intel 处理器芯片上的 Linux OS 上。采用 64 位操作系统的 AMD64/EM64T 正常应该支持运行 Oracle 32 位数据库客户端软件,但这不在本文的涵盖范围内。

3. 如果 scsi/fc 驱动程序支持异步功能,则 ext2 和 ext3 文件系统上支持异步 I/O。

注:在 OEL5.6 和更高版本上,Oracle 10g 及更高版本支持 Ext4 文件系统上的异步 I/O。
参考: Oracle Linux, Filesystem & I/O Type Supportability (Note 279069.1)

4. x86_64 的 DIRECTIO 支持无需额外补丁程序。

5. 在 Oracle Database 12.1 产品上不应使用任何 LD_ASSUME_KERNEL 值。

6. 可以使用以下 rpm 命令来区分 32 位或 64 位程序包。

# rpm -qa –queryformat “%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n” | grep glibc-devel
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (i686)

7. 先决条件 RPM 与所需 libXi* 相关,用于解决 OUI 的 java 相关性并避免下文中提到的已知问题:
Note 1569369.1 libXi.so.6: cannot open shared object file: No such file or directory

 

 

 

 

 

在 RHEL5 或 OL5 64 位 (x86-64) 上安装 Oracle Database 12.1 的要求 (Doc ID 1602908.1)

 

 

适用于:

Oracle Database – Standard Edition – 版本 12.1.0.1 和更高版本
Oracle Database – Enterprise Edition – 版本 12.1.0.1 和更高版本
Linux x86-64

用途

本文介绍在 Red Hat Enterprise Linux 5.0 或 Oracle Linux 5(或更高版本的 5.x)64 位 (x86-64) 上成功安装 Oracle Database 12.1 版本需要满足的要求

本说明并非重复介绍《Oracle Database 12.1 Installation Guide》中所提供的“方法”步骤。例如,本说明不包含如何创建名为“oracle”的 Linux OS 帐户,也不涉及如何设置环境变量。这些内容在《Oracle®Database Installation Guide 12c Release 1 (12.1) for Linux》中已充分说明。

适用范围

本过程面向在 64 位 (x86-64) 平台的 RHEL 5.0 上计划/安装 Oracle Database 12.1 的用户。由于明确目标是确保 Oracle Linux (OL) 与 RHEL 一样正常工作,本说明也完全适用于 64 位 (x86-64) OL 5.0。

这仅适用于单实例 RDBMS 安装,不适用于规划/安装 Grid Infrastructure,(简称 GI)/ASM 或任何其他 Oracle 产品。

详细信息

在 RHEL5 或 OL5 64 位 (x86_64) 上安装 Oracle Database 12.1 版本 64 位的要求

在继续安装之前,请用一点时间认真复查以下各项要求,以避免安装二进制文件期间出现任何明显的问题。

1. 下载 Oracle Database 12.1 软件

– 从 My Oracle Support 下载 Oracle Database 12.1 软件
Note 1194734.1 Where do I find that on My Oracle Support (MOS) [Video]

– 下载软件之后,验证所下载软件的完整性
Note 549617.1 How To Verify The Integrity Of A Patch/Software Download? [Video]

– 如果在其他计算机上下载了软件,请使用二进制模式将 zip 文件传输到要进行安装的服务器上,然后使用 Oracle 软件用户身份解压缩文件。

 

I. 硬件:

1. 最低硬件要求

a.) 确保系统满足以下物理内存要求:
最低:1 GB RAM
推荐:2 GB RAM 或更多

b.) 交换磁盘空间与系统物理内存的比例如下:

RAM 交换空间
1 GB 到 2 GB 之间 RAM 大小的 1.5 倍
2 GB 到 16 GB 之间 等于 RAM 的大小
超过 16 GB 16 GB

注:以上推荐值(摘自《Oracle® Database Installation Guide 12c Release 1 (12.1) for Linux》)是安装的最低要求。优化/改进 RDBMS 性能可能需要更多 RAM 和交换空间。

c.) /tmp 目录中有 1.0 GB (1024MB) 磁盘空间(磁盘空间小于 2TB)。

如果 /tmp 目录中可用的空闲空间小于所需空间,则完成以下步骤之一:
– 从 /tmp 目录删除不必要的文件以满足磁盘空间要求。
– 在设置 Oracle 用户环境时设置 TMP 和 TMPDIR 环境变量。

d.) 约 6.5 GB 的本地磁盘空间用于数据库软件文件。

e.) 如果要在安装期间创建预配置数据库,则所选文件系统必须至少具有 2 GB 空闲磁盘空间。
对于生产数据库,必须根据数据库的使用来估算磁盘空间要求。

2. 支持在 ext2、ext3 和 ext4 文件系统上运行 Oracle 数据库(有关详细信息,请参阅 Note:236826.1 for further information)

 

II. 软件:

1. 经过认证的 Linux 操作系统

Oracle Linux 5 Update 6 或更高版本
Red Hat Enterprise Linux 5 Update 6 或更高版本

2. Oracle 推荐使用默认软件程序包 (RPM) 安装 Linux 操作系统,并且在安装期间不要定制 RPM。有关“default-RPMs”的详细信息,请参阅 Note 376183.1, “Defining a “default RPMs” installation of the RHEL OS” 或 Note 401167.1, “Defining a “default RPMs” installation of the Oracle Enterprise Linux (OEL) OS”.

3. Linux 内核要求

采用 Unbreakable Enterprise 内核的 Oracle Linux 5 Update 6:2.6.32-100.0.19 或更高版本
采用 Red Hat 兼容内核的 Oracle Linux 5 Update 6:2.6.18-238.0.0.0.1.el5 或更高版本
Red Hat Enterprise Linux 5 Update 6 2.6.18-238.0.0.0.1.el5 或更高版本
采用 Unbreakable Enterprise 内核的 Red Hat Enterprise Linux 5 Update 6:2.6.32-100.0.19 或更高版本

Note 1508516.1 Is It Mandatory To Install UEK Kernel Under RHEL?

4. 所需操作系统组件(根据发行说明和安装指南)

a.) 此列表的确切版本号详细信息基于 64 位 (x86_64) RHEL 5.0。使用更高的“update”级别时,RPM 版本号(例如 4.1.4-13)可能略有不同。由于 RHEL 5 的更新通过了认证,因此只要仍使用 64 位 Linux (x86_64) RHEL 5 RPM 就不会有问题。

b.) 您开始使用的 Linux 的“default-RPMs”基础平台中可能已经满足了一些安装指南的要求:

1. binutils-2.17.50.0.6 (x86_64)
2. compat-libstdc++-33-3.2.3 (x86_64)
3. glibc-2.5-58 (x86_64)
4. ksh  <== 可接受任何版本的 ksh
5. libaio-0.3.106 (x86_64)
6. libgcc-4.1.2 (x86_64)
7. libstdc++-4.1.2 (x86_64)
8. libXext-1.0.1 (x86_64)
9. libXtst-1.0.1 (x86_64)
10. libX11-1.0.3 (x86_64)
11. libXau-1.0.1 (x86_64)
12. libXi-1.0.1 (x86_64)
13. make-3.81 (x86_64)

 

c.) 必须安装的剩余安装指南要求:

1. gcc-4.1.2 (x86_64)
2. gcc-c++-4.1.2 (x86_64)
3. glibc-devel-2.5-58 (x86_64)
4. libaio-devel-0.3.106 (x86_64)
5. libstdc++-devel-4.1.2 (x86_64)
6. sysstat-7.0.2 (x86_64)

d.) 希望安装 Oracle Database 12.1 32 位客户端软件的客户还应安装以下程序包:

1. compat-libstdc++-33-3.2.3 (i386)
2. glibc-2.5-58 (i386)
3. glibc-devel-2.5-58 (i386)
4. libaio-0.3.106 (i386)
5. libaio-devel-0.3.106 (i386)
6. libgcc-4.1.2 (i386)
7. libstdc++-4.1.2 (i386)
8. libXext-1.0.1 (i386)
9. libXtst-1.0.1 (i386)
10. libX11-1.0.3 (i386)
11. libXau-1.0.1 (i386)
12. libXi-1.0.1 (i386)

4. 其他必需操作系统组件(根据 runInstaller OUI)

a.) 预留,现在暂时没有。

5. 其他必需的操作系统组件(根据本文)

a.) 请勿草率运行、跳过或减少这一关键步骤。此列表基于 64 位 (x86_64) RHEL Server 5 的“default-RPMs”安装。如果执行 64 位 (x86_64) RHEL Server 5 的“less-than-default-RPMs”安装,则可能需要其他 RPM(在 Oracle 已知之外的任何程序包)。有关详细信息,请参阅 Note 376183.1“Defining a “default RPMs” installation of the RHEL OS”

b.) 第 II.3.c 部分中列出的内容将需要多个 RPM 作为先决条件:
glibc-headers (x86-64)
kernel-uek-headers (x86-64)

6. Oracle 全球客户支持最近发现,安装过多 RPM 有可能会导致出现安装问题。例如:

a.) 在 Linux 上,无需安装您自己的 JDK 版本(在执行 Oracle 软件 runInstaller 之前),并且在 Linux 上不推荐这样做。预先安装的 JDK 通常会干扰 Linux Oracle 软件 runInstaller 将放置和使用的正确 JDK。

b.) 安装所需版本之外的 gcc/g++ RPM 通常会导致意外使用(即启用或激活)不正确的版本。如果相同 Linux 计算机上安装了多个 RDBMS 版本,则您可能需要管理多个版本的 gcc/g++。有关详细信息,请参阅 Note 444084.1, “Multiple gcc / g++ Versions in Linux”

7. 第 II. 部分中的所有 RPM 均位于 Red Hat Enterprise Linux 5 64 位 (x86_64) 分发介质上。

 

III. 环境:

1. 以下为数据库软件安装所需的最低推荐内核参数设置。请按以下所示修改 /etc/sysctl.conf 中的内核设置。

注:如果任何参数的当前值高于列出的值,请勿更改该参数的值。

kernel.shmall = 1/2 的物理内存页面数,此值将为 2097152。有关详细信息,请参阅 Note 301830.1。
kernel.shmmax = 1/2 的物理内存量(字节)。对于 4GB 物理 RAM 的系统,此值为 2147483648。

对于 32 位 Linux 系统:
最低:536870912 (512 MB)
最高:比 4 GB 少 1 个字节的值,也就是 4294967295
推荐:超过物理内存的一半

对于 64 位 Linux 系统:
最低:536870912 (512 MB)
最高:比物理内存少 1 个字节的值
推荐:超过物理内存的一半

有关配置 shmmax 的详细信息,请参阅 My Oracle Support Note 567506.1。

kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576

注:此值限制并行未完成请求数,应设置此值以避免 I/O 子系统故障。

net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

2. 要在运行的内核空间中激活这些新设置,请以 root 身份运行“sysctl -p”命令。

3. 设置 Oracle 用户的 Shell 限制。假设“oracle”Unix 用户将执行安装,请执行以下操作:

a.) 将以下设置添加到安装所有者的 /etc/security/limits.conf 配置文件。

oracle              soft    nproc    2047
oracle              hard   nproc   16384
oracle              soft    nofile    1024
oracle              hard   nofile    65536
oracle              soft    stack    10240
oracle              hard   stack    10240

注:limits.conf 文件发生更改时,这些更改立即生效。但是,如果 Oracle 用户已登录,则这些更改将在注销这些用户并重新登录之后生效。必须先完成此操作,然后再使用这些帐户进行安装。

b.) 确保加载了最新版本的 PAM,然后在 /etc/pam.d/login 文件中添加或编辑以下行(如果还没有这些内容):

session required pam_limits.so

c.) 验证当前 ulimit,如果需要则增大。可以采用多种方式完成此操作,推荐方法是在 /etc/profile 中添加以下行:

if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

4. 以上 gcc-4.1.2 和 gcc-c++-4.1.2 RPM 项将确保安装了正确的 gcc/g++ 版本。还需要确保这些正确的 gcc/g++ 版本活动且处于使用中。确保命令“gcc –version”和“g++ –version”均返回“4.1.x”。

5. hostname 命令应返回完全合格的主机名,如下所示:

% hostname
hostname.domainname

6. 如果系统上安装了任何 Java 程序包,则取消设置 Java 环境变量,例如 JAVA_HOME。

7. 用于安装 Oracle Database 12.1 的 Oracle 帐户,默认情况下不应设置了任何与 Oracle 安装相关的变量。例如,应彻底避免设置 ORACLE_HOME、PATH、LD_LIBRARY_PATH 以在 .profile、.login 文件和 /etc/profile.d 中包括 Oracle 可执行程序。

a.) 推荐设置 $ORACLE_BASE(非 $ORACLE_HOME),因为这可以简化 OUI runInstaller 工具中的几个提示。
b.) 在成功安装后,建议设置 $ORACLE_HOME,并且设置 $PATH 以将 $ORACLE_HOME/bin 包括在 $PATH 字符串的开头。

8. 默认情况下,RHEL 5 x86_64 Linux 会以“enforcing“模式启用 SELinux。对于 Oracle Database 12.1 安装而言,这没有问题。

9. 以 Oracle 用户身份登录,然后启动安装如下所示:

./runInstaller

a.) 最佳实践是不使用任何形式的“su”来启动 runInstaller,以避免潜在的与显示相关的问题。
b.) 执行 Oracle Database 12.1 安装时,确保使用随 Oracle Database 12.1 软件提供的“runInstaller”版本。
c.) 执行任何后续的 12.1.0.x 补丁集安装时,确保使用随补丁集提供的“runInstaller”版本。

 

附加说明

1. 从 Oracle Database 12.1 开始,不再提供 32 位 Oracle 数据库服务器端软件。

2. 通过认证的 32 位 (x86) Oracle 数据库客户端软件可以运行在采用 x86_64 架构的 AMD64/EM64T 和 Intel 处理器芯片上的 Linux OS 上。采用 64 位操作系统的 AMD64/EM64T 正常应该支持运行 Oracle 32 位数据库客户端软件,但这不在本文的涵盖范围内。

3. 如果 scsi/fc 驱动程序支持异步功能,则 ext2 和 ext3 文件系统上支持异步 I/O。

注:在 OEL5.6 和更高版本上,Oracle 10g 及更高版本支持 Ext4 文件系统上的异步 I/O。
Reference : Oracle Linux, Filesystem & I/O Type Supportability (Note 279069.1)

4. x86_64 的 DIRECTIO 支持无需额外补丁程序。

5. 在 Oracle Database 12.1 产品上不应使用任何 LD_ASSUME_KERNEL 值。

6. 可以使用以下 rpm 命令来区分 32 位或 64 位程序包。

# rpm -qa –queryformat “%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n” | grep glibc-devel
glibc-devel-2.5-58 (x86_64)
glibc-devel-2.5-58 (i386)

7. 先决条件 RPM 与所需 libXi* 相关,用于解决 OUI 的 java 相关性并避免下文中提到的已知问题:
Note 1569369.1 libXi.so.6: cannot open shared object file: No such file or directory

在Oracle Linux 6.5上安装Oracle 10gR2 的最佳实践【Maclean版】

 

本安装文档的脚本下载: 在Oracle Linux 6.5上安装Oracle 10gR2 的最佳实践【Maclean版】脚本

安装成功的OS的RPM列表下载

有很多同学来咨询如何顺利在ORACLE/REDHAT linux 6上安装ORACLE 10gR2,由于10gR2的初始版本10.2.0.1是在2005年发布的,而最早的Linux 6也是在2010年发布的(Red Hat Enterprise Linux 6 (Santiago), 10 November 2010 Uses Linux kernel 2.6.32-71[17]) ,所以 10.2.0.1 对redhat/oracle linux 6都是不支持的;  即便是2010年发布的10.2.0.5对linux 6的兼容性也不佳。

这里最主要需要解决的几个问题:

1、 对于ORACLE 10gR2而言编译LINK需要用到GCC 3.4,但是Linux 6默认用的是GCC 4.4,所以需要安装必要的gcc兼容包

2、需要安装必要的libX 32bit的包 libXp.i686 libXt.i686 libXtst.i686等,保证java图形化界面启动

3、Linux 6的Network eth0等网络接口默认不启动

4、Linux 6的Firewall和SELINUX 现在不会在FirstBoot时可以禁用,需要安装后手动禁用

 

下面是安装步骤:

 

首先下载和在Vbox上安装Linux 6,我们选择ORACLE Linux 6.5,介质下载地址:http://pan.baidu.com/s/1jG1DfM2 即V41362-01.iso

安装过程与之前的 【视频教学】Maclean教你用Vbox在Linux 6.3上安装Oracle 11gR2 RAC http://t.askmaclean.com/thread-2007-1-1.html 是一样的,可以直接参考该视频

安装时指定Software包时选择Desktop即可

software

installing

 

 

Linux 6不能用root登录图形化界面,需要在Firstboot时创建一个用户并登录图形化界面,登录后点击右上角的网络图标,并启用默认的连接 connect automatically  并设置静态IP

 

 

 

 

 

network

 

 

edit connection eth0 connect automatically

 

enable networking

edit connection eth0 b

 

设置完IP 后注意/etc/hosts中的设置要正确:

 

[root@mac02 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.1.109  mac02 mac02.oracle.com

[root@mac02 ~]# ping mac02
PING mac02 (192.168.1.109) 56(84) bytes of data.
64 bytes from mac02 (192.168.1.109): icmp_seq=1 ttl=64 time=0.026 ms
64 bytes from mac02 (192.168.1.109): icmp_seq=2 ttl=64 time=0.039 ms
^C
--- mac02 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1053ms
rtt min/avg/max/mdev = 0.026/0.032/0.039/0.008 ms
[root@mac02 ~]# ping mac02.oracle.com
PING mac02 (192.168.1.109) 56(84) bytes of data.
64 bytes from mac02 (192.168.1.109): icmp_seq=1 ttl=64 time=0.020 ms
64 bytes from mac02 (192.168.1.109): icmp_seq=2 ttl=64 time=0.041 ms
^C
www.askmaclean.com
--- mac02 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1326ms
rtt min/avg/max/mdev = 0.020/0.030/0.041/0.011 ms

 

注意这里禁用FireWALL

firewall

 

firewall1

禁用FIREWALL ,后 还需要禁用SELINUX,修改/etc/selinux/config

将SELINUX=enforced 修改为SELINUX=disabled

之后init 6 重启OS

重启完成后 虚拟机再次加载之前下载的V41362-01.iso镜像,之后我们要安装一系列必要的rpm包

 

mount iso

 

以下配置YUM:

 

[root@mac02 ~]# mkdir  /media/disk

[root@mac02 ~]# mount /dev/cdrom /media/disk
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@mac02 ~]# 
[root@mac02 ~]# cd /media/disk/

touch /etc/yum.repos.d/public-yum-el6.repo

vi /etc/yum.repos.d/public-yum-el6.repo

[oel6]
name = Enterprise Linux 6.5 DVD
baseurl=file:///media/disk/Server/
gpgcheck=0
enabled=1

 

 

并删除 默认的YUM文件:rm /etc/yum.repos.d/public-yum-ol6.repo

下面安装RPM包,必须安装如下的glibc.i686 libXp.i686 libXt.i686 libXtst.i686否则图形化界面起不来, 注意以下少了任意一个都可能导致编译出错:

 

 

 

su - root

 yum install oracle-rdbms-server-11gR2-preinstall
 yum install glibc.i686
 yum install libXp.i686
 yum install libXt.i686
 yum install libXtst.i686
 yum install glibc-devel.i686 
 yum install compat-libstdc++-296.i686
 yum install compat-libstdc++-33.i686 
 yum install libstdc++.i686  
 yum install libstdc++-devel.i686
 yum install compat-gcc-34.x86_64

 

 

上面安装完oracle-rdbms-server-11gR2-preinstall 后,已经拥有oracle用户,配置密码并创建目录:

 

 

[root@mac02 yum.repos.d]# passwd oracle

[root@mac02 yum.repos.d]# mkdir /s01
[root@mac02 yum.repos.d]# chown oracle:oinstall /s01

[root@mac02 yum.repos.d]# su - oracle
[oracle@mac02 ~]$ id
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)
[oracle@mac02 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31449
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 2047
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

 

 

 

上传 ORACLE 10g介质 10.2.0.1 10201_database_linux_x86_64.cpio 和 10.2.0.5 patchset p8202632_10205_Linux-x86-64.zip 2个介质
(注意 在国内下载到这些介质是很容易的事,如果你找不到,那么只能说你不太适合这个行当。。。)

以Oracle用户登录 虚拟机图形化界面(必须是ORACLE用户登录图形化界面)

 

 

 

解压安装包
[oracle@mac02 ~]$ cpio -idvm < 10201_database_linux_x86_64.cpio 
[oracle@mac02 ~]$ unzip p8202632_10205_Linux-x86-64.zip 

[oracle@mac02 ~]$ cd database/
[oracle@mac02 database]$ ./runInstaller  -ignoreSysPrereqs

runInstaller  启动安装10.2.0.1 的安装界面

install 10.2.0.1 10gR2 1

 

install 10.2.0.1 10gR2 2

 

install 10.2.0.1 10gR2 3

install 10.2.0.1 10gR2 4
install 10.2.0.1 10gR2 5

install 10.2.0.1 10gR2 6
install 10.2.0.1 10gR2 7

install 10.2.0.1 10gR2 8

注意由于10.2.0.1 并不认证Linux 6 所以编译过程中出错很正常,直接点击continue继续即可,到10.2.0.5升级时我们保证升级的LINK全部顺利通过即可,无需在此处纠结
install 10.2.0.1 10gR2 9
安装最后一步需要 root 用户执行2个脚本,必须要执行:

 

[root@mac02 ~]# /s01/oraInventory/orainstRoot.sh 
Changing permissions of /s01/oraInventory to 770.
Changing groupname of /s01/oraInventory to oinstall.
The execution of the script is complete

[root@mac02 ~]# 
[root@mac02 ~]# /s01/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /s01/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

 

 

返回oracle的虚拟机图形界面窗口 , 安装10.2.0.5 补丁:

[oracle@mac02 ~]$ cd Disk1/
[oracle@mac02 Disk1]$ ./runInstaller
install 10.2.0.5 1

install 10.2.0.5 2
install 10.2.0.5 3
install 10.2.0.5 4

install 10.2.0.5 5

install 10.2.0.5 6
最后切换到root 执行root.sh

[root@mac02 logs]# /s01/oracle/product/10.2.0/db_1/root.sh

 

完成上述步骤后 为oracle 用户设置环境变量

 

su - oracle
vi .bash_profile

export ORACLE_HOME=/s01/oracle/product/10.2.0/db_1
export ORACLE_BASE=/s01
export ORACLE_SID=MACLEAN
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORA_NLS10=$ORACLE_HOME/nls/data
export NLS_LANG=American_America.AL32UTF8

 

 

Oracle用户在图形化界面上LOGOUT 后再次登录 以便使profile生效
之后就可以用dbca建库了:

oracle用户登录图形化界面(必须!),打开terminal 输入dbca

 

dbca1
dbca2
dbca3

输入你之前指定的ORACLE_SID的信息,如上面的MACLEAN

dbca4
dbca5

dbca6

dbca7

dbca8

dbca9

dbca10

dbca11

dbca12

dbca13

dbca14

dbca15

dbca完成后,可以登录已创建的MACLEAN实例了:

 

SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE    10.2.0.5.0      Production
TNS for Linux: Version 10.2.0.5.0 - Production
NLSRTL Version 10.2.0.5.0 - Production
SQL> 
SQL> !uname -a
Linux mac02.oracle.com 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
SQL> !cat /etc/issue 
Oracle Linux Server release 6.5
Kernel \r on an \m
SQL> !lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 27-DEC-2013 01:54:03
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                27-DEC-2013 01:52:06
Uptime                    0 days 0 hr. 1 min. 57 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /s01/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac02)(PORT=1521)))
The listener supports no services
The command completed successfully
SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac02)(PORT=1521)))';
System altered.
SQL> alter system register;
System altered.
SQL> !lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 27-DEC-2013 01:54:43
Copyright (c) 1991, 2010, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                27-DEC-2013 01:52:06
Uptime                    0 days 0 hr. 2 min. 37 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /s01/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mac02)(PORT=1521)))
Services Summary...
Service "MACLEAN" has 1 instance(s).
Instance "MACLEAN", status READY, has 1 handler(s) for this service...
Service "MACLEANXDB" has 1 instance(s).
Instance "MACLEAN", status READY, has 1 handler(s) for this service...
Service "MACLEAN_XPT" has 1 instance(s).
Instance "MACLEAN", status READY, has 1 handler(s) for this service...
The command completed successfully
远程登录
[oracle@mac02 ~]$ sqlplus system/oracle@mac02:1521/MACLEAN
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Dec 27 01:55:14 2013
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

【教学视频】Maclean教你一步一步使用Vbox在Linux 5上安装Oracle 11gR2 RAC

 

https://zcdn.askmaclean.com/dbDao_install%2011gr2%20RAC%20on%20Linux%205.7%20in%20vbox.pdf

Oracle RDBMS Server 11gR2 Preinstall RPM For Oracle Linux 6

在之前的文章中我推荐过使用oracle-validated RPM包来简化OEL 5上Oracle DB/RDBMS Server软件的安装准备工作, 而在OEL 6之后的Oracle Linux中一直没有oracle-validated RPM可用,直到最近Oracle Linux官方释出了oracle-rdbms-server-11gR2-preinstall RPM包,该oracle-rdbms-server-11gR2-preinstall package专门为Oracle Linux 6设计,辅助加速Oracle Database软件的安装。

我们可以访问 Unbreakable Linux Network 或者 Oracle public yum repository 获得该preinstall package RPM,这里我们介绍一下public yum的使用方法:

 

 

[root@vrh6 ~]# uname -a
Linux vrh6 2.6.32-300.3.1.el6uek.x86_64 #1 SMP Fri Dec 9 18:57:35 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@vrh6 ~]# cat /etc/issue
Oracle Linux Server release 6.2
Kernel r on an m
www.askmaclean.com 
su -  root
[root@vrh6 ~]# cd /etc/yum.repos.d
[root@vrh6 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-ol6.repo
 --2012-04-02 07:52:31--  http://public-yum.oracle.com/public-yum-ol6.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1461 (1.4K) [text/plain]
Saving to: “public-yum-ol6.repo”
100%[==============================================================================================================================>] 1,461       --.-K/s   in 0.003s  
2012-04-02 07:52:32 (536 KB/s) - “public-yum-ol6.repo” saved [1461/1461]
[root@vrh6 yum.repos.d]# cat public-yum-ol6.repo
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=1
[ol6_ga_base]
name=Oracle Linux $releasever GA installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
[ol6_u1_base]
name=Oracle Linux $releasever Update 1 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
[ol6_u2_base]
name=Oracle Linux $releasever Update 2 installation media copy ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
[ol6_UEK_base]
name=Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
gpgcheck=1
enabled=0
[root@vrh6 yum.repos.d]# yum install oracle-rdbms-server-11gR2-preinstall
Loaded plugins: security
ol6_latest                                                                                                                                       | 1.1 kB     00:00     
ol6_latest/primary                                                                                                                               |  15 MB     01:07     
ol6_latest                                                                                                                                                  14723/14723
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el6 will be installed
--> Processing Dependency: xorg-x11-utils for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: gcc-c++ for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: gcc for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: glibc-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: compat-libstdc++-33 for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: xorg-x11-xauth for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: libaio-devel for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: ksh for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Processing Dependency: compat-libcap1 for package: oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-1 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 will be installed
---> Package gcc.x86_64 0:4.4.6-3.el6 will be installed
--> Processing Dependency: cpp = 4.4.6-3.el6 for package: gcc-4.4.6-3.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.6-3.el6.x86_64
---> Package gcc-c++.x86_64 0:4.4.6-3.el6 will be installed
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.6-3.el6.x86_64
---> Package glibc-devel.x86_64 0:2.12-1.47.el6_2.9 will be installed
--> Processing Dependency: glibc = 2.12-1.47.el6_2.9 for package: glibc-devel-2.12-1.47.el6_2.9.x86_64
--> Processing Dependency: glibc-headers = 2.12-1.47.el6_2.9 for package: glibc-devel-2.12-1.47.el6_2.9.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.47.el6_2.9.x86_64
---> Package ksh.x86_64 0:20100621-12.el6_2.1 will be installed
---> Package libaio-devel.x86_64 0:0.3.107-10.el6 will be installed
---> Package libstdc++-devel.x86_64 0:4.4.6-3.el6 will be installed
---> Package xorg-x11-utils.x86_64 0:7.4-8.el6 will be installed
--> Processing Dependency: libXxf86misc.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
--> Processing Dependency: libdmx.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
--> Processing Dependency: libXmuu.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
--> Processing Dependency: libXxf86dga.so.1()(64bit) for package: xorg-x11-utils-7.4-8.el6.x86_64
---> Package xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6 will be installed
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.6-3.el6 will be installed
---> Package glibc.x86_64 0:2.12-1.47.el6 will be updated
--> Processing Dependency: glibc = 2.12-1.47.el6 for package: glibc-common-2.12-1.47.el6.x86_64
---> Package glibc.x86_64 0:2.12-1.47.el6_2.9 will be an update
---> Package glibc-headers.x86_64 0:2.12-1.47.el6_2.9 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.47.el6_2.9.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.47.el6_2.9.x86_64
---> Package libXmu.x86_64 0:1.0.5-1.el6 will be installed
---> Package libXxf86dga.x86_64 0:1.1.1-1.el6 will be installed
---> Package libXxf86misc.x86_64 0:1.0.2-1.el6 will be installed
---> Package libdmx.x86_64 0:1.1.0-1.el6 will be installed
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
--> Running transaction check
---> Package glibc-common.x86_64 0:2.12-1.47.el6 will be updated
---> Package glibc-common.x86_64 0:2.12-1.47.el6_2.9 will be an update
---> Package kernel-uek-headers.x86_64 0:2.6.32-300.11.1.el6uek will be installed
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
 Package                                                  Arch                       Version                                       Repository                      Size
========================================================================================================================================================================
Installing:
 oracle-rdbms-server-11gR2-preinstall                     x86_64                     1.0-3.el6                                     ol6_latest                      15 k
Installing for dependencies:
 cloog-ppl                                                x86_64                     0.15.7-1.2.el6                                ol6_latest                      93 k
 compat-libcap1                                           x86_64                     1.10-1                                        ol6_latest                      17 k
 compat-libstdc++-33                                      x86_64                     3.2.3-69.el6                                  ol6_latest                     183 k
 cpp                                                      x86_64                     4.4.6-3.el6                                   ol6_latest                     3.7 M
 gcc                                                      x86_64                     4.4.6-3.el6                                   ol6_latest                      10 M
 gcc-c++                                                  x86_64                     4.4.6-3.el6                                   ol6_latest                     4.7 M
 glibc-devel                                              x86_64                     2.12-1.47.el6_2.9                             ol6_latest                     966 k
 glibc-headers                                            x86_64                     2.12-1.47.el6_2.9                             ol6_latest                     597 k
 kernel-uek-headers                                       x86_64                     2.6.32-300.11.1.el6uek                        ol6_latest                     702 k
 ksh                                                      x86_64                     20100621-12.el6_2.1                           ol6_latest                     683 k
 libXmu                                                   x86_64                     1.0.5-1.el6                                   ol6_latest                      58 k
 libXxf86dga                                              x86_64                     1.1.1-1.el6                                   ol6_latest                      21 k
 libXxf86misc                                             x86_64                     1.0.2-1.el6                                   ol6_latest                      15 k
 libaio-devel                                             x86_64                     0.3.107-10.el6                                ol6_latest                      13 k
 libdmx                                                   x86_64                     1.1.0-1.el6                                   ol6_latest                      16 k
 libstdc++-devel                                          x86_64                     4.4.6-3.el6                                   ol6_latest                     1.5 M
 mpfr                                                     x86_64                     2.4.1-6.el6                                   ol6_latest                     156 k
 ppl                                                      x86_64                     0.10.2-11.el6                                 ol6_latest                     1.3 M
 xorg-x11-utils                                           x86_64                     7.4-8.el6                                     ol6_latest                      87 k
 xorg-x11-xauth                                           x86_64                     1:1.0.2-7.1.el6                               ol6_latest                      34 k
Updating for dependencies:
 glibc                                                    x86_64                     2.12-1.47.el6_2.9                             ol6_latest                     3.8 M
 glibc-common                                             x86_64                     2.12-1.47.el6_2.9                             ol6_latest                      14 M
Transaction Summary
========================================================================================================================================================================
Install      21 Package(s)
Upgrade       2 Package(s)
Total download size: 43 M
Is this ok [y/N]: y
Downloading Packages:
(1/23): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm                                                                                                      |  93 kB     00:01     
(2/23): compat-libcap1-1.10-1.x86_64.rpm                                                                                                         |  17 kB     00:00     
(3/23): compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm                                                                                              | 183 kB     00:01     
(4/23): cpp-4.4.6-3.el6.x86_64.rpm                                                                                                               | 3.7 MB     00:28     
(5/23): gcc-4.4.6-3.el6.x86_64.rpm                                                                                                               |  10 MB     00:57     
(6/23): gcc-c++-4.4.6-3.el6.x86_64.rpm                                                                                                           | 4.7 MB     00:29     
(7/23): glibc-2.12-1.47.el6_2.9.x86_64.rpm                                                                                                       | 3.8 MB     00:19     
(8/23): glibc-common-2.12-1.47.el6_2.9.x86_64.rpm                                                                                                |  14 MB     01:13     
(9/23): glibc-devel-2.12-1.47.el6_2.9.x86_64.rpm                                                                                                 | 966 kB     00:10     
(10/23): glibc-headers-2.12-1.47.el6_2.9.x86_64.rpm                                                                                              | 597 kB     00:03     
(11/23): kernel-uek-headers-2.6.32-300.11.1.el6uek.x86_64.rpm                                                                                    | 702 kB     00:03     
(12/23): ksh-20100621-12.el6_2.1.x86_64.rpm                                                                                                      | 683 kB     00:03     
(13/23): libXmu-1.0.5-1.el6.x86_64.rpm                                                                                                           |  58 kB     00:00     
(14/23): libXxf86dga-1.1.1-1.el6.x86_64.rpm                                                                                                      |  21 kB     00:00     
(15/23): libXxf86misc-1.0.2-1.el6.x86_64.rpm                                                                                                     |  15 kB     00:00     
(16/23): libaio-devel-0.3.107-10.el6.x86_64.rpm                                                                                                  |  13 kB     00:00     
(17/23): libdmx-1.1.0-1.el6.x86_64.rpm                                                                                                           |  16 kB     00:00     
(18/23): libstdc++-devel-4.4.6-3.el6.x86_64.rpm                                                                                                  | 1.5 MB     00:08     
(19/23): mpfr-2.4.1-6.el6.x86_64.rpm                                                                                                             | 156 kB     00:01     
(20/23): oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64.rpm                                                                               |  15 kB     00:00     
(21/23): ppl-0.10.2-11.el6.x86_64.rpm                                                                                                            | 1.3 MB     00:07     
(22/23): xorg-x11-utils-7.4-8.el6.x86_64.rpm                                                                                                     |  87 kB     00:00     
(23/23): xorg-x11-xauth-1.0.2-7.1.el6.x86_64.rpm                                                                                                 |  34 kB     00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                   166 kB/s |  43 MB     04:23     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Retrieving key from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Importing GPG key 0xEC551F03:
 Userid: "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 From  : http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : glibc-common-2.12-1.47.el6_2.9.x86_64                                                                                                               1/25
  Updating   : glibc-2.12-1.47.el6_2.9.x86_64                                                                                                                      2/25
  Installing : mpfr-2.4.1-6.el6.x86_64                                                                                                                             3/25
  Installing : libXmu-1.0.5-1.el6.x86_64                                                                                                                           4/25
  Installing : libstdc++-devel-4.4.6-3.el6.x86_64                                                                                                                  5/25
  Installing : 1:xorg-x11-xauth-1.0.2-7.1.el6.x86_64                                                                                                               6/25
  Installing : cpp-4.4.6-3.el6.x86_64                                                                                                                              7/25
  Installing : compat-libcap1-1.10-1.x86_64                                                                                                                        8/25
  Installing : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                                             9/25
  Installing : libXxf86dga-1.1.1-1.el6.x86_64                                                                                                                     10/25
  Installing : libXxf86misc-1.0.2-1.el6.x86_64                                                                                                                    11/25
  Installing : libdmx-1.1.0-1.el6.x86_64                                                                                                                          12/25
  Installing : xorg-x11-utils-7.4-8.el6.x86_64                                                                                                                    13/25
  Installing : ppl-0.10.2-11.el6.x86_64                                                                                                                           14/25
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                                                                    15/25
  Installing : ksh-20100621-12.el6_2.1.x86_64                                                                                                                     16/25
  Installing : kernel-uek-headers-2.6.32-300.11.1.el6uek.x86_64                                                                                                   17/25
  Installing : glibc-headers-2.12-1.47.el6_2.9.x86_64                                                                                                             18/25
  Installing : glibc-devel-2.12-1.47.el6_2.9.x86_64                                                                                                               19/25
  Installing : gcc-4.4.6-3.el6.x86_64                                                                                                                             20/25
  Installing : gcc-c++-4.4.6-3.el6.x86_64                                                                                                                         21/25
  Installing : libaio-devel-0.3.107-10.el6.x86_64                                                                                                                 22/25
  Installing : oracle-rdbms-server-11gR2-preinstall-1.0-3.el6.x86_64                                                                                              23/25
  Cleanup    : glibc-common-2.12-1.47.el6.x86_64                                                                                                                  24/25
  Cleanup    : glibc-2.12-1.47.el6.x86_64                                                                                                                         25/25 
Installed:
  oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-3.el6                                                                                                               
Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6                  compat-libcap1.x86_64 0:1.10-1                       compat-libstdc++-33.x86_64 0:3.2.3-69.el6                     
  cpp.x86_64 0:4.4.6-3.el6                           gcc.x86_64 0:4.4.6-3.el6                             gcc-c++.x86_64 0:4.4.6-3.el6                                  
  glibc-devel.x86_64 0:2.12-1.47.el6_2.9             glibc-headers.x86_64 0:2.12-1.47.el6_2.9             kernel-uek-headers.x86_64 0:2.6.32-300.11.1.el6uek            
  ksh.x86_64 0:20100621-12.el6_2.1                   libXmu.x86_64 0:1.0.5-1.el6                          libXxf86dga.x86_64 0:1.1.1-1.el6                              
  libXxf86misc.x86_64 0:1.0.2-1.el6                  libaio-devel.x86_64 0:0.3.107-10.el6                 libdmx.x86_64 0:1.1.0-1.el6                                   
  libstdc++-devel.x86_64 0:4.4.6-3.el6               mpfr.x86_64 0:2.4.1-6.el6                            ppl.x86_64 0:0.10.2-11.el6                                    
  xorg-x11-utils.x86_64 0:7.4-8.el6                  xorg-x11-xauth.x86_64 1:1.0.2-7.1.el6               
Dependency Updated:
  glibc.x86_64 0:2.12-1.47.el6_2.9                                                glibc-common.x86_64 0:2.12-1.47.el6_2.9                                               
Complete!

 

 

注意该oracle-rdbms-server-11gR2-preinstall目前只有x86-64位的版本,即在x86的Oracle Linux 6上不可用。

与oracle-validated RPM类似,oracle-rdbms-server-11gR2-preinstall会为我们完成以下工作:

1. 从oracle Public YUM上下载并安装多个特定的软件包并保证其为指定的版本(如以上示例),这些软件包software package是安装Oracle DB/RDBMS Server 11gR2数据库软件的先决条件之一

2. 创建 oracle OS用户user,以及 oinstall 和 dba 用户组group

3. 修改/etc/sysctl.conf配置文件中的内核参数,以保证oracle instance实例可以健康运行

安装完成后的 /etc/sysctl.conf 内容如下:

 

 

[root@vrh6 yum.repos.d]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
# Controls the maximum number of shared memory segments, in pages
# oracle-rdbms-server-11gR2-preinstall setting for fs.file-max is 6815744
fs.file-max = 6815744
# oracle-rdbms-server-11gR2-preinstall setting for kernel.sem is '250 32000 100 128'
kernel.sem = 250 32000 100 128
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmni is 4096
kernel.shmmni = 4096
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmall is 1073741824
kernel.shmall = 1073741824
# oracle-rdbms-server-11gR2-preinstall setting for kernel.shmmax is 4398046511104 on x86_64
kernel.shmmax = 4398046511104
# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144
# oracle-rdbms-server-11gR2-preinstall setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304
# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144
# oracle-rdbms-server-11gR2-preinstall setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576
# oracle-rdbms-server-11gR2-preinstall setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576
# oracle-rdbms-server-11gR2-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500

 

 

4. 修改/etc/security/limits.conf配置文件 保证 oracle用户的shell soft/hard limit,例如nofile、stack等参数足够, 以符合Oracle 11gR2的安装要求
安装完成后的 /etc/security/limits.conf内容如下:

 

 

# oracle-rdbms-server-11gR2-preinstall setting for nofile soft limit is 1024
oracle   soft   nofile    1024
# oracle-rdbms-server-11gR2-preinstall setting for nofile hard limit is 65536
oracle   hard   nofile    65536
# oracle-rdbms-server-11gR2-preinstall setting for nproc soft limit is 2047
oracle   soft   nproc    2047
# oracle-rdbms-server-11gR2-preinstall setting for nproc hard limit is 16384
oracle   hard   nproc    16384
# oracle-rdbms-server-11gR2-preinstall setting for stack soft limit is 10240KB
oracle   soft   stack    10240
# oracle-rdbms-server-11gR2-preinstall setting for stack hard limit is 10240KB
oracle   hard   stack    32768

 

 

5. 为 x86-64的服务器设置kernel boot 内核启动参数numa=off ,关闭numa功能:

 

[root@vrh6 ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_vrh6-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server-uek (2.6.32-300.3.1.el6uek.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-300.3.1.el6uek.x86_64 ro root=/dev/mapper/vg_vrh6-lv_root rd_LVM_LV=vg_vrh6/lv_swap rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb  rd_LVM_LV=vg_vrh6/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
numa=off
        initrd /initramfs-2.6.32-300.3.1.el6uek.x86_64.img
title Oracle Linux Server (2.6.32-220.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_vrh6-lv_root rd_LVM_LV=vg_vrh6/lv_swap rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_vrh6/lv_root  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM numa=off
        initrd /initramfs-2.6.32-220.el6.x86_64.img

runInstaller -ignoreInternalDriverError

runInstaller -ignoreInternalDriverError,如果在使用OUI安装Oracle软件时遇到INS-30060错误的会可以考虑在runInstaller时加上该参数,绕过内部错误:

 

 

INFO: Validating state 
INFO: ... PrivilegedOSGroupValidator: entering validate()
SEVERE: [FATAL] [INS-30060] Check for group existence failed.
CAUSE: Unexpected error occurred while trying to check for group existence.
ACTION: Refer to the logs or contact Oracle Support Services. Note for advanced users: Launch the installer by passing the following flag ''-ignoreInternalDriverError''..
Refer associated stacktrace #oracle.install.commons.util.exception.DefaultErrorAdvisor:671
INFO: Unloading Setup Driver

在AIX 6.1上安装11gR2 RAC

以下在AIX 6.1+Veritas CFS环境上安装11gR2 RAC :

1.  11gR2 GI/RAC安装预备工作

1.1       安装环境:

硬件环境为2节点IBM p系列小型机,每个节点物理CPU数目32个,内存509440 MB,交换空间32768MB操作系统版本为64bit AIX 6.1(6100-06-09-1228)。

 

 

Setting Value
Machine and version AIX macleandb-007 1 6 00F71C964C00
Fully qualified host name macleandb-007
Platform 64-bit AIX
O/S Version 6.1.0.0
O/S Maintenance Level 6100-06
O/S Service Pack Level 6100-06-09-1228
Logged in as oracle
Last run as uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1200(dba),1300(asmdba)
Executed as Oracle home owner? Yes
RDA home directory /oracle/rda
RDA work directory /oracle/rda
Output file prefix RDA
Output file directory /oracle/rda/output
Setup profile DB11g
Perform network pings? No

 

Item Value
Processor(s) 32 Processor(s) Installed
[01]: PowerPC_POWER7 3864 MHz
[02]: PowerPC_POWER7 3864 MHz
[03]: PowerPC_POWER7 3864 MHz
[04]: PowerPC_POWER7 3864 MHz
[05]: PowerPC_POWER7 3864 MHz
[06]: PowerPC_POWER7 3864 MHz
[07]: PowerPC_POWER7 3864 MHz
[08]: PowerPC_POWER7 3864 MHz
[09]: PowerPC_POWER7 3864 MHz
[10]: PowerPC_POWER7 3864 MHz
[11]: PowerPC_POWER7 3864 MHz
[12]: PowerPC_POWER7 3864 MHz
[13]: PowerPC_POWER7 3864 MHz
[14]: PowerPC_POWER7 3864 MHz
[15]: PowerPC_POWER7 3864 MHz
[16]: PowerPC_POWER7 3864 MHz
[17]: PowerPC_POWER7 3864 MHz
[18]: PowerPC_POWER7 3864 MHz
[19]: PowerPC_POWER7 3864 MHz
[20]: PowerPC_POWER7 3864 MHz
[21]: PowerPC_POWER7 3864 MHz
[22]: PowerPC_POWER7 3864 MHz
[23]: PowerPC_POWER7 3864 MHz
[24]: PowerPC_POWER7 3864 MHz
[25]: PowerPC_POWER7 3864 MHz
[26]: PowerPC_POWER7 3864 MHz
[27]: PowerPC_POWER7 3864 MHz
[28]: PowerPC_POWER7 3864 MHz
[29]: PowerPC_POWER7 3864 MHz
[30]: PowerPC_POWER7 3864 MHz
[31]: PowerPC_POWER7 3864 MHz
[32]: PowerPC_POWER7 3864 MHz
Total Physical Memory 509440 MB
Swap: Max Size 32768 MiB
Swap: Percent Used 1%

 

 

1.1       网络环境:

 

对于每台机器,需要配置:

1 个机器固有IP 地址(Public IP)和对应的机器名,在DNS 中注册,或者写到

/etc/hosts 文件中。

1 个虚拟IP 地址(Virtual IP)和对应的服务名,在DNS 中注册,或者写到

/etc/hosts 文件中。(与Public IP 不同,但必须处于同一网段)

1 个互联IP 地址(Private IP)和对应的私有名,写到/etc/hosts 文件中。(这类IP

地址建议采用如: 172.168.*.* 或192.168.*.*网段的地址)

3 个SCAN IP地址,在DNS中注册,不适用DNS的情况下配置1个SCAN IP到/etc/hosts      中

 

Node Interface Name Type Ip Address Registered in
macleandb-007 macleandb-007 Public 192.168.18.227 /etc/hosts
macleandb-008 macleandb-008 Public 192.168.18.231 /etc/hosts
macleandb-007 macleandb-007-vip VIP 192.168.18.226 /etc/hosts
macleandb-008 macleandb-008-vip VIP 192.168.18.230 /etc/hosts
macleandb-008 macleandb-scan1 SCAN IP 192.168.18.224 /etc/hosts
macleandb-007 macleandb-007-priva Private 172.168.1.101 /etc/hosts
macleandb-008 macleandb-008-priva Private 172.168.1.102 /etc/hosts
macleandb-007 macleandb-007-privb Private 172.168.2.101 /etc/hosts
macleandb-008 macleandb-008-privb Private 172.168.2.102 /etc/hosts

 

 

使用FTP测试网络传输速率,2节点传输文件平均速度为50M/s:

 

 

macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip  macleandb-008-priva:/oracleThe authenticity of host ‘macleandb-008-priva (172.168.1.102)’ can’t be established.RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ‘macleandb-008-priva,172.168.1.102’ (RSA) to the list of known hosts.p10404530_112030_AIX64-5L_1of7.zip                                                                                                     20%  343MB  47.3MB/s   00:28 ETAKilled by signal 2. 

 

macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip  macleandb-008-privb:/oracle

The authenticity of host ‘macleandb-008-privb (172.168.2.102)’ can’t be established.

RSA key fingerprint is b1:2e:4f:40:7f:46:39:2d:ae:21:86:6f:75:bb:92:32.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘macleandb-008-privb,172.168.2.102’ (RSA) to the list of known hosts.

p10404530_112030_AIX64-5L_1of7.zip                                                                                                     11%  202MB  51.2MB/s   00:28 ETAKilled by signal 2.

macleandb-007 #

 

macleandb-007 # scp p10404530_112030_AIX64-5L_1of7.zip  macleandb-008:/oracle

p10404530_112030_AIX64-5L_1of7.zip                                                                                                     17%  299MB  50.6MB/s   00:27 ETAKilled by signal 2.

 

 

 

1.1       缺省网关:

在每台机器上都要对于公网接口定义缺省网关。

定义网关是为了跨网段的客户端和应用服务器可以访问数据库服务器;如果操作系统已经

配置了静态或动态路由,此处无需再配置网关。

 

 

1.2       时钟同步:

11.2中使用GI自带的CTSSD节点间时间同步服务,不开启NTPD时间同步守护进程。

 

NTP is not required for 11gR2 since we have the Cluster Time Synchronization Service (CTSD), but if youare using NTP you need to use it with â..-xâ.. option:Checking: ps -ef |grep ntpsIf it has no -x option do below steps:

  • · a. Open the /etc/rc.tcpip file, and locate the following line: start /usr/sbin/xntpd “$src_running”
  • · b. Change the line to the following: start /usr/sbin/xntpd “$src_running” “-x”
  • · c. Save the file.

 

 

 

 

 

1.3       用户和组:

创建必要的grid和oracle用户,以及oinstall、dba等组,保持在2个节点间的UID、GID一致

 

macleandb-007 # mkgroup -‘A’ id=’1000′ adms=’root’ oinstallmacleandb-007 # mkgroup -‘A’ id=’1100′ adms=’root’ asmadminmacleandb-007 # mkgroup -‘A’ id=’1200′ adms=’root’ dbamacleandb-007 # mkgroup -‘A’ id=’1300′ adms=’root’ asmdbamacleandb-007 # mkgroup -‘A’ id=’1301′ adms=’root’ asmopermacleandb-007 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ gridmacleandb-007 # mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oracle

macleandb-007 # mkdir -p /oracle/app/product/11.2.0/db_1

macleandb-007 # mkdir -p /oracle/app/product/grid

macleandb-007 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1

macleandb-007 # chown grid:oinstall /oracle/app/product/grid

macleandb-007 # chmod 755 /oracle/app/product/11.2.0/db_1

macleandb-007 # chmod 755 /oracle/app/product/grid

 

 

macleandb-008 # mkgroup -‘A’ id=’1000′ adms=’root’ oinstall

macleandb-008 # mkgroup -‘A’ id=’1100′ adms=’root’ asmadmin

macleandb-008 # mkgroup -‘A’ id=’1200′ adms=’root’ dba

macleandb-008 # mkgroup -‘A’ id=’1300′ adms=’root’ asmdba

macleandb-008 # mkgroup -‘A’ id=’1301′ adms=’root’ asmoper

macleandb-008 # mkuser id=’1100′ pgrp=’oinstall’ groups=’asmadmin,asmdba,asmoper’ home=’/home/grid’ grid

macleandb-008 #  mkuser id=’1101′ pgrp=’oinstall’ groups=’dba,asmdba’ home=’/home/oracle’ oracle

macleandb-008 #  mkdir -p /oracle/app/product/11.2.0/db_1

macleandb-008 # mkdir -p /oracle/app/product/grid

macleandb-008 # chown oracle:oinstall /oracle/app/product/11.2.0/db_1

macleandb-008 # chown grid:oinstall /oracle/app/product/grid

macleandb-008 # chmod 755 /oracle/app/product/11.2.0/db_1

macleandb-008 # chmod 755 /oracle/app/product/grid

 

 

 

 

 

 

 

macleandb-007 # id oracle

uid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)

 

macleandb-007 # id grid

uid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)

 

macleandb-008 # id oracle

uid=1101(oracle) gid=1000(oinstall) groups=1200(dba),1300(asmdba)

 

macleandb-008 # id grid

uid=1100(grid) gid=1000(oinstall) groups=1100(asmadmin),1300(asmdba),1301(asmoper)

 

 

 

赋予grid用户CAP_NUMA_ATTACH等权限:

 

 

macleandb-008 # lsuser -a capabilities gridgridmacleandb-008 # chuser capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE gridmacleandb-008 # lsuser -a capabilities gridgrid capabilities=CAP_NUMA_ATTACH,CAP_BYPASS_RAC_VMM,CAP_PROPAGATE

 

 

 

1.1       用户profile:

 

在profile文件中为Oracle和Grid用户配置必要的环境变量参数:

 

Grid profileumask 022export AIXTHREAD_SCOPE=Sexport ORACLE_HOME=/oracle/app/product/grid

export ORACLE_BASE=/oracle/app

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

export CRS_HOME=$ORACLE_HOME

export LIBPATH=$ORACLE_HOME/lib

 

 

 

oracle profile

 

umask 022

 

export AIXTHREAD_SCOPE=S

export ORACLE_HOME=/oracle/app/product/11.2.0/db_1

export ORACLE_BASE=/oracle/app

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

export LIBPATH=$ORACLE_HOME/lib

export ORA_NLS10=$ORACLE_HOME/nls/data

export NLS_LANG=”Simplified Chinese”_China.AL32UTF8

 

 

 

 

1.1       配置oracle和grid用户的shell limit参数:

 

可以通过smitty chuser或者 修改/etc/security/limits配置文件配置用户的shell limit参数:

macleandb-007 # cat /etc/security/limitsoracle:fsize = -1data = -1stack = -1

core = -1

rss = -1

nofiles = -1

 

grid:

fsize = -1

data = -1

stack = -1

core = -1

rss = -1

nofiles = -1

 

$ ulimit -a

time(seconds)        unlimited

file(blocks)         unlimited

data(kbytes)         unlimited

stack(kbytes)        4194304

memory(kbytes)       unlimited

coredump(blocks)     unlimited

nofiles(descriptors) unlimited

threads(per process) unlimited

processes(per user)  unlimited

 

macleandb-008 # cat /etc/security/limits

 

oracle:

fsize = -1

data = -1

stack = -1

core = -1

rss = -1

nofiles = -1

 

grid:

fsize = -1

data = -1

stack = -1

core = -1

rss = -1

nofiles = -1

 

 

$ ulimit -a

time(seconds)        unlimited

file(blocks)         unlimited

data(kbytes)         unlimited

stack(kbytes)        4194304

memory(kbytes)       unlimited

coredump(blocks)     unlimited

nofiles(descriptors) unlimited

threads(per process) unlimited

processes(per user)  unlimited

 

 

 

1.2       配置oracle和grid用户的等价性

 

在macleandb-007、macleandb-008 2节点之间配置oracle和grid用户的等价性。

 

$ rm -rf $HOME/.ssh$ ./sshUserSetup.sh -user grid -hosts “macleandb-007 macleandb-008”  -advanced PromptPassphrase 

The output of this script is also logged into /tmp/sshUserSetup_2012-12-05-01-27-09.log

Hosts are macleandb-007 macleandb-008

user is grid

Platform:- AIX

Checking if the remote hosts are reachable

PING macleandb-007: (192.168.18.227): 56 data bytes

64 bytes from 192.168.18.227: icmp_seq=0 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=1 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=2 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=3 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=4 ttl=255 time=0 ms

 

—-macleandb-007 PING Statistics—-

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 0/0/0 ms

PING macleandb-008: (192.168.18.231): 56 data bytes

64 bytes from 192.168.18.231: icmp_seq=0 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=1 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=2 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=3 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=4 ttl=255 time=0 ms

 

—-macleandb-008 PING Statistics—-

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 0/0/0 ms

Remote host reachability check succeeded.

The following hosts are reachable: macleandb-007 macleandb-008.

The following hosts are not reachable: .

All hosts are reachable. Proceeding further…

firsthost macleandb-007

numhosts 2

The script will setup SSH connectivity from the host macleandb-007 to all

the remote hosts. After the script is executed, the user can use SSH to run

commands on the remote hosts or copy files between this host macleandb-007

and the remote hosts without being prompted for passwords or confirmations.

 

NOTE 1:

As part of the setup procedure, this script will use ssh and scp to copy

files between the local host and the remote hosts. Since the script does not

store passwords, you may be prompted for the passwords during the execution of

the script whenever ssh or scp is invoked.

 

NOTE 2:

AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY

AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE

directories.

 

Do you want to continue and let the script make the above mentioned changes (yes/no)?

yes

 

The user chose yes

Please specify if you want to specify a passphrase for the private key this script will create for the local host. Passphrase is used to encrypt the private key and makes SSH much more secure. Type ‘yes’ or ‘no’ and then press enter. In case you press ‘yes’, you would need to enter the passphrase whenever the script executes ssh or scp.

The estimated number of times the user would be prompted for a passphrase is 4. In addition, if the private-public files are also newly created, the user would have to specify the passphrase on one additional occasion.

Enter ‘yes’ or ‘no’.

yes

 

The user chose yes

Creating .ssh directory on local host, if not present already

Creating authorized_keys file on local host

Changing permissions on authorized_keys to 644 on local host

Creating known_hosts file on local host

Changing permissions on known_hosts to 644 on local host

Creating config file on local host

If a config file exists already at /home/grid/.ssh/config, it would be backed up to /home/grid/.ssh/config.backup.

Removing old private/public keys on local host

Running SSH keygen on local host

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Generating public/private rsa key pair.

Your identification has been saved in /home/grid/.ssh/id_rsa.

Your public key has been saved in /home/grid/.ssh/id_rsa.pub.

The key fingerprint is:

a6:87:38:26:11:7a:1e:d6:4a:eb:2b:6d:54:68:bc:29 grid@macleandb-007

The key’s randomart image is:

+–[ RSA 1024]—-+

|                 |

|                 |

| …             |

| .+o.            |

|..*+.   S        |

|E=+= . +         |

| += + o .        |

|..oo . .         |

| oo.             |

+—————–+

Creating .ssh directory and setting permissions on remote host macleandb-007

THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT.

The script would create /home/grid/.ssh/config file on remote host macleandb-007. If a config file exists already at /home/grid/.ssh/config, it would be backed up to /home/grid/.ssh/config.backup.

The user may be prompted for a password here since the script would be running SSH on host macleandb-007.

Warning: Permanently added ‘macleandb-007,192.168.18.227’ (RSA) to the list of known hosts.

grid@macleandb-007’s password:

Done with creating .ssh directory and setting permissions on remote host macleandb-007.

Creating .ssh directory and setting permissions on remote host macleandb-008

THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT.

The script would create /home/grid/.ssh/config file on remote host macleandb-008. If a config file exists already at /home/grid/.ssh/config, it would be backed up to /home/grid/.ssh/config.backup.

The user may be prompted for a password here since the script would be running SSH on host macleandb-008.

Warning: Permanently added ‘macleandb-008,192.168.18.231’ (RSA) to the list of known hosts.

grid@macleandb-008’s password:

Done with creating .ssh directory and setting permissions on remote host macleandb-008.

Copying local host public key to the remote host macleandb-007

The user may be prompted for a password or passphrase here since the script would be using SCP for host macleandb-007.

grid@macleandb-007’s password:

Done copying local host public key to the remote host macleandb-007

Copying local host public key to the remote host macleandb-008

The user may be prompted for a password or passphrase here since the script would be using SCP for host macleandb-008.

grid@macleandb-008’s password:

Done copying local host public key to the remote host macleandb-008

Creating keys on remote host macleandb-007 if they do not exist already. This is required to setup SSH on host macleandb-007.

 

Creating keys on remote host macleandb-008 if they do not exist already. This is required to setup SSH on host macleandb-008.

Generating public/private rsa key pair.

Your identification has been saved in .ssh/id_rsa.

Your public key has been saved in .ssh/id_rsa.pub.

The key fingerprint is:

57:10:a3:c8:c6:ec:55:3f:1c:ea:c3:c5:ef:bf:23:b6 grid@macleandb-008

The key’s randomart image is:

+–[ RSA 1024]—-+

|          =..    |

|     + . o B .   |

|      * o . B    |

|     o . o o o   |

|      . S =   .  |

|         . . .   |

|              .  |

|             o o |

|            .Eo.+|

+—————–+

Updating authorized_keys file on remote host macleandb-007

Updating known_hosts file on remote host macleandb-007

The script will run SSH on the remote machine macleandb-007. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

Updating authorized_keys file on remote host macleandb-008

Updating known_hosts file on remote host macleandb-008

The script will run SSH on the remote machine macleandb-008. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

cat: 0652-050 Cannot open /home/grid/.ssh/known_hosts.tmp.

cat: 0652-050 Cannot open /home/grid/.ssh/authorized_keys.tmp.

SSH setup is complete.

 

————————————————————————

Verifying SSH setup

===================

The script will now run the date command on the remote nodes using ssh

to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,

THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR

PASSWORDS. If you see any output other than date or are prompted for the

password, ssh is not setup correctly and you will need to resolve the

issue and set up ssh again.

The possible causes for failure could be:

1. The server settings in /etc/ssh/sshd_config file do not allow ssh

for user grid.

2. The server may have disabled public key based authentication.

3. The client public key on the server may be outdated.

4. /home/grid or /home/grid/.ssh on the remote host may not be owned by grid.

5. User may not have passed -shared option for shared remote users or

may be passing the -shared option for non-shared remote users.

6. If there is output in addition to the date, but no password is asked,

it may be a security alert shown as part of company policy. Append the

additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.

————————————————————————

–macleandb-007:–

Running /usr/bin/ssh -x -l grid macleandb-007 date to verify SSH connectivity has been setup from local host to macleandb-007.

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.

The script will run SSH on the remote machine macleandb-007. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

Wed Dec  5 01:28:15 GMT+08:00 2012

————————————————————————

–macleandb-008:–

Running /usr/bin/ssh -x -l grid macleandb-008 date to verify SSH connectivity has been setup from local host to macleandb-008.

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.

The script will run SSH on the remote machine macleandb-008. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

Wed Dec  5 01:28:20 GMT+08:00 2012

————————————————————————

————————————————————————

Verifying SSH connectivity has been setup from macleandb-007 to macleandb-007

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.

Wed Dec  5 01:28:16 GMT+08:00 2012

————————————————————————

————————————————————————

Verifying SSH connectivity has been setup from macleandb-007 to macleandb-008

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.

Wed Dec  5 01:28:21 GMT+08:00 2012

————————————————————————

-Verification from complete-

SSH verification complete.

 

 

 

 

 

 

$ ./sshUserSetup.sh -user oracle -hosts “macleandb-007 macleandb-008”  -advanced PromptPassphrase

The output of this script is also logged into /tmp/sshUserSetup_2012-12-05-01-31-18.log

Hosts are macleandb-007 macleandb-008

user is oracle

Platform:- AIX

Checking if the remote hosts are reachable

PING macleandb-007: (192.168.18.227): 56 data bytes

64 bytes from 192.168.18.227: icmp_seq=0 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=1 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=2 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=3 ttl=255 time=0 ms

64 bytes from 192.168.18.227: icmp_seq=4 ttl=255 time=0 ms

 

—-macleandb-007 PING Statistics—-

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 0/0/0 ms

PING macleandb-008: (192.168.18.231): 56 data bytes

64 bytes from 192.168.18.231: icmp_seq=0 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=1 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=2 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=3 ttl=255 time=0 ms

64 bytes from 192.168.18.231: icmp_seq=4 ttl=255 time=0 ms

 

—-macleandb-008 PING Statistics—-

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 0/0/0 ms

Remote host reachability check succeeded.

The following hosts are reachable: macleandb-007 macleandb-008.

The following hosts are not reachable: .

All hosts are reachable. Proceeding further…

firsthost macleandb-007

numhosts 2

The script will setup SSH connectivity from the host macleandb-007 to all

the remote hosts. After the script is executed, the user can use SSH to run

commands on the remote hosts or copy files between this host macleandb-007

and the remote hosts without being prompted for passwords or confirmations.

 

NOTE 1:

As part of the setup procedure, this script will use ssh and scp to copy

files between the local host and the remote hosts. Since the script does not

store passwords, you may be prompted for the passwords during the execution of

the script whenever ssh or scp is invoked.

 

NOTE 2:

AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY

AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE

directories.

 

Do you want to continue and let the script make the above mentioned changes (yes/no)?

yes

 

The user chose yes

Please specify if you want to specify a passphrase for the private key this script will create for the local host. Passphrase is used to encrypt the private key and makes SSH much more secure. Type ‘yes’ or ‘no’ and then press enter. In case you press ‘yes’, you would need to enter the passphrase whenever the script executes ssh or scp.

The estimated number of times the user would be prompted for a passphrase is 4. In addition, if the private-public files are also newly created, the user would have to specify the passphrase on one additional occasion.

Enter ‘yes’ or ‘no’.

yes

 

The user chose yes

Creating .ssh directory on local host, if not present already

Creating authorized_keys file on local host

Changing permissions on authorized_keys to 644 on local host

Creating known_hosts file on local host

Changing permissions on known_hosts to 644 on local host

Creating config file on local host

If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.

Removing old private/public keys on local host

Running SSH keygen on local host

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Generating public/private rsa key pair.

Your identification has been saved in /home/oracle/.ssh/id_rsa.

Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

de:e1:bd:ac:7d:f0:25:68:3c:80:33:24:53:ae:31:fb oracle@macleandb-007

The key’s randomart image is:

+–[ RSA 1024]—-+

|       ..        |

|      o..        |

|      o+..       |

|       =+ .      |

|      o So.o .   |

|       o o o* . .|

|        E o..+ o |

|           o .o  |

|          ..+.   |

+—————–+

Creating .ssh directory and setting permissions on remote host macleandb-007

THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.

The script would create /home/oracle/.ssh/config file on remote host macleandb-007. If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.

The user may be prompted for a password here since the script would be running SSH on host macleandb-007.

Warning: Permanently added ‘macleandb-007,192.168.18.227’ (RSA) to the list of known hosts.

oracle@macleandb-007’s password:

Done with creating .ssh directory and setting permissions on remote host macleandb-007.

Creating .ssh directory and setting permissions on remote host macleandb-008

THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.

The script would create /home/oracle/.ssh/config file on remote host macleandb-008. If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.

The user may be prompted for a password here since the script would be running SSH on host macleandb-008.

Warning: Permanently added ‘macleandb-008,192.168.18.231’ (RSA) to the list of known hosts.

oracle@macleandb-008’s password:

Done with creating .ssh directory and setting permissions on remote host macleandb-008.

Copying local host public key to the remote host macleandb-007

The user may be prompted for a password or passphrase here since the script would be using SCP for host macleandb-007.

oracle@macleandb-007’s password:

Done copying local host public key to the remote host macleandb-007

Copying local host public key to the remote host macleandb-008

The user may be prompted for a password or passphrase here since the script would be using SCP for host macleandb-008.

oracle@macleandb-008’s password:

Done copying local host public key to the remote host macleandb-008

Creating keys on remote host macleandb-007 if they do not exist already. This is required to setup SSH on host macleandb-007.

 

Creating keys on remote host macleandb-008 if they do not exist already. This is required to setup SSH on host macleandb-008.

Generating public/private rsa key pair.

Your identification has been saved in .ssh/id_rsa.

Your public key has been saved in .ssh/id_rsa.pub.

The key fingerprint is:

b2:b1:d7:2d:2a:bf:d9:76:5c:2a:6e:97:d9:7d:7c:3e oracle@macleandb-008

The key’s randomart image is:

+–[ RSA 1024]—-+

|                 |

|                 |

|                 |

|                 |

|      o S        |

|       = . .  .  |

|      o . o..* o |

|      .. ++.B .E=|

|       o==o+   .=|

+—————–+

Updating authorized_keys file on remote host macleandb-007

Updating known_hosts file on remote host macleandb-007

The script will run SSH on the remote machine macleandb-007. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

Updating authorized_keys file on remote host macleandb-008

Updating known_hosts file on remote host macleandb-008

The script will run SSH on the remote machine macleandb-008. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

cat: 0652-050 Cannot open /home/oracle/.ssh/known_hosts.tmp.

cat: 0652-050 Cannot open /home/oracle/.ssh/authorized_keys.tmp.

SSH setup is complete.

 

————————————————————————

Verifying SSH setup

===================

The script will now run the date command on the remote nodes using ssh

to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,

THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR

PASSWORDS. If you see any output other than date or are prompted for the

password, ssh is not setup correctly and you will need to resolve the

issue and set up ssh again.

The possible causes for failure could be:

1. The server settings in /etc/ssh/sshd_config file do not allow ssh

for user oracle.

2. The server may have disabled public key based authentication.

3. The client public key on the server may be outdated.

4. /home/oracle or /home/oracle/.ssh on the remote host may not be owned by oracle.

5. User may not have passed -shared option for shared remote users or

may be passing the -shared option for non-shared remote users.

6. If there is output in addition to the date, but no password is asked,

it may be a security alert shown as part of company policy. Append the

additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.

————————————————————————

–macleandb-007:–

Running /usr/bin/ssh -x -l oracle macleandb-007 date to verify SSH connectivity has been setup from local host to macleandb-007.

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.

The script will run SSH on the remote machine macleandb-007. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

Wed Dec  5 01:31:50 GMT+08:00 2012

————————————————————————

–macleandb-008:–

Running /usr/bin/ssh -x -l oracle macleandb-008 date to verify SSH connectivity has been setup from local host to macleandb-008.

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.

The script will run SSH on the remote machine macleandb-008. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.

Wed Dec  5 01:31:55 GMT+08:00 2012

————————————————————————

————————————————————————

Verifying SSH connectivity has been setup from macleandb-007 to macleandb-007

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.

Wed Dec  5 01:31:51 GMT+08:00 2012

————————————————————————

————————————————————————

Verifying SSH connectivity has been setup from macleandb-007 to macleandb-008

IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.

Wed Dec  5 01:31:57 GMT+08:00 2012

————————————————————————

-Verification from complete-

SSH verification complete.

 

 

1.3       OS参数优化:

 

Oracle推荐在RAC环境中设置tcp_ephemeral_low、tcp_ephemeral_high、udp_ephemeral_low、udp_ephemeral_high等网络参数,以便优化网络传输性能,加强心跳网络可用性:

 

macleandb-007 # chdev -l sys0 -a maxuproc=16384sys0 changed 

macleandb-007 # lsattr -E -l sys0 -a maxuproc

maxuproc 16384 Maximum number of PROCESSES allowed per user True

 

macleandb-007 # lsattr -El sys0 | grep maxuproc | awk ‘{print $2}’

16384

 

macleandb-007 # lsattr -El sys0 | grep ncargs | awk ‘{print $2}’

256

 

 

 

 

macleandb-008 #  chdev -l sys0 -a maxuproc=16384

sys0 changed

 

macleandb-008 #  lsattr -E -l sys0 -a maxuproc

maxuproc 16384 Maximum number of PROCESSES allowed per user True

 

macleandb-008 #  lsattr -El sys0 | grep maxuproc | awk ‘{print $2}’

16384

 

 

macleandb-008 #  lsattr -El sys0 | grep ncargs | awk ‘{print $2}’

256

 

 

macleandb-007 # /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500

Setting tcp_ephemeral_low to 9000

Setting tcp_ephemeral_low to 9000 in nextboot file

Setting tcp_ephemeral_high to 65500

Setting tcp_ephemeral_high to 65500 in nextboot file

macleandb-007 # /usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500

Setting udp_ephemeral_low to 9000

Setting udp_ephemeral_low to 9000 in nextboot file

Setting udp_ephemeral_high to 65500

Setting udp_ephemeral_high to 65500 in nextboot file

 

 

macleandb-008 # /usr/sbin/no -p -o tcp_ephemeral_low=9000 -o tcp_ephemeral_high=65500

Setting tcp_ephemeral_low to 9000

Setting tcp_ephemeral_low to 9000 in nextboot file

Setting tcp_ephemeral_high to 65500

Setting tcp_ephemeral_high to 65500 in nextboot file

macleandb-008 #  /usr/sbin/no -p -o udp_ephemeral_low=9000 -o udp_ephemeral_high=65500

Setting udp_ephemeral_low to 9000

Setting udp_ephemeral_low to 9000 in nextboot file

Setting udp_ephemeral_high to 65500

Setting udp_ephemeral_high to 65500 in nextboot file

 

 

no -po tcp_sendspace=65536

no -po tcp_recvspace=65536

no -po sb_max=41943040

no -po udp_sendspace=2097152

no -po udp_recvspace=20971520

no -r -o ipqmaxlen=512

 

macleandb-007 # no -po rfc1323=1

Setting rfc1323 to 1

Setting rfc1323 to 1 in nextboot file

Change to tunable rfc1323, will only be effective for future connections

 

 

macleandb-008 # no -a |grep “rfc1323”

rfc1323 = 1

 

 

macleandb-008 # ioo -o aio_maxreqs

aio_maxreqs = 65536

 

 

 

 

 

 

 

1.4       存储环境:

由于使用Veritas Cluster Filesystem,故无需配置ASM。为GI的ocr和votedisk创建专用的共享文件系统上的文件目录:

 

macleandb-007 # chown grid:oinstall /oraclemacleandb-008 # chown grid:oinstall /oraclemacleandb-007 # chown oracle:oinstall /oradata/*macleandb-007 # cd /oradata

 

macleandb-007 # su – grid

 

$ cd oradata01

$ mkdir ocr

$ cd ..

$ mkdir oradata02/ocr

$ mkdir oradata03/ocr

 

 

$ mkdir oradata01/vote

$ mkdir oradata02/vote

$ mkdir oradata03/vote

 

 

 

 

 

1.5       使用cluvfy、rda工具验证安装环境:

 

Cluster Verification Utilit(CVU)是Oracle所推荐的一种集群检验工具。该检验工具帮助用户在Cluter部署的各个阶段验证集群的重要组件,这些阶段包括硬件搭建、Clusterware的安装、RDBMS的安装、存储等等。我们既可以在Cluster安装之前使用CVU来帮我们检验所配置的环境正确可用,也可以在软件安装完成后使用CVU来做对集群的验收。

 

CVU提供了一种可扩展的框架,其所实施的常规检验活动是独立于具体的平台,并且向存储和网络的检验提供了厂商接口(Vendor Interface)。
CVU工具不依赖于其他Oracle软件,仅使用命令cluvfy,如cluvfy stage -pre crsinst -n vrh1,vrh2。

 

cluvfy的部署十分简单,在本地节点安装后,该工具在运行过程中会自动部署到远程主机上。具体的自动部署流程如下:

 

  1. 用户在本地节点安装CVU
  2. 用户针对多个节点实施Verify检验命令
  3. CVU工具将拷贝自身必要的文件到远程节点
  4. CVU会在所有节点执行检验任务并生成报告

 

 

 

CVU工具可以为我们提供以下功能:

 

  1. 验证Cluster集群是否规范配置以便后续的RAC安装、配置和操作顺利
  2. 全类型的验证
  3. 非破坏性的验证
  4. 提供了易于使用的接口
  5. 支持各种平台和配置的RAC,明确完善的统一行为方式

 

注意不要误解cluvfy的作用,它仅仅是一个检验者,而不负责实际的配置或修复工作:

cluvfy不支持任何类型的cluster或RAC操作

在检验到问题或失败后,cluvfy不会采取任何修正行为

cluvfy不是性能调优或监控工具

cluvfy不会尝试帮助你验证RAC数据库的内部结构

RAC的实际部署可以被逻辑地区分为多个操作阶段,这些阶段被称作是”stage”,在实际的部署过程中每一个stage由一系列的操作组成。每一个stage的都有自身的预检查(pre-check)和验收检查(post-check),如图:

 

 

 

$ cluvfy stage -post hwos -n macleandb-007,macleandb-008Performing post-checks for hardware and operating system setupChecking node reachability…

Node reachability check passed from node “macleandb-007”

 

 

Checking user equivalence…

User equivalence check passed for user “oracle”

 

Checking node connectivity…

 

Checking hosts config file…

 

Verification of the hosts config file successful

 

Node connectivity passed for subnet “172.168.1.0” with node(s) macleandb-008,macleandb-007

TCP connectivity check passed for subnet “172.168.1.0”

 

Node connectivity passed for subnet “172.168.2.0” with node(s) macleandb-008,macleandb-007

TCP connectivity check passed for subnet “172.168.2.0”

 

Node connectivity passed for subnet “192.168.18.128” with node(s) macleandb-008,macleandb-007

TCP connectivity check passed for subnet “192.168.18.128”

 

 

Interfaces found on subnet “172.168.1.0” that are likely candidates for VIP are:

macleandb-008 en0:172.168.1.102 en0:172.168.1.102

macleandb-007 en0:172.168.1.101 en0:172.168.1.101

 

Interfaces found on subnet “172.168.2.0” that are likely candidates for VIP are:

macleandb-008 en1:172.168.2.102 en1:172.168.2.102

macleandb-007 en1:172.168.2.101 en1:172.168.2.101

 

Interfaces found on subnet “192.168.18.128” that are likely candidates for VIP are:

macleandb-008 en5:192.168.18.231 en5:192.168.18.231

macleandb-007 en5:192.168.18.227 en5:192.168.18.227 en5:192.168.18.227

 

WARNING:

Could not find a suitable set of interfaces for the private interconnect

Checking subnet mask consistency…

Subnet mask consistency check passed for subnet “172.168.1.0”.

Subnet mask consistency check passed for subnet “172.168.2.0”.

Subnet mask consistency check passed for subnet “192.168.18.128”.

Subnet mask consistency check passed.

 

Node connectivity check passed

 

Checking multicast communication…

 

Checking subnet “172.168.1.0” for multicast communication with multicast group “230.0.1.0”…

Check of subnet “172.168.1.0” for multicast communication with multicast group “230.0.1.0” passed.

 

Checking subnet “172.168.2.0” for multicast communication with multicast group “230.0.1.0”…

Check of subnet “172.168.2.0” for multicast communication with multicast group “230.0.1.0” passed.

 

Checking subnet “192.168.18.128” for multicast communication with multicast group “230.0.1.0”…

Check of subnet “192.168.18.128” for multicast communication with multicast group “230.0.1.0” passed.

 

Check of multicast communication passed.

Check for multiple users with UID value 0 passed

Time zone consistency check passed

 

Checking shared storage accessibility…

 

Disk                                  Sharing Nodes (2 in count)

————————————  ————————

/dev/rhdisk2                          macleandb-008 macleandb-007

/dev/rhdisk3                          macleandb-008 macleandb-007

/dev/rhdisk4                          macleandb-008 macleandb-007

/dev/rhdisk5                          macleandb-008 macleandb-007

/dev/rhdisk6                          macleandb-008 macleandb-007

 

 

 

$ cluvfy stage -pre crsinst -n macleandb-007,macleandb-008

 

Performing pre-checks for cluster services setup

 

Checking node reachability…

Node reachability check passed from node “macleandb-007”

 

 

Checking user equivalence…

User equivalence check passed for user “oracle”

 

Checking node connectivity…

 

Checking hosts config file…

 

Verification of the hosts config file successful

 

Node connectivity passed for subnet “172.168.1.0” with node(s) macleandb-008,macleandb-007

TCP connectivity check passed for subnet “172.168.1.0”

 

Node connectivity passed for subnet “172.168.2.0” with node(s) macleandb-008,macleandb-007

TCP connectivity check passed for subnet “172.168.2.0”

 

Node connectivity passed for subnet “192.168.18.128” with node(s) macleandb-008,macleandb-007

TCP connectivity check passed for subnet “192.168.18.128”

 

 

Interfaces found on subnet “172.168.1.0” that are likely candidates for VIP are:

macleandb-008 en0:172.168.1.102 en0:172.168.1.102

macleandb-007 en0:172.168.1.101 en0:172.168.1.101

 

Interfaces found on subnet “172.168.2.0” that are likely candidates for VIP are:

macleandb-008 en1:172.168.2.102 en1:172.168.2.102

macleandb-007 en1:172.168.2.101 en1:172.168.2.101

 

Interfaces found on subnet “192.168.18.128” that are likely candidates for VIP are:

macleandb-008 en5:192.168.18.231 en5:192.168.18.231

macleandb-007 en5:192.168.18.227 en5:192.168.18.227 en5:192.168.18.227

 

WARNING:

Could not find a suitable set of interfaces for the private interconnect

Checking subnet mask consistency…

Subnet mask consistency check passed for subnet “172.168.1.0”.

Subnet mask consistency check passed for subnet “172.168.2.0”.

Subnet mask consistency check passed for subnet “192.168.18.128”.

Subnet mask consistency check passed.

 

Node connectivity check passed

 

Checking multicast communication…

 

Checking subnet “172.168.1.0” for multicast communication with multicast group “230.0.1.0”…

Check of subnet “172.168.1.0” for multicast communication with multicast group “230.0.1.0” passed.

 

Checking subnet “172.168.2.0” for multicast communication with multicast group “230.0.1.0”…

Check of subnet “172.168.2.0” for multicast communication with multicast group “230.0.1.0” passed.

 

Checking subnet “192.168.18.128” for multicast communication with multicast group “230.0.1.0”…

Check of subnet “192.168.18.128” for multicast communication with multicast group “230.0.1.0” passed.

 

Check of multicast communication passed.

Total memory check passed

Available memory check passed

Swap space check passed

Free disk space check passed for “macleandb-008:/oracle/app/product/grid”

Free disk space check passed for “macleandb-007:/oracle/app/product/grid”

Free disk space check failed for “macleandb-008:/tmp/”

Check failed on nodes:

macleandb-008

Free disk space check passed for “macleandb-007:/tmp/”

Check for multiple users with UID value 1101 passed

User existence check passed for “oracle”

Group existence check passed for “oinstall”

Group existence check passed for “dba”

Membership check for user “oracle” in group “oinstall” [as Primary] passed

Membership check for user “oracle” in group “dba” passed

Run level check passed

Hard limits check passed for “maximum open file descriptors”

Soft limits check passed for “maximum open file descriptors”

Hard limits check passed for “maximum user processes”

Soft limits check passed for “maximum user processes”

System architecture check passed

Kernel version check passed

Kernel parameter check passed for “ncargs”

Kernel parameter check passed for “maxuproc”

Kernel parameter check passed for “tcp_ephemeral_low”

Kernel parameter check passed for “tcp_ephemeral_high”

Kernel parameter check passed for “udp_ephemeral_low”

Kernel parameter check passed for “udp_ephemeral_high”

Package existence check passed for “bos.adt.base”

Package existence check passed for “bos.adt.lib”

Package existence check passed for “bos.adt.libm”

Package existence check passed for “bos.perf.libperfstat”

Package existence check passed for “bos.perf.perfstat”

Package existence check passed for “bos.perf.proctools”

Package existence check passed for “xlC.aix61.rte”

Package existence check passed for “xlC.rte”

Operating system patch check failed for “Patch IZ97457”

Check failed on nodes:

macleandb-008,macleandb-007

Operating system patch check failed for “Patch IZ89165”

Check failed on nodes:

macleandb-008,macleandb-007

Check for multiple users with UID value 0 passed

Current group ID check passed

 

Starting check for consistency of primary group of root user

 

Check for consistency of root user’s primary group passed

 

Starting Clock synchronization checks using Network Time Protocol(NTP)…

 

NTP Configuration file check started…

NTP Configuration file check passed

No NTP Daemons or Services were found to be running

PRVF-5507 : NTP daemon or service is not running on any node but NTP configuration file exists on the following node(s):

macleandb-008,macleandb-007

Clock synchronization check using Network Time Protocol(NTP) failed

 

Core file name pattern consistency check passed.

 

User “oracle” is not part of “system” group. Check passed

Default user file creation mask check passed

Checking consistency of file “/etc/resolv.conf” across nodes

 

File “/etc/resolv.conf” does not exist on any node of the cluster. Skipping further checks

 

File “/etc/resolv.conf” is consistent across nodes

 

Time zone consistency check passed

User ID < 65535 check passed

 

Kernel 64-bit mode check passed

 

 

Pre-check for cluster services setup was unsuccessful on all the nodes.

 

 

 

 

Test “Oracle Database 11g R2 (11.2.0) Preinstall (AIX)” executed at 05-Dec-2012 01:40:28

 

Test Results

~~~~~~~~~~~~

 

 

 

ID     NAME                 RESULT  VALUE

====== ==================== ======= ==========================================

A00010 OS Certified?        PASSED  Certified

A00015 HARDWARE_BITMODE 64? PASSED  is 64-bit

A00016 System mode 64-bit?  FAILED  bootinfo error

A00020 User in /etc/passwd? PASSED  userOK

A00040 Group in /etc/group? PASSED  GroupOK

A00050 Enter ORACLE_HOME    RECORD

A00060 ORACLE_HOME Valid?   FAILED  OHnotvalid

A00070 O_H Permissions OK?  FAILED  ORACLE_HOME must exist for this rule

A00080 oraInventory Permiss PASSED  oraInventoryNotFound

A00090 Got Software Tools?  PASSED  ld_nm_ar_make_found

A00100 Umask Set to 022?    PASSED  UmaskOK

A00110 ulimits OK?          FAILED  StackTooSmall

A00140 LDLIBRARYPATH Unset? PASSED  UnSet

A00160 LIBPATH Unset?       PASSED  UnSet

A00190 Enter JDK Home       RECORD

A00200 JDK Version          FAILED  JDK home is missing

A00210 Other O_Hs in PATH?  PASSED  NoneFound

A00220 Other OUI Up?        PASSED  NoOtherOUI

A00230 /tmp Adequate?       PASSED  TempSpaceOK

A00240 Disk Space OK?       SKIPPED This rule needs an accessible ORACLE_..>

A00250 Swap (in MB)         RECORD  512

A00260 RAM (in MB)          PASSED  509440

A00270 SwapToRAM OK?        FAILED  SwapLessThanRAM

A00290 IP Address           RECORD  192.168.18.227

A00300 Domain Name          RECORD  NotFound

A00310 DNS Lookup           FAILED  Host not correctly registered in DNS

A00320 /etc/hosts Format    FAILED  no entry found

A00330 Kernel Parameters OK FAILED  NoAccess

A00335 aio_maxreqs OK?      FAILED  ioo error

A00340 AIXTHREAD_SCOPE=S?   PASSED  AIXTHREAD_SCOPEOK

A00350 LINK_CNTRL is Unset? PASSED  LINK_CNTRLunset

A00410 Got OS Patches?      PASSED  PatchesNotRequired

A00430 Got OS Packages?     FAILED  [gpfs.base] not installed

A00445 TCP/UDP Ephemeral OK PASSED  Ephemeral OK

 

以上检测出现fail的环节可以忽略,安装环境已成熟。

 

 

11gR2 GI/RAC正式安装

 

1. 解压安装介质并运行rootpre.sh脚本:

 

拷贝一个UNZIP过来macleandb-007 # /tmp/unzip   p10404530_112030_AIX64-5L_1of7.zipmacleandb-007 # /tmp/unzip p10404530_112030_AIX64-5L_2of7.zip

macleandb-007 # /tmp/unzip p10404530_112030_AIX64-5L_3of7.zip

 

 

 

 

macleandb-007 # ./rootpre.sh

./rootpre.sh output will be logged in /tmp/rootpre.out_12-12-05.01:14:00

 

Checking if group services should be configured….

Nothing to configure.

 

 

 

2. 执行./runInstaller 启动GI安装

 

step1 选择skil software updates

 

 

step 2选择 安装为cluster

 

step3 选择 Advanced Installation

 

Step4 加入简体中文语言

 

 

step5 填入合适的cluster name和scan name,使用默认端口1521

 

step 6 验证SSH等价性

 

 

step7 指定en0、en1为private network, en5为public network

 

 

step8 指定shared file system为存储类型

 

step9 指定ocr位置

 

step10 指定votedisk位置,后续步骤点击Next即可

 

 

 

在2个节点上执行必要的orainstRoot.sh和root.sh脚本:

 

macleandb-007 #  /home/grid/app/oraInventory/orainstRoot.shChanging permissions of /home/grid/app/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.

 

Changing groupname of /home/grid/app/oraInventory to oinstall.

The execution of the script is complete.

macleandb-007 # /oracle/app/product/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME=  /oracle/app/product/grid

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Creating /usr/local/bin directory…

Copying dbhome to /usr/local/bin …

Copying oraenv to /usr/local/bin …

Copying coraenv to /usr/local/bin …

 

 

Creating /etc/oratab file…

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /oracle/app/product/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

User grid has the required capabilities to run CSSD in realtime mode

OLR initialization – successful

root wallet

root wallet cert

root cert export

peer wallet

profile reader wallet

pa wallet

peer wallet keys

pa wallet keys

peer cert request

pa cert request

 

peer cert

pa cert

peer root cert TP

profile reader root cert TP

pa root cert TP

peer pa cert TP

pa peer cert TP

profile reader pa cert TP

profile reader peer cert TP

peer user cert

pa user cert

Adding Clusterware entries to inittab

 

 

CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘macleandb-007’

CRS-2676: Start of ‘ora.mdnsd’ on ‘macleandb-007’ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘macleandb-007’

CRS-2676: Start of ‘ora.gpnpd’ on ‘macleandb-007’ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘macleandb-007’

CRS-2672: Attempting to start ‘ora.gipcd’ on ‘macleandb-007’

CRS-2676: Start of ‘ora.cssdmonitor’ on ‘macleandb-007’ succeeded

CRS-2676: Start of ‘ora.gipcd’ on ‘macleandb-007’ succeeded

CRS-2672: Attempting to start ‘ora.cssd’ on ‘macleandb-007’

CRS-2672: Attempting to start ‘ora.diskmon’ on ‘macleandb-007’

CRS-2676: Start of ‘ora.diskmon’ on ‘macleandb-007’ succeeded

CRS-2676: Start of ‘ora.cssd’ on ‘macleandb-007’ succeeded

clscfg: -install mode specified

Successfully accumulated necessary OCR keys.

Creating OCR keys for user ‘root’, privgrp ‘system’..

Operation successful.

Now formatting voting disk: /oradata/oradata01/vote/vote1.

Now formatting voting disk: /oradata/oradata02/vote/vote2.

Now formatting voting disk: /oradata/oradata03/vote/vote3.

CRS-4603: Successful addition of voting disk /oradata/oradata01/vote/vote1.

CRS-4603: Successful addition of voting disk /oradata/oradata02/vote/vote2.

CRS-4603: Successful addition of voting disk /oradata/oradata03/vote/vote3.

##  STATE    File Universal Id                File Name Disk group

—  —–    —————–                ——— ———

1. ONLINE   08a3980556c04f05bf2286c0ad1a0924 (/oradata/oradata01/vote/vote1) []

2. ONLINE   21d4c2b231be4fdcbf4d44a3f19455f2 (/oradata/oradata02/vote/vote2) []

3. ONLINE   03619a54a99f4f9fbfc6b22cef4c31da (/oradata/oradata03/vote/vote3) []

Located 3 voting disk(s).

 

 

 

macleandb-008 # /home/grid/app/oraInventory/orainstRoot.sh

Changing permissions of /home/grid/app/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions for world.

 

Changing groupname of /home/grid/app/oraInventory to oinstall.

The execution of the script is complete.

 

 

 

 

 

macleandb-008 # /oracle/app/product/grid/root.sh

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME=  /oracle/app/product/grid

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Creating /usr/local/bin directory…

Copying dbhome to /usr/local/bin …

Copying oraenv to /usr/local/bin …

Copying coraenv to /usr/local/bin …

 

 

Creating /etc/oratab file…

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Using configuration parameter file: /oracle/app/product/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

 

User grid has the required capabilities to run CSSD in realtime mode

OLR initialization – successful

Adding Clusterware entries to inittab

CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node unknown, number unknown, and is terminating

An active cluster was found during exclusive startup, restarting to join the cluster

Configure Oracle Grid Infrastructure for a Cluster … succeeded

macleandb-008 #

 

 

 

执行完成上述脚本后在OUI图形界面上点击Finish完成安装,并验证安装结果:

 

$ crsctl query crs softwareversion

Oracle Clusterware version on node [macleandb-007] is [11.2.0.3.0]

 

 

$ crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [11.2.0.3.0]

 

 

$ crsctl stat res -t

——————————————————————————–

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

——————————————————————————–

Local Resources

——————————————————————————–

ora.LISTENER.lsnr

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.asm

OFFLINE OFFLINE      macleandb-007               Instance Shutdown

OFFLINE OFFLINE      macleandb-008

ora.gsd

OFFLINE OFFLINE      macleandb-007

OFFLINE OFFLINE      macleandb-008

ora.net1.network

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.ons

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.registry.acfs

OFFLINE OFFLINE      macleandb-007

OFFLINE OFFLINE      macleandb-008

——————————————————————————–

Cluster Resources

——————————————————————————–

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE       macleandb-007

ora.macleandb-007.vip

1        ONLINE  ONLINE       macleandb-007

ora.macleandb-008.vip

1        ONLINE  ONLINE       macleandb-008

ora.cvu

1        ONLINE  ONLINE       macleandb-007

ora.oc4j

1        ONLINE  ONLINE       macleandb-007

ora.scan1.vip

1        ONLINE  ONLINE       macleandb-007

 

 

 

 

$ crsctl stat res -t -init

——————————————————————————–

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

——————————————————————————–

Cluster Resources

——————————————————————————–

ora.asm

1        OFFLINE OFFLINE                               Instance Shutdown

ora.cluster_interconnect.haip

1        ONLINE  ONLINE       macleandb-007

ora.crf

1        ONLINE  ONLINE       macleandb-007

ora.crsd

1        ONLINE  ONLINE       macleandb-007

ora.cssd

1        ONLINE  ONLINE       macleandb-007

ora.cssdmonitor

1        ONLINE  ONLINE       macleandb-007

ora.ctssd

1        ONLINE  ONLINE       macleandb-007               OBSERVER

ora.diskmon

1        OFFLINE OFFLINE

ora.drivers.acfs

1        ONLINE  ONLINE       macleandb-007

ora.evmd

1        ONLINE  ONLINE       macleandb-007

ora.gipcd

1        ONLINE  ONLINE       macleandb-007

ora.gpnpd

1        ONLINE  ONLINE       macleandb-007

ora.mdnsd

1        ONLINE  ONLINE       macleandb-007

 

 

通过上述命令验证确认Grid Infrastructure Cluster版本、状态良好。

 

3. 进一步安装RDBMS DB Software,运行./runInstaller启动OUI界面

 

 

step1 点击NEXT

 

Step2 选择skip software updates

Step3 选择Install database software only

 

Step4 选择RAC安装macleandb-007、macleandb-008 2个节点

 

Step5 选择添加简体中文语音包

Step6 选择安装企业版

 

Step7 选择安装RDBMS的ORACLE_HOME

Step8 选择dba 为OSDBA组

Step9 复查安装先决条件,以上Warning可以忽略,点击Ignore ALL并NEXT

Step10 Summary页面点击Install

 

Step 11 安装过程完成后,用root用户在2个节点分别运行$ORACLE_HOME/root.sh,脚本执行完成后RDBMS DB软件安装完毕。

 

 

 

4. 使用DBCA创建测试用数据库

 

切换至oracle用户并执行dbca工具:

Step0 点选RAC database
Step1 点选Create Database
Step2 点选General Purpose
Step3 填入DB NAME并加入macleandb-007、macleandb-008 2个节点。
Step 4 不配置Enterprise Manager,并启用Automatic maintenance Tasks
Step5 输入sysdba密码
Step6 选择使用OMF,并使用共享文件系统目录存放数据文件
Step7 指定Fast Recovery Area快速恢复区域目录,及大小
Step8 勾选Sample Schemas,装载示例模式用以测试性能和可用性
Step9 选择合适的SGA、PGA内存配置、processes参数和数据库字符集。
Step10 指定redolog文件的大小,过小与的redolog不利于性能,这里创建512MB一个的online redolog。
Step11 勾选Create Database点击FINISH正式创建数据库

DBCA完成create database工作后,检查创建的测试数据库状态:

 

macleandb-007 # su – grid

$ crsctl stat res -t

——————————————————————————–

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

——————————————————————————–

Local Resources

——————————————————————————–

ora.MAC_LSN.lsnr

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.LISTENER.lsnr

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.asm

OFFLINE OFFLINE      macleandb-007               Instance Shutdown

OFFLINE OFFLINE      macleandb-008

ora.gsd

OFFLINE OFFLINE      macleandb-007

OFFLINE OFFLINE      macleandb-008

ora.net1.network

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.ons

ONLINE  ONLINE       macleandb-007

ONLINE  ONLINE       macleandb-008

ora.registry.acfs

OFFLINE OFFLINE      macleandb-007

OFFLINE OFFLINE      macleandb-008

——————————————————————————–

Cluster Resources

——————————————————————————–

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE       macleandb-007

ora.macleandb-007.vip

1        ONLINE  ONLINE       macleandb-007

ora.macleandb-008.vip

1        ONLINE  ONLINE       macleandb-008

ora.cvu

1        ONLINE  ONLINE       macleandb-007

ora.oc4j

1        ONLINE  ONLINE       macleandb-007

ora.scan1.vip

1        ONLINE  ONLINE       macleandb-007

ora.testdb.db

1        ONLINE  ONLINE       macleandb-007               Open

2        ONLINE  ONLINE       macleandb-008               Open

 

 

macleandb-007 # su  –  oracle

 

 

$ srvctl stop database -d testdb

$ srvctl start database -d testdb

 

 

上述命令结果显示测试用TESTDB状态良好、可用。

Silent Installation静默安装11gR2 DB SERVER单机并手动建库步骤

静默安装11gR2 DB SERVER单机并手动建库步骤

静默安装是在我们无法使用OUI图形界面安装ORACLE DB软件,亦或者我们需要大规模部署该软件时采用的方法。
静默安装不要求启动图形界面,仅仅使用命令行即可实施。

具体在11gR2单机以silent静默方式安装时,可以省略使用response file,步骤如下:

1. 解压安装包,如果你是在Linux上且安装目前最新的Patchset 11.2.0.3(推荐)的话,首先解压介质安装包

如果在AIX上可能还需要执行必要的rootpre.sh

 

 

2. 创建必要的目录,以及Oracle用户的ulimit限制和kernel parameters

[root@mlab2 grid]# mkdir /u01

[root@mlab2 grid]# chown oracle:oinstall /u01
[root@mlab2 grid]# su – oracle

 

 

3. 正式使用runInstaller -silent 静默方式安装
$ ./runInstaller -silent -debug -force \
FROM_LOCATION=/home/oracle/database/stage/products.xml \
oracle.install.option=INSTALL_DB_SWONLY \
UNIX_GROUP_NAME=oinstall \
INVENTORY_LOCATION=/u01/app/oracle/oraInventory \
ORACLE_HOME=/u01/app/oracle/product/11201/db_1 \
ORACLE_HOME_NAME=”OraDb11g_Home9″ \
ORACLE_BASE=/u01/app/oracle \
oracle.install.db.InstallEdition=EE \
oracle.install.db.isCustomInstall=false \
oracle.install.db.DBA_GROUP=dba \
oracle.install.db.OPER_GROUP=dba \
DECLINE_SECURITY_UPDATES=true

 

 

4.
切换到root用户执行必要的脚本

[oracle@mlab2 bin]$ su – root
Password:
[root@mlab2 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@mlab2 ~]# /u01/app/oracle/product/11201/db_1/root.sh
Check /u01/app/oracle/product/11201/db_1/install/root_mlab2.oracle.com_2009-11-23_20-26-32.log for the output of root script

 

 

 

5.
设置必要的环境变量

[oracle@mlab2 ~]$ cat db2.sh

 

export ORACLE_SID=CRMV
export ORACLE_HOME=/u01/app/oracle/product/11201/db_1
export ORACLE_BASE=/u01/app/oracle
export PATH=$ORACLE_HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:$ORACLE_HOME/OPatch:/opt/oracle.SupportTools

 

6.

创建必要的目录

[root@mlab2 ~]# mkdir /oradata/
[root@mlab2 ~]# chown oracle:oinstall /oradata

 

[oracle@mlab2 ~]$ mkdir -p /oradata/CRMV/controlfile
[oracle@mlab2 dbs]$ mkdir /oradata/CRMV/logfile
[oracle@mlab2 dbs]$ mkdir /oradata/CRMV/datafile

 

 

7.

创建init.ora PFILE初始化参数文件
[oracle@mlab2 ~]$ source db2.sh
[oracle@mlab2 ~]$ cd $ORACLE_HOME
[oracle@mlab2 db_1]$ cd dbs
[oracle@mlab2 dbs]$ cat init
initCRMV.ora init.ora

 

[oracle@mlab2 dbs]$ cat initCRMV.ora
db_name=CRMV
sga_target=1200M
control_files=(‘/oradata/CRMV/controlfile/control01.dbf’,’/oradata/CRMV/controlfile/control02.dbf’)
undo_management=AUTO
undo_tablespace=UNDOTBS

 

8.创建密码文件

[oracle@mlab2 dbs]$ orapwd file=orapwCRMV entries=10 password=oracle
[oracle@mlab2 dbs]$ ls -l orapwCRMV
-rw-r—– 1 oracle oinstall 2560 Nov 23 20:58 orapwCRMV

 

 

9.
正式手动建库

CREATE DATABASE CRMV
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 (‘/oradata/CRMV/logfile/redo01.log’) SIZE 256M,
GROUP 2 (‘/oradata/CRMV/logfile/redo02.log’) SIZE 256M,
GROUP 3 (‘/oradata/CRMV/logfile/redo03.log’) SIZE 256M
MAXLOGFILES 50
MAXLOGMEMBERS 5
MAXLOGHISTORY 10000
MAXDATAFILES 3000
MAXINSTANCES 10
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET UTF8
DATAFILE ‘/oradata/CRMV/datafile/system01.dbf’ SIZE 825M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE ‘/oradata/CRMV/datafile/sysaux01.dbf’ SIZE 825M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE ‘/oradata/CRMV/datafile/temp01.dbf’
SIZE 200M REUSE
UNDO TABLESPACE undotbs
DATAFILE ‘/oradata/CRMV/datafile/undotbs01.dbf’
SIZE 600M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

 

此步骤也可以参考链接:http://docs.oracle.com/cd/B19306_01/server.102/b14231/create.htm#g1034097

 

 

10.
创建非必要的表空间例如USERS,以及应用表空间或索引表空间
SQL> alter system set db_create_file_dest=’/oradata/CRMV’;

System altered.
CONNECT SYS/password AS SYSDBA
— create a user tablespace to be assigned as the default tablespace for users
CREATE TABLESPACE users LOGGING
DATAFILE SIZE 525M AUTOEXTEND ON NEXT 16M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
— create a tablespace for indexes, separate from user tablespace
CREATE TABLESPACE indx LOGGING
DATAFILE SIZE 325M AUTOEXTEND ON NEXT 16M MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;

SQL>
SQL> alter database default tablespace users;

Database altered.

SQL> alter database default temporary tablespace tempts1;
alter database default temporary tablespace tempts1
*
ERROR at line 1:
ORA-12907: tablespace TEMPTS1 is already the default temporary tablespace

 

 

 

11.
执行catalog.sql和catproc.sql 2个必要的字典脚本

CONNECT SYS/password AS SYSDBA
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
EXIT

1* select comp_name,version from dba_server_registry
SQL> /

COMP_NAME VERSION
—————————————- ——————————
Oracle Database Catalog Views 11.2.0.3.0
Oracle Database Packages and Types 11.2.0.3.0

2 rows selected.

其他一些有必要执行的脚本

@?/rdbms/admin/catblock.sql
@?/rdbms/admin/dbmspool.sql

conn system/oracle

@?/sqlplus/admin/pupbld.sql
@?/sqlplus/admin/help/hlpbld.sql helpus.sql

 

 

 

12. 设置必要的参数,并打开 日志归档

SQL> create spfile from pfile;

File created.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1252663296 bytes
Fixed Size 2227944 bytes
Variable Size 335544600 bytes
Database Buffers 905969664 bytes
Redo Buffers 8921088 bytes
Database mounted.
SQL> alter system set deferred_segment_creation=false;

System altered.
SQL> alter database archivelog ;

Database altered.
SQL> alter database open;

Database altered.
SQL> alter system archive log current;

System altered.

SQL> /

System altered.

SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/oracle/product/11201/db_1/dbs/arch
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5
更多11g 参数推荐可以参考 https://www.askmaclean.com/archives/11gr2-features-disable.html

 

 

13. 如果需要重命名DB NAME,则可以运行如下命令

SQL> alter database rename global_name to LIUXIANGBING;

Database altered.

SQL> select * from global_name;

GLOBAL_NAME
——————————————————————————–
LIUXIANGBING

 

14. 配置LISTENER、SQLNET.ORA等网络参数

深入理解Oracle Universal Installer (OUI) Text

文档介绍了Oracle Universal Installer (OUI)的一些细节只是,PPT Slideshare版地址在这里:https://www.askmaclean.com/archives/%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3oracle-universal-installer-oui.html , 这里share一下Text版本的。

 

OUI是什么?

  • 基于Java的图形用户界面(GUI)应用程序
  • 会从products.xml文件中读取组件信息并安装套件
  • OUI提供了统一的用户安装界面
  • 使用OUI的先题条件:
    • 使用OUI需要用到Java运行时环境即Java Runtime Environment (JRE),在绝大多数平台上该JRE会由OUI自动安装(少数如itanium Linux平台需要另外安装)
    • 内存需求:基于不同平台及所安装的Oracle产品而不同,在绝大多数情况下至少需要32MB以上的空闲内存
    • 磁盘空间需求:在Windows上至少需要60MB空间而在Unix平台上则为70MB才能启动OUI,此外库信息文件(inventory files)大约占用1MB空间

 

OUI能做什么?

  • 其核心功能无疑是安装各类Oracle产品或组件
  • 反安装组建或产品
  • 维护基于XML的产品信息仓库(inventory)
  • 为安装执行必要的安装前检查
  • 当需要时额外调用配置助手(如Netca,DBCA,DBUA等)
  • 从oracle 11g开始,OCM也就是Oracle Configuration Manager也同样被综合到OUI的框架中
  • 信息库操作,包括附件节点列表

 

OUI具有那些阶段?

  • 启动阶段
    • 开始对用户可见,载入必要的文件并显示一个欢迎界面
  • 安装阶段
    • 用户选择安装或反安装某些产品;提供源和目标目录
  • 选择阶段
    • 需要安装的产品被勾选,可用磁盘空间及必要磁盘空间被显示,并会出现summary总结页面
  • 安装进度阶段
    • 实际安装过程中,显示安装进度条
  • 安装完成阶段
    • 要求用户运行root.sh脚本,并启动某种配置助理工具(configuration assistants)

 

安装模式

  • 互动模式
  • 用户使用图形界面访问各安装流程在对话框中并提供必要的安装信息,当提示时。在小范围安装中最为合适
  • 静默安装
  • 省略图形界面,由相应文件(response file)提供必要的信息。在安装过程中自动化实现,在众多服务器时。
  • 如setup.exe -slient -responseFile

 

Oraparam.ini

  • OUI的初始化文件
  • 位于安装介质下的”install”子目录中
  • 文档How to Interpret the oraparam.ini File [ID 237097.1]介绍了解释了oraparam.ini文件的内容
  • Oraparam.ini的一些重要参数

SOURCE=Location of the products.jar file. This location is relative to the directory where oraparam.ini exists.
JRE_LOCATION=Relative location of the Java Runtime Environment (JRE) which will be used by the Oracle Universal Installer
JRE_MEMORY_OPTIONS=Set these variables to influence the behaviour of JRE.ie. max heap size for java (-mx), startup size of java heap (-ms), disabling JIT (-nojit). You should increase the -mx and -ms values if you’re getting out of memory errors.

 

如何启动OUI互动模式?

  • 在windows上:
    • \setup.exe
    • 安装后
    • %ORACLE_HOME%\oui\bin\setup.exe
  • 在unix上
    • Cd
    • ./runInstaller
    • 安装后
    • Cd $ORACLE_HOME/oui/bin
    • ./runInstaller

 

如何启动OUI静默模式?

  • 在windows上:
  • 记录相关的相应文件:
    • Setup.exe -record -responseFile
    • 以静默模式安装
    • Setup.exe -slient -responseFile
  • 在UNIX上:
  • 记录相关的响应文件:
  • ./runInstaller -record -responseFile
  • 在静默模式下安装
  • ./runInstaller -slient -responseFile
  • 参考
  • OUI Guide:Oracle Universal Installer command line options and arguments Note 782918.1

 

OUI日志存放在哪里?

  • 每次OUI启动都会产生日志,日志名会以时间戳的形式归档
  • 这些日志包含了安装过程中丰富的信息。我们推荐在安装完成后复验一遍日志
  • 一般来说这些日志存放在中心信息库中(inventory),在logs子目录下的并以如下形式命名:

installActions<year-mm-dd_hh-mi-ss><AM|PM>.log
oraInstall<year-mm-dd_hh-mi-ss><AM|PM>.err
oraInstall<year-mm-dd_hh-mi-ss><AM|PM>.out

中心信息库的位置可以通过库指针文件了解到
库指针文件的默认位置:
在windows 上:注册表中的”HKLM\Software\oracle\inst_loc”
在unix上:例如Solaris平台:/var/opt/oracle/oraInst.loc
其他平台如Linux:/etc/oraInst.loc

 

如何确认已安装的产品

  • 使用OUI
    • 启动OUI并尝试点击”Installed Products”
  • 也可以使用Opatch工具
    • Opatch lsinventory -detail

 

如何启用OUI的debug和trace功能?

  • OUI工具存在”-debug”选项
    • 将启用最精细级别的信息日志
    • 将显示启动阶段的信息(例如抽取JRE)
    • 在对OUI进行可能由java引起的问题诊断时十分有效
    • 举例来说: ./runInstaller -debug
  • 另一方面可以对OUI启用系统调用跟踪trace,一般我们使用操作系统提供的tracing工具
    • 举例而言:truss -aefo /tmp/oui_trace.log ./runInstaller
    • 参考文档:Note 110888.1 介绍了如何trace Unix下的系统调用
    • 绝大多数OUI意外终止的问题可以从.ERR文件中找到相关问题
    • OUI: “Abnormal program termination” with java.io.IOException in .err file [ID 798338.1]

 

 

信息库指针文件

  • 默认的信息库指针:在给定平台上的某个标准位置存放着该指针文件,该文件包含了中心信息库的位置。
  • /etc/oraInst.loc (Linux上)
  • /var/opt/oracle/oraInst.loc(Solaris上)
  • \\HKEY_LOCAL_MACHINE\\Software\Oracle\inst_loc(Windows上)
  • 示例内容
    inventory_loc=/u01/oraInventory
    inst_group=maclean

 

集中信息库(Central Inventory)

  • 集中信息库:该信息库以目录形式存在,包含了该主机上安装的所有Oracle产品的信息
  • 举例来说在Unix上:/u01/oraInventory
  • 而在Windows平台上:C:\Program Files\Oracle\Inventory
  • 信息库文件:已注册的ORACLE_HOME的列表

/ContentsXML/inventory.xml
示例内容:

<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>10.2.0.1.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb10g_home1" LOC="/u01/oracle/product/10.2.0/db_1" TYPE="O" IDX="1"/>
www.askmaclean.com & www.askmaclean.com
</HOME_LIST>
</INVENTORY>

 

本地信息库(local Inventory)

  • 本地信息库:目录结构包含了ORACLE_HOME中Oracle软件的细节信息
  • $ORACLE_HOME/inventory

组件文件:各组件信息及其关联性,补丁集和One-off patch以及其所修复的bug,$ORACLE_HOME/inventory/ContentsXML/comps.xml
ORACLE_HOME属性文件:关于HOME的GUID,ARU Id和Cluster_nodes等信息:
$ORACLE_HOME/inventory/oraclehomeproperties.xml
本地信息库指针:指向自身注册的中心信息库(10Gr2以后才出现)
ORACLE_HOME/oraInst.loc

 

如何重建集中信息库

  • 前提是本地信息库没有被损坏或丢失
  • 使用runInstaller的’-attachHome’ 选项
  • 仅在10gr1以后可能
  • 在10.1.0.3以后,OUI会重建指定位置的oraInst.loc集中信息库,即便oraInventory目录不存在
  • 命令语法
  • $ORACLE_HOME/oui/bin/runInstaller -slient -attachHome \
  • ORACLE_HOME=<ORACLE HOME PATH>
  • ORACLE_HOME_NAME=<name of the ORACLE HOME>
  • 在oracle 10gr2以后attachhome和detachome的脚本被自动包含
  • <ORACLE_HOME>/oui/bin/attachhome.sh
  • <ORACLE_HOME>/oui/bin/detachhome.sh

 

10g以前和10g后安装的区别

  • 在10g以前(经典的如9iR2),OUI与JRE组件一直作为非ORACLE_HOME组件而置于其独立位置上,与ORACLE_HOME相分离
  • 举例而言在9i中其安装位置
  • OUI 组件位于<oraInventory>/../oui
  • JRE组件位于<oraInventory>/../jre
  • <oraInventory>/ContentsXML/comps.xml包含了9iR2中OUI与JRE组件的相关信息
  • 到10g以后,JRE与OUI组件被移动到独立的ORACLE_HOME中,以使得各个ORACLE HOME可以做到自包含并支持例如clone和attachhome等的操作
  • 举例来说从10g以后,安装位置位于
  • OUI组件在$ORACLE_HOME/oui
  • JRE组件在$ORACLE_HOME/jre
  • <OH>/inventory/ContentsXML/comps.xml 包含了关于OUI和JRE的信息

 

使用OUI的前提:合适的JRE

  • OUI是基于Java的图形化工具
  • 启动JRE必须要用到JRE(Java运行时环境Java Runtime Environment)
  • 在绝大多数平台上安装包中已经包含了启动OUI必要的JRE
  • runInstaller/setup.exe在引导阶段会自动去解压并使用oraparam.ini中JRE_LOCATION所指向的JRE程序
  • OUI可以不使用自带的JRE,而使用用户指定的安装在操作系统上的JRE程序
  • JRE最低版本要求
  • OUI 2.2.0.X要求JRE版本不低于 1.3.1(某些老版本的OUI只接受少数几个较早版本JRE,有时这些JRE往往已经找不到了)
  • OUI 10.1.0.X和10.2.0.X 要求JRE版本不低于1.4.2
  • OUI 11.1.0.X则要求不低于1.5

 

JRE是如何与安装套件打包的

  • JRE一般对应与OUI版本和安装套件打包在一起
  • 安装套件使用OUI 10.2.0.x版包含了扩展的JRE套件

cat oraparam.ini |grep JRE_LOCATION
JRE_LOCATION=../stage/Components/oracle.swd.jre/1.4.2.8.0/1/DataFiles
filegroup1.jar filegroup2.jar filegroup3.jar filegroup4.jar filegroup5.jar
11g中installer在oraparam.ini中引入了BOOTSTRAP_COMPS与JRE_SCRATCH_LOC参数;通过使用这些参数,11g安装器可以抽取并使用JDK组件(即oracle.jdk)由安装套件自带的。
BOOTSTRAP_COMPS=”oracle.swd.oui:11.1.0.6.0,oracle.swd.oui.core:11.1.0.6.0,oracle.jdk:1.5.0.1.1″
JRE_SCRATCH_LOC=jdk/jre

 

如何使用可选的JRE协同OUI工作
安装套件(10.2.0.x和11g)使用OUI版本10.2.0.X和11.X,支持使用”-jreloc”选项以使用用户提供的JRE软件。
./runInstaller -jreloc /usr/local/jdk1.6.0_24 (Unix)
Setup.exe -jreloc C:\jdk1.6 (Windows)

安装套件(版本9.2.0.5至9.2.0.8和10.1.0.x)使用OUI版本10.1.0.X,可以参考Metalink文档”Note 298163.1”以了解创建“bin.jar和all_exception_bin.jar”

安装套件(版本9.2.0.2至9.2.0.4)使用OUI版本2.2.0.X,通过修改oraparam.ini并替换JRE_LOCATION所指向的位置,可以利用用户想要使用的JRE。

 

安装套件自带JRE已知的Bug/问题

Bug 5391050 – DB 10.2.0.1 INSTALLATION FAILS ON MONTECITO CHIP H/W
Note 400227.1  How To Install Oracle RDBMS Software On Itanium Servers With Montecito Processors

 

Bug 5530274 PATCH “P4547809_92080_SOLARIS64.ZIP” JAVA VERSION 1.3.1 – SR NUMBER 5746016.992
Note 393199.1 Oui provided with Patchset 9.2.0.8 fails with exception

 



 

11g新特性:ORACLE_BASE

  • ORACLE_BASE目前可以充当一个新的会话变量了
  • 例如./runInstaller ORACLE_BASE=<location of ORACLE_BASE>
  • 目前在GUI模式下界面会提示用户是否想要使用已有的ORACLE_BASE或者指定一个新的
  • 在安装之后,ORACLE_BASE信息会被记录到本地信息库中的以下文件
  • <OH>/inventory/ContentsXML/oraclehomeproperties.xml
  • 参考

Note 454442.1 11g Install : Understanding about Oracle Base, Oracle Home and Oracle Central/Global Inventory locations [ID 454442.1]

 

 11g新特性:JRE

  • 引入了可客制化的引导程序功能
  • 这样做的出发点:
  • 软件自带的JRE无法正常引导或工作
  • 用户未安装OS级别的JRE/JDK,由此runInstaller无法使用-jreloc选项
  • Oraparam.ini文件中的新参数

BOOTSTRAP_COMPS=”oracle.swd.oui:11.1.0.6.0,oracle.swd.oui.core:11.1.0.6.0,oracle.jdk:1.5.0.1.1″
JRE_SCRATCH_LOC=jdk/jre,该参数指定了启动java引擎所在位置的相对起点
举例来说JRE_SCRATCH_LOC=jdk/jre,那么在引导完成后,JRE在<scratch>/jdk/jre/bin/java的位置被启动
runinstaller目前出现了新的选项:-bootstarponly,即仅针对指定的组件启动引导操作
../runInstaller –bootstraponly BOOTSTRAP_LOC=<location>

  • OUI所使用JRE位置的优先级如下
  • 若指定了-jreloc,则使用指定的位置
  • 指定了的JRE_SCRATCH_LOCATION
  • 使用已引导的oracle.swd.jre组件,位置由oraparam.ini指定的JRE_LOCATION决定
  • 否则提示用户输入JRE_LOCATION

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-03-17_01-30-30PM. Please wait …

Please specify JRE/JDK location ( Ex. /home/jre ), <location>/bin/java should exist :/fds

Please specify a valid JRE location :

 

常见问题

  • 信息库常见问题
  • Unix或Windows上OUI启动问题检查列表

 

信息库(inventory)常见问题

  • 集中信息库或本地信息库可能丢失会损坏造成的使用”opatch lsinventory -detail”或者OUI界面上点击installed Products时找不到ORACLE HOME
  • 虽然opatch lsinventory -detail或者OUI界面上installed products点击可以显示相应ORACLE_HOME但无法列出详细信息,一般是ORACLE_HOME相关的信息库丢失或者损坏了
  • 若集中信息库丢失或损坏,可以通过还原来回复,前提是备份过
  • 我们极力推荐日常备份ORACLE_HOME和集中信息仓库,在升级或打patch之前
  • 使用9.2.0.2的客户需要注意,有报告说明OUI 2.2.0.12存在损坏信息库的bug,推荐参考文档Note 229773.1

 

UNIX上常见的OUI启动问题

Itanium Montecito processors相关的JRE问题

Note 401332.1  How To Identify A Server Which Has Intel® Montecito Processors Installed

Note 400227.1  How To Install Oracle RDBMS Software On Itanium Servers With Montecito Processors

 

UNIX上的OUI启动失败检查列表

DISPLAY环境变量设置不当

Note.153960.1 FAQ X Server Testing and Troubleshooting

/tmp临时目录至少需要400MB的空间并且对oracle 安装用户来说可写

实在没有办法的时候,可以修改临时目录变量$TMP到别的目录

Note 339657.1 Unable To Start OUI: not enough room in /tmp

Note 177902.1 How To Set Temporary Space Directory

调用OUI时使用”-debug”选项以确认

在JRE解压阶段没有出现错误

在调用java命令启动OUI阶段没有出现错误

若在JRE解压完成后(java 命令失败)OUI启动失败,那么一般可以确认是自带的JRE在目标系统上存在问题

 

  • 为了确认JRE的问题,手动解压自带的JRE并确认java命令:
cd database/stage/Components/oracle.swd.jre/1.4.2.8.0/1/DataFiles/
mkdir /tmp/java_test
cp *.jar /tmp/java_test
cd /tmp/java_test
Unzip filegroup[1-5].jar
cd jre/1.4.2/bin
chmod 755 java
[maclean@rh8 bin]$ ./java -version
java version "1.4.2_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)

 

可以看到在我们的场景中java命令运行正常,若以上测试的最后结果中java命令出错则说明Oracle安装介质自带的JRE存在问题,这可能是个例,在安装介质传输过程中出现网络错误所导致的文件损坏可能引起以上问题;可以通过checksum等方式验证安装介质包/ISO文件无误。若经过验证发现安装介质没有损坏,那么很有可能是自带JRE在目标操作系统上无法正常运行,用户可以到java.sun.com网站去下载指定平台最新可用的JDK软件,在成功安装后JDK后再次尝试以”-jreloc”选项启动runInstaller程序,命令示例如下:

./runInstaller -debug -jreLoc <JRE Install Home>

 

 

沪ICP备14014813号

沪公网安备 31010802001379号