RH5.4+ASM+RAW ORACLE 10G 配置
vi /etc/hosts
127.0.0.1 localhost
192.168.10.101 felix1 (eth0)
192.168.10.111 felix1-vip (VIP)
192.168.20.30 felix1-priv (eth1)
192.168.10.102 felix2
192.168.10.122 felix2-vip
192.168.20.40 felix2-priv
因为oracle 的官方只支持到RHEL4为止,所以要修改版本说明,编辑文件 /etc/redhat-release 把Red Hat Enterprise Linux Server release 5 (Tikanga) 改成版本4:redhat-4
vi /etc/sysconfig/network-scripts/ifcfg-eth0写入以下内容:
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.10.255
HWADDR=00:0c:29:16:bb:15
IPADDR=192.168.10.210
NETMASK=255.255.255.0
NETWORK=192.168.10.0
ONBOOT=yes
TYPE=Ethernet
U SERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=192.168.0.1
mkdir /u01
groupadd -g 700 oinstall
groupadd -g 701 dba
useradd -u 501 -g oinstall -G dba oracle
chown -R oracle:dba /u01
passwd oracle
A. [root@rac1 ~]# mount /dev/cdrom /mnt
B. 配置yum本地源
vi /etc/yum.repos.d/rhel-source.repo
[Server]
baseurl=file:///mnt/Server
enabled=1
gpgcheck=1 --
编辑一个脚本
vi pack.sh
#!bin/bash
#start install required packages
echo "start installing required packages"
yum -y install binutils-*
yum -y install compat-libstdc++-*
yum -y install compat-libstdc++-*
yum -y install elfutils-libelf-*
yum -y install elfutils-libelf-devel-*
yum -y install gcc-*
yum -y install gcc-c++-*
yum -y install openmoti*
yum -y install glibc-*
yum -y install glibc-*
yum -y install glibc-common-*
yum -y install glibc-devel-*
yum -y install glibc-devel-*
yum -y install glibc-headers-*
yum -y install ksh-*
yum -y install libaio-*
yum -y install libaio-*
yum -y install libaio-devel-*
yum -y install libaio-devel-*
yum -y install libgcc-*
yum -y install libgcc-*
yum -y install libstdc++-*
yum -y install libstdc++-*
yum -y install libstdc++-devel*
yum -y install make-*
yum -y install sysstat-*
yum -y install unixODBC-*
运行脚本 sh pack.sh
rpm -ivh binutils-*
rpm -ivh compat-libstdc++-*
rpm -ivh compat-libstdc++-*
rpm -ivh elfutils-libelf-*
rpm -ivh elfutils-libelf-devel-*
rpm -ivh gcc-*
rpm -ivh gcc-c++-*
rpm -ivh glibc-*
rpm -ivh glibc-*
rpm -ivh glibc-common-*
rpm -ivh glibc-devel-*
rpm -ivh glibc-devel-*
rpm -ivh glibc-headers-*
rpm -ivh ksh-*
rpm -ivh openmoti*
rpm -ivh libaio-*
rpm -ivh libaio-*
rpm -ivh libaio-devel-*
rpm -ivh libaio-devel-*
rpm -ivh libgcc-*
rpm -ivh libgcc-*
rpm -ivh libstdc++-*
rpm -ivh libstdc++-*
rpm -ivh libstdc++-devel*
rpm -ivh make-*
rpm -ivh sysstat-*
rpm -ivh unixODBC-*
节点一
su - oracle
vi .bash_profile
# export PS1="`/bin/hostname -s`-> "
export EDITOR=vi
export ORACLE_SID=FELIX1
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
export CRS_HOME=$ORACLE_BASE/10.2.0/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
节点二
su – oracle
vi .bash_profile
# export PS1="`/bin/hostname -s`-> "
export EDITOR=vi
export ORACLE_SID=FELIX2
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
export CRS_HOME=$ORACLE_BASE/10.2.0/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
umask 022
mkdir -p $ORACLE_BASE/admin
mkdir -p $ORACLE_HOME
mkdir -p $CRS_HOME
chown -R oracle:oinstall /u01
VBoxManage createhd --filename G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting1.vdi --size 512 --format VDI --variant Fixed
VBoxManage createhd --filename G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting2.vdi --size 512 --format VDI --variant Fixed
VBoxManage createhd --filename G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\data1.vdi --size 6144 --format VDI --variant Fixed
VBoxManage createhd --filename G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\fra1.vdi --size 6144 --format VDI --variant Fixed
VBoxManage storageattach RH5_10GRAC1 --storagectl "IDE 控制器" --port 1 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting01.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC1 --storagectl "IDE 控制器" --port 2 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting02.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC1 --storagectl "IDE 控制器" --port 3 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\data01.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC1 --storagectl "IDE 控制器" --port 4 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\fra02.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC2 --storagectl "IDE 控制器" --port 1 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting01.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC2 --storagectl "IDE 控制器" --port 2 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting02.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC2 --storagectl "IDE 控制器" --port 3 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\data01.vdi --mtype shareable
VBoxManage storageattach RH5_10GRAC2 --storagectl "IDE 控制器" --port 4 --device 0 --type hdd --medium G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\fra02.vdi --mtype shareable
此信息将被记入到每个虚拟磁盘文件的文件头中,故其他其他再使用的时候就无需再设置成共享了。
VBoxManage modifyhd G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting01.vdi --type shareable
VBoxManage modifyhd G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\ocrvoting02.vdi --type shareable
VBoxManage modifyhd G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\data01.vdi --type shareable
VBoxManage modifyhd G:\10goracleInstall\redhat5_10grac\Vboxsharedisk\fra02.vdi --type shareable
同步客户OS与主机OS的时间:
applications -----system setting-----date$time---network time protocol
enable network time protocol
server add
第一次手工同步一次
service ntpd stop
ntpdate 192.168.10.101
ntpdate 192.168.10.102
/etc/security/limits.conf
cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
/etc/pam.d/login
cat >>
/etc/pam.d/login <
session required /lib/security/pam_limits.so
EOF
使用文本编辑器将下面列出的行添加到 /etc/sysctl.conf。要使更改立即生效,请执行 /sbin/sysctl –p
# vi
cat >> /etc/sysctl.conf << EOF
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
EOF
使立即生效:sysctl –p
hangcheck timer 内核模块可监控系统的运行情况,并重新启动出现故障的 RAC 节点它使用两个参数,即 hangcheck_tick(定义系统检查频率)和 hangcheck_margin(定义在重置 RAC 节点前的最大挂起延时)来确定节点是否出现故障,在 /etc/modprobe.conf 中添加以下行,以设置 hangcheck 内核模块参数
vi
cat >> /etc/modprobe.conf << EOF
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
EOF
要立即加载模块,执行“modprobe -v hangcheck-timer”
格式化磁盘raw:
fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
安装asmlib包,注意顺序性:
[root@zrac1 asmfileapp-linux5.4]# ls
libpcap.so.0.6.2 oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm oracleasm-support-2.1.8-1.el5.i386.rpm
libstdc++.so.5 oracleasmlib-2.0.4-1.el5.i386.rpm
[root@zrac1 asmfileapp-linux5.4]# rpm -ivh oracleasm-support-2.1.8-1.el5.i386.rpm
warning: oracleasm-support-2.1.8-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@zrac1 asmfileapp-linux5.4]# rpm -ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-164.el########################################### [100%]
[root@zrac1 asmfileapp-linux5.4]# rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm
warning: oracleasmlib-2.0.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@zrac1 asmfileapp-linux5.4]#
/etc/init.d/oracleasm configure (两个节点都要配置)
[root@zrac2 asmfileapp-linux5.4]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@zrac1 asmfileapp-linux5.4]# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdb1
Marking disk "ASMDISK1" as an ASM disk: [ OK ]
[root@zrac1 asmfileapp-linux5.4]# /etc/init.d/oracleasm createdisk ASMDISK2 /dev/sdc1
Marking disk "ASMDISK2" as an ASM disk: [ OK ]
[root@zrac1 asmfileapp-linux5.4]# /etc/init.d/oracleasm createdisk ASMDISK3 /dev/sdd1
Marking disk "ASMDISK3" as an ASM disk: [ OK ]
[root@zrac1 asmfileapp-linux5.4]# /etc/init.d/oracleasm createdisk ASMDISK4 /dev/sde1
Marking disk "ASMDISK4" as an ASM disk: [ OK ]
[root@zrac1 asmfileapp-linux5.4]#
扫描一下asm盘
[root@node1 linux-patch]# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: [ OK ]
[root@zrac1 asmfileapp-linux5.4]# /etc/init.d/oracleasm listdisks
ASMDISK1
ASMDISK2
ASMDISK3
ASMDISK4
(rac1 rac2都要做)
将以下行添加到 /etc/sysconfig/rawdevices 中
vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sde1
配置raw 设备
所谓raw 设备,就是通过字符方式访问的设备,也就是读写设备不需要缓冲区。 在Linux 下,对磁盘值提供了块方式的访问。要想通过字符方式访问,必须配置raw设备服务,并且Oracle用户对这些raw设备必须有访问的权限。
要使映射立即生效,以 root 用户身份执行以下命令:
/sbin/service rawdevices restart
[root@felix2 u01]# /sbin/service rawdevices restart
Assigning devices:
/dev/raw/raw1 --> /dev/sdb1
/dev/raw/raw1: bound to major 8, minor 17
/dev/raw/raw2 --> /dev/sdc1
/dev/raw/raw2: bound to major 8, minor 33
/dev/raw/raw3 --> /dev/sdd1
/dev/raw/raw3: bound to major 8, minor 49
/dev/raw/raw4 --> /dev/sde1
/dev/raw/raw4: bound to major 8, minor 65
done
[root@felix2 u01]#
chown oracle:oinstall /dev/raw/raw*
[root@felix1 soft]#chmod 660 /dev/raw/raw*
[root@felix1 soft]# ll /dev/raw/raw*
crw-rw---- 1 oracle oinstall 162, 1 May 1 18:09 /dev/raw/raw1
crw-rw---- 1 oracle oinstall 162, 2 May 1 18:09 /dev/raw/raw2
crw-rw---- 1 oracle oinstall 162, 3 May 1 18:09 /dev/raw/raw3
crw-rw---- 1 oracle oinstall 162, 4 May 1 18:09 /dev/raw/raw4
[root@felix1 soft]#
如果进行重启的话,磁盘权限会改变,在此我们可以进行绑定,有以下几种方法:
(1)运用UDEV设备绑定:
修改/etc/udev/rules.d/60-raw.rules文件
# 现在我们把/dev/sdb1 知道到raw1上,就可以在/etc/udev/rules.d/60-raw.rules文件里添加如下内容:
[root@centos ~]#vi /etc/udev/rules.d/60-raw.rules
Cat >> /etc/udev/rules.d/60-raw.rules << EOF
ACTION=="add", KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add",KERNEL=="raw[1-5]", OWNER="oracle", GROUP="oinstall", MODE="660"
EOF
重启UDEV服务:
[root@rac1 ~]# start_udev
[root@zrac1 asmfileapp-linux5.4]# ls -lat /dev/raw/raw*
crw-rw---- 1 oracle oinstall 162, 4 Apr 10 00:49 /dev/raw/raw4
crw-rw---- 1 oracle oinstall 162, 3 Apr 10 00:49 /dev/raw/raw3
crw-rw---- 1 oracle oinstall 162, 2 Apr 10 00:49 /dev/raw/raw2
crw-rw---- 1 oracle oinstall 162, 1 Apr 10 00:49 /dev/raw/raw1
(2)运用RAW绑定(这个我不用)
raw的配置,也可以直接使用raw来实现。
[root@qs-dmm-rh2 mapper]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
#####
# Oracle Cluster Voting disks
#####
chown oracle:oinstall /dev/mapper/voting*
chmod 660 /dev/mapper/voting*
raw /dev/raw/raw5 /dev/mapper/votingdiskp1
raw /dev/raw/raw6 /dev/mapper/votingdiskp2
raw /dev/raw/raw7 /dev/mapper/votingdiskp3
raw /dev/raw/raw8 /dev/mapper/votingdiskp4
#sleep 2
chown oracle:oinstall /dev/raw/raw5
chown oracle:oinstall /dev/raw/raw6
chown oracle:oinstall /dev/raw/raw7
chown oracle:oinstall /dev/raw/raw8
chmod 660 /dev/raw/raw5
chmod 660 /dev/raw/raw6
chmod 660 /dev/raw/raw7
chmod 660 /dev/raw/raw8
在集群就绪服务 (CRS) 和 RAC 安装过程中,Oracle Universal Installer (OUI) 必须能够以 oracle 的身份将软件复制到所有 RAC 节点而不提示输入口令。在 Oracle 10g 中,可以使用 ssh 代替 rsh 完成此操作
要建立用户等效性,请在两个节点上以 oracle 用户身份生成用户的公钥和私钥。打开 rac1 的电源,在这两个节点上执行以下任务。
在 rac1 上执行(oracle用户)
rac1-> mkdir ~/.ssh
rac1-> chmod 700 ~/.ssh
rac1-> ssh-keygen -t rsa
rac1-> ssh-keygen -t dsa
在 rac2 上执行
rac2-> mkdir ~/.ssh
rac2-> chmod 700 ~/.ssh
rac2-> ssh-keygen -t rsa
rac2-> ssh-keygen -t dsa
在 rac1 上执行
rac1-> cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
rac1-> cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
rac1-> ssh felix2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
rac1-> scp ~/.ssh/authorized_keys felix2:~/.ssh/authorized_keys
在每个节点上测试连接。验证当您再次运行以下命令时,系统是否不提示您输入口令
ssh felix1 date
ssh felix2 date
ssh felix1-priv date
ssh felix2-priv date
满足运行 CVU 实用程序的所有前提条件后,我们现在以“oracle”UNIX 用户帐户从 linux1 运行以下命令,以检查 Oracle 集群件的所有安装前任务是否完成:
[oracle@zrac1 cluvfy]$ pwd
/u01/clusterware/cluvfy
$ ./runcluvfy.sh stage -pre crsinst -n felix1,felix2 -verbose
[oracle@zrac1 cluvfy]$ ./runcluvfy.sh stage -pre crsinst -n felix1,felix2 -verbose
Performing pre-checks for cluster services setup
Checking node reachability...
Check: Node reachability from node "zrac1"
Destination Node Reachable?
------------------------------------ ------------------------
zrac2 yes
zrac1 yes
Result: Node reachability check passed from node "zrac1".
Checking user equivalence...
Check: User equivalence for user "oracle"
Node Name Comment
------------------------------------ ------------------------
zrac2 passed
zrac1 passed
Check: Package existence for "compat-gcc-7.3-2.96.128"
Node Name Status Comment
------------------------------ ------------------------------ ----------------
zrac2 missing failed
zrac1 missing failed
Result: Package existence check failed for "compat-gcc-7.3-2.96.128".
Check: Group existence for "dba"
Node Name Status Comment
------------ ------------------------ ------------------------
zrac2 exists passed
zrac1 exists passed
Result: Group existence check passed for "dba".
Pre-check for cluster services setup was unsuccessful on all the nodes
[oracle@felix1 clusterware]$ ./runInstaller
节点1
[root@felix1 oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/oracle/oraInventory to 770.
Changing groupname of /u01/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@felix1 oraInventory]# cd /u01/oracle/10.2.0/crs_1/
[root@felix1 crs_1]# ./root.sh
WARNING: directory '/u01/oracle/10.2.0' is not owned by root
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/oracle/10.2.0' is not owned by root
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
assigning default hostname felix1 for node 1.
assigning default hostname felix2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: felix1 felix1-priv felix1
node 2: felix2 felix2-priv felix2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of 1 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
felix1
CSS is inactive on these nodes.
felix2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.
节点2:
[root@felix2 crs_1]# cd /u01/oracle/oraInventory/
[root@felix2 oraInventory]# ./orainstRoot.sh
Changing permissions of /u01/oracle/oraInventory to 770.
Changing groupname of /u01/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@felix2 oraInventory]# cd /u01/oracle/10.2.0/crs_1/
[root@felix2 crs_1]# ls
bin clone cv has inventory jre lib nls oracore perl racg root.sh srvm
cdata crs diagnostics install jdk JRE log OPatch oraInst.loc plsql rdbms slax xdk
cfgtoollogs css evm install.platform jlib ldap network opmn oui precomp relnotes sqlplus
[root@felix2 crs_1]# ./root.sh
WARNING: directory '/u01/oracle/10.2.0' is not owned by root
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured
/etc/oracle does not exist. Creating it now.
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/oracle/10.2.0' is not owned by root
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname felix1 for node 1.
assigning default hostname felix2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: felix1 felix1-priv felix1
node 2: felix2 felix2-priv felix2
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
felix1
felix2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
/u01/oracle/10.2.0/crs_1/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[root@felix2 crs_1]#
在节点root用户2执行:./vipca
[root@rac02 bin]# ./vipca
/u01/app/oracle/oracle/product/11.2.0/dbhome_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
今天又趟到一个地雷,在10201rac 安装在RHEL5系列中,会有一个固有问题,问题如上。
解决方法
修改vipca文件(需要在两个节点上操作)
[root@rac02 opt]# vi /u01/oracle/10.2.0/crs_1/bin/vipca
找到如下内容:
Remove this workaround when the bug 3937317 is fixed
arch=`uname -m`
if [ "$arch" = "i686" -o "$arch" = "ia64" ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
#End workaround
#在fi后新添加一行:
unset LD_ASSUME_KERNEL
以及srvctl文件 (需要在两个节点上操作)
[root@rac02 opt]# vi /u01/oracle/10.2.0/crs_1/bin/srvctl
找到如下内容:
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
同样在其后新增加一行:
unset LD_ASSUME_KERNEL
以 root 用户身份在第二个节点上手动调用 VIPCA
# /u01/oracle/product/10.2.0/crs_1/bin/vipca
欢迎页面:单击 Next
网络接口:选择 eth0
集群节点的虚拟 IP:
节点名称:felix1
IP 别名:felix-vip
节点名称:felix2
IP 别名:felix2-vip
执行VIPCA后查看结果:
[oracle@felix1 clusterware]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.felix1.gsd application ONLINE ONLINE felix1
ora.felix1.ons application ONLINE ONLINE felix1
ora.felix1.vip application ONLINE ONLINE felix1
ora.felix2.gsd application ONLINE ONLINE felix2
ora.felix2.ons application ONLINE ONLINE felix2
ora.felix2.vip application ONLINE ONLINE felix2
按照以下步骤(在两个节点上执行):
一、如果clusterware安装失败,重新安装,按照以下步骤(在两个节点上执行):
1.cd /u01/app/oracle
rm -rf *
2. rm -rf /etc/ora*
3. dd if=/dev/zero of=/dev/raw/raw1 bs=512M count=1
dd if=/dev/zero of=/dev/raw/raw2 bs=512M count=1
:Error 0(Native: listNetInterfaces:[3]) [Error 0(Native: listNetInterfaces:[3])]
例如:
[root@rac2 oracle]# /u01/app/oracle/product/10.2.0/crs_1/bin/vipca
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]
问题解决:
在rac2上执行:
[root@rac2 oracle]# cd /u01/app/oracle/product/10.2.0/
[root@rac2 10.2.0]# cd crs_1/
[root@rac2 crs_1]# cd bin
[root@rac2 bin]# ./oifcfg setif -global eth1/10.10.10.0:cluster_interconnect
[root@rac2 bin]# ./oifcfg setif -global eth0/192.168.0.0:public
三、当执行vipca的时候,如果报错:
CRS-1006: No more members to consider
CRS-0215: Could not start resource 'ora.dbtest2.vip'.
1- 忽略错误,先使vipca执行完,停止所有的服务:
在rac2上执行:
su - oracle
crs_stop -all
2- 在root先执行
在rac1和rac2上分别用vi打开脚本: $CRS_HOME/bin/racgvip 修改以下变量:
FAIL_WHEN_DEFAULTGW_NOT_FOUND=0
3- 在rac2上重新执行vipca
cd $CRS_HOME/bin
./vipca
4.查看服务,确保所有的服务online
在oracle用户下执行:
crs_stat -t
在两个节点上,为eth0设置默认的网关,并且保证每个节点ping默认网关都能通
一般使用第二种
四、vip都在一个节点上
这种情况是由于没有默认网关造成的,设置默认网关即可解决问题
1. 欢迎页面:单击 Next
2. 选择安装类型:
选择 Enterprise Edition
3. 指定 Home 详细内容:
名称:OraDb10g_home1
路径:/u01/app/oracle/product/10.2.0/db_1
4. 指定硬件集群安装模式:
选择 Cluster Installation
单击 Select All
5. 特定于产品的必要条件检查:
忽略有关物理内存要求的警告
6. 选择配置选项:
节点1:
[root@felix1 soft]# cd /u01/oracle/10.2.0/db_1/
[root@felix1 db_1]# ./root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/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.
[root@felix1 db_1]#
节点2:
[root@felix2 crs_1]# cd /u01/oracle/10.2.0/db_1/
[root@felix2 db_1]# ./root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/oracle/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.
[root@felix2 db_1]#
在rac1上执行netca
Oracle用户执行DBCA:
Dbca
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29690763/viewspace-1175186/ ,如需转载,请注明出处,否则将追究法律责任。