第四部分 安装集群就绪服务 (CRS)
通过SSH或其它方式上传安装文件,两个zip包,然后解压
----Unzip and extract the files:
cd 10gR2
unzip 10201_database_linux32.zip
unzip 10201_clusterware_linux32.zip
----Establish User Equivalency and Set Environment Variables
su - oracle
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
----Install Oracle Clusterware
Start the installation using "runInstaller" from the "clusterware" directory:
在选择CRS安装路径时,改一下路径,如:
name: oracrs10g_home
path: /u01/app/oracle/product/crs
-------------------在安装crs软件时遇到以下错误---------------------------------
Checking local Cluster Synchronization Services (CSS) status ...
Actual Result: One or more of the selected nodes in the cluster has local CSS configured on it.
Check complete. The overall result of this check is: Failed <<<<
Problem: One or more of the selected nodes in the cluster has local CSS configured on it.
Recommendation: Cluster Synchronization Services (CSS) provide services for single-instance Automatic Storage Management (ASM) in addition to being part of the Oracle Clusterware stack. When configured stand-alone outside of the Oracle Clusterware, it is sometimes referred to as "local" CSS.
Because you are installing Oracle Clusterware on a set of nodes that already have local CSS configured, you must shut down any ASM instances and any databases using ASM and deconfigure local CSS on those nodes before proceeding with the Oracle Clusterware installation. You can deconfigure local CSS by running 'localconfig delete' as the root user from OH/bin. After the Oracle Clusterware installation and configuration is complete, CSS will be started and configured to run from the Oracle Clusterware Home. You may then restart any ASM instances and any databases that use ASM.
原因: 以前这个操作系统中安装过10g +ASM 单实例数据库,遗留有CSS服务
解决:删除CSS服务.删除过程 参考del_css.txt
<<在 Linux x86 上安装 Oracle RAC 10g.mht>>这个文档也很有条理性
遇到的问题:crs软件安装到配置助手时失败.
参考文档删除crs后重新安装,注意root.sh的运行日志,在第二个节点运行root.sh时,发现有以下问题:
The given interface(s), "eth0" is not public. Public interfaces should be used to configure virtual IPs.
此问题的解决过程如下:
手工执行vipca,参考文档:
<<在Linux和FireWire上构建您自己的Oracle RAC 10g第2版集群(3).mht>>
到此,CRS软件安装完成.
安装 Oracle 集群件后,可以运行几个测试来验证安装是否成功。在 RAC 集群的所有节点上运行下列命令。
检查集群节点
$ /u01/app/oracle/product/crs/bin/olsnodes -n
linux1 1
linux2 2
检查 Oracle 集群件自动启动脚本
$ ls -l /etc/init.d/init.*
-r-xr-xr-x 1 root root 1951 Oct 4 14:21 /etc/init.d/init.crs*
-r-xr-xr-x 1 root root 4714 Oct 4 14:21 /etc/init.d/init.crsd*
-r-xr-xr-x 1 root root 35394 Oct 4 14:21 /etc/init.d/init.cssd*
-r-xr-xr-x 1 root root 3190 Oct 4 14:21 /etc/init.d/init.evmd*
$crs_stat -t
如果不能运行,将$ORACLE_BASE/product/crs/bin加到PATH变量中.
# ifconfig
此果,VIP IP已经被邦定到eth0网卡上.因此,在安装前,不必去手工邦定VIP IP.
第五部分 安装 Oracle 数据库 10g 软件
仅在集群的一个节点上执行下列安装过程!Oracle 数据库软件将由 Oracle Universal Installer 安装到集群的所有其他节点。
1 验证环境变量
启动 OUI 之前,应先从控制台以 root 运行 xhost 命令以允许建立 X Server 连接。然后,取消 ORACLE_HOME 变量的设置并确认 RAC 集群的每个节点定义了唯一的 ORACLE_SID。还应确认我们是以 oracle 用户帐户登录的:
# xhost +
access control disabled, clients can connect from any host
# su - oracle
取消 ORACLE_HOME 的设置
$ unset ORA_CRS_HOME
$ unset ORACLE_HOME
$ unset ORA_NLS10
$ unset TNS_ADMIN
验证 linux1 上的环境变量
$ env | grep ORA
ORACLE_SID=orcl1
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=xterm
验证 linux2 上的环境变量
$ env | grep ORA
ORACLE_SID=orcl2
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=xterm
2 安装 Oracle 数据库 10g 第 2 版软件
使用以下命令安装 Oracle 数据库 10g 第 2 版软件:
$ cd ~oracle
$ /u01/app/oracle/orainstall/database/runInstaller -ignoreSysPrereqs
在安装过程中,检查环境的时候,提示ASM没有卸载干净,到/etc/oratab中,注释掉原来的条目即可.
在选择安装类型时,选择只安装软件,我们将在下面使用DBCA单独构建RAC数据库.
其它比较正常。
第六部分 创建 TNS 监听器进程
仅在集群的一个节点上执行下列配置过程!网络配置助手 (NETCA) 将在集群所有节点上的集群化配置中设置 TNS 监听器。
DBCA 需要在 RAC 集群的所有节点上配置并运行 Oracle TNS 监听器进程,然后它才能创建集群化数据库。
这个地方同时也配置了节点的本地访问权限。
1 查看$ORACLE_HOME是否正确
2 netca
选择listener configuration,一路默认。
选择Naming Methods configuration 后续屏幕是:
Selected Naming Methods: Local Naming
Naming Methods configuration complete![ Next ]
您将返回到此 Welcome (Type of Configuration) 屏幕。
Oracle TNS 监听器进程现在应在 RAC 集群的所有节点上运行:
$ hostname
linux1
$ ps -ef | grep lsnr | grep -v 'grep' | grep -v 'ocfs' | awk '{print $9}'
LISTENER_LINUX1
=====================
$ hostname
linux2
$ ps -ef | grep lsnr | grep -v 'grep' | grep -v 'ocfs' | awk '{print $9}'
LISTENER_LINUX2
第七部分 创建 Oracle 集群数据库
数据库创建过程应只在集群的一个节点上执行!
我们将使用 DBCA 创建集群化数据库。
在执行 DBCA 前,确保为 $ORACLE_BASE/product/10.2.0/db_1 环境正确设置了 $ORACLE_HOME 和 $PATH。
在试图开始创建集群化数据库之前,还应确保已安装的所有服务(Oracle TNS 监听器、Oracle 集群件进程等)正在运行。
创建集群化数据库
要开始数据库创建过程,运行以下命令:
# xhost +
access control disabled, clients can connect from any host
# su - oracle
$ dbca &
下一步,下一步,选择两个节点,custom Database,db_name&sid: orcl,
next,保留此处的默认选项,即“Configure the Database with Enterprise Manager / Use Database Control for Database Management”。
password: oracle
step7of14,选择存储设备,此处我们使用OCFS,即cluster file system
use common,此处输入/ocfs/oradata,这是在前面已建好的目录
不指定恢复区,也不启用ARCH
选择组件时,去掉所有组件,只保留EMRepository
Database Services对于此测试配置,单击 Add,然后输入 orcltest 作为“Service Name”。将这两个实例设置为 Preferred,并为“TAF Policy”选择 Basic。
提示内存要占去多少多少,OK
memory sga160m pga 16m ;字符集改为al32utf8, next
next next保存建库脚本和模板。
等待安装完成,完成之前,会出现两个窗口,如下:
完成 DBCA 后,您就启动了一个功能完善的 Oracle RAC 集群!
创建 orcltest 服务
在创建 Oracle 集群化数据库的过程中,您添加了一个名为 orcltest 的服务,我们将用它来连接启用了 TAF 的数据库。在我的多个安装中,均将此服务添加到了 tnsnames.ora 中,但从未将其作为每个 Oracle 实例的服务更新过。
使用以下命令来验证已成功添加 orcltest 服务:
如果定义的唯一服务是用于 orcl.idevelopment.info 的,则您将需要手动将此服务添加到两个实例中:
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271063/viewspace-998776/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/271063/viewspace-998776/