分类: Oracle
2009-05-13 17:11:27
我在安装的时候遇到了点麻烦,不过经过研究,把问题都解决了,故此总结一下。
1.补丁包:
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11
2.将光盘的介质拷贝到指定目录下:
cp -R * /tmp/oracle
3.安装介质:
./runInstaller -ignoresysprereqs
4.出现一个报错:
[[oracle@dg1 oracle]$ ./runInstaller -ignoresysprereqs
Starting Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Failed <<<<
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-08-23_06-08-15AM. Please wait ...[oracle@dg1 oracle]$ Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.
Exception .lang.UnsatisfiedLinkError: /tmp/OraInstall2008-08-23_06-08-15AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory occurred..
java.lang.UnsatisfiedLinkError: /tmp/OraInstall2008-08-23_06-08-15AM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.
at java.awt.Component.
at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
at oracle.sysman.oii.oiic.OiicInstaller.getInterfaceManager(OiicInstaller.java:436)
at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:926)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:866)
Exception in thread "main" java.lang.NoClassDefFoundError
at oracle.sysman.oii.oiif.oiifm.OiifmGraphicInterfaceManager.
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.createInterfaceManager(OiicSessionInterfaceManager.java:193)
at oracle.sysman.oii.oiic.OiicSessionInterfaceManager.getInterfaceManager(OiicSessionInterfaceManager.java:202)
at oracle.sysman.oii.oiif.oiifm.OiifmAlert.
at oracle.sysman.oii.oiic.OiicInstaller.runInstaller(OiicInstaller.java:984)
at oracle.sysman.oii.oiic.OiicInstaller.main(OiicInstaller.java:866)
5.解决办法:
错误一:
/tmp/OraInstall
原因是:缺少支持打印的图形化动态链接库libXp.so.6
这个错误是由于缺少系统安装包,在RHEL5以前的版本,可以安装xorg-x11-deprecated-libs包即可,这个安装包可以在系统光盘第三张盘中(对于 as4.2以前,redhat as4.4是在第四张安装光盘)
xorg-x11-deprecated-libs-
错误二:
Exception :java.lang.UnsatisfiedLinkError:/usr/java/j2sdk
这个错误是也是由于缺少系统安装包造成的,只需安装XFree86-libs包即可,这个安装包可以在系统光盘中找到。
在上面两个错误如果出现在redhat as5版本中,解决如下:
在RHEL5中上面的包被libXp所取代了,因此rpm -ivh libXp-
错误三:
error while loading shared libraries: libstdc++-libc6.1-1.so.2
只用执行如下操作ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-1.so.2
总结:
最后安装“rpm -ivh libXp-
问题二、安装数据的时候出现:
“uError in invoking target 'all_no_orcl ihsodbc' of makefile'/u01/app/oracle/oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk'.See '/u01/app/oracle/oraInventory/logs/installActions2006-10-16_06-41-37PM.log'for details”的错误。
经过分析缺少一个包:compat-libstdc++-33.i386.rpm的包
[root@dg1 Server]# rpm -ivh compat-libstdc++-*.rpm
warning: compat-libstdc++-296-2.96-138.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:compat-libstdc++-33 ########################################### [ 50%]
2:compat-libstdc++-296 ########################################### [100%]
安装后,问题解决。
六:附录(在网上看到一篇文章也不错,收藏,以后可以测试测试)
(1) 安装redhat as5
把所有的编译包装上,但不配置dns,减少dns影响
以下(2),(3)步骤可以2选1
(2) 配置iscsitarget(iscsi服务器端)
不要使用xen内核启动,xen内核编译会出错
a. 编译安装iscsitarget
make
make install
b. 添加服务自启动
chkconfig --add iscsi-target
chkconfig iscsi-target on
c. 配置/etc/ietd.conf
(3) 因为了xen内核,所以没使用iscsi-target
在/var/lib/xen/images 添加share盘和share_1盘。修改/etc/xen/rac1在w后加上!号,表示可以共享。
disk = [ "tap:aio:/var/lib/xen/images/rac1.img,xvda,w", "tap:aio:/var/lib/xen/images/share.img,xvdb,w!", "tap:aio:/var/lib/xen/images/share_1.img,xvdc,w!" ]
如此修改/etc/xen/rac2,加盘share.img和share_1.img,修改配置文件
disk = [ "tap:aio:/var/lib/xen/images/rac1.img,xvda,w", "tap:aio:/var/lib/xen/images/share.img,xvdb,w!", "tap:aio:/var/lib/xen/images/share_1.img,xvdc,w!" ]
(4) 两台机器的ip设置如下(虚拟两块网卡):
192.168.1.13 rac1.example.com rac1
192.168.2.13 rac1-priv
192.168.1.23 rac2.example.com rac2
192.168.2.23 rac2-priv
下面两个是虚拟ip(不需要配置,安装oracle时候会配置上),都要写进/etc/hosts里
192.168.1.14 rac1-vip
192.168.1.24 rac2-vip
(5) 新建oracle用户
groupadd -g 555 dba
groupadd -g 556 oinstall
useradd -u 900 -g oinstall -G dba -d /home/oracle oracle
passwd oracle
(6) 配置ssh dsa方式无密码登录(rsa可以不用)
用ssh先登录一下rac1和rac2,.ssh目录就会自己创建
root的配置方式如下:
在rac1上执行:
cd /root/.ssh/
touch authorized_keys
ssh-keygen -t dsa
cat id_dsa >> authorized_keys
cat id_dsa.pub >> authorized_keys
scp authorized_keys rac2:/root/.ssh/
在rac2上执行:
cd /root/.ssh/
ssh-keygen -t dsa
cat id_dsa >> authorized_keys
cat id_dsa.pub >> authorized_keys
scp authorized_keys rac1:/root/.ssh/
oracle用户配置方式类似。
能达到rac1无密码连接rac1和rac2,rac2无密码连接rac1和rac2就可以。
(7) 补装几个包,配置repo库安装也可:
compat-db-4.2.52-5
openmotif-2.3.0-0
openmotif22-2.2.3-18
libaio-devel-0.3.106-3.2
sysstat-7.0.0-3.el5
unixODBC-2.2.11-7.1
unixODBC-devel-2.2.11-7.1
总共需要安装的包如下(包的小版本可能有区别):
binutils-2.17.50.0.6-2.el5
compat-libstdc++-33-3.2.3-61
elfutils-libelf-0.125-3.el5
elfutils-libelf-devel-0.125
gcc-4.1.1-52
gcc-c++-4.1.1-52
glibc-2.5-12
glibc-common-2.5-12
glibc-devel-2.5-12
glibc-headers-2.5-12
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.1-52
libstdc++-4.1.1
libstdc++-devel-4.1.1-52.e15
make-3.81-1.1
sysstat-7.0.0
unixODBC-2.2.11
unixODBC-devel-2.2.11
(8) 配置rsh,rlogin,rexec
安装rsh-server-0.17-37
让服务自动启动
chkconfig rlogin on
chkconfig rsh on
chkconfig rexec on
配置root无密码连接,需要修改三个地方:
a. root新建/root/.rhosts文件
rac1 root
rac2 root
rac1-priv root
rac2-priv root
b. 修改/etc/hosts.equiv文件
rac1 root
rac2 root
rac1 oracle
rac2 oracle
rac1-priv root
rac2-priv root
rac1-priv oracle
rac2-priv oracle
c. 修改配置/etc/securetty
在最后加入三行
rlogin
rexec
rsh
(9) 修改内核参数和系统配置
a.修改内核参数(/etc/sysctl.conf)
# modify for oracle
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
b.设置使用文件数权限
修改/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
c.配置pam,修改安全限制
修改/etc/pam.d/login,添加以下两行
# modify for oracle
session required /lib/security/pam_limits.so
d.在/etc/rc.local中配置Hangcheck计时器
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180
e.修改oracle用户下的profile文件
添加入.bash_profile
ulimit -u 16384 -n 65536
umask 022
(10) 安装jdk-1_5_0_14-linux-i586
在oracle用户下添加环境变量
# Java Path
CV_JDKHOME=/usr/java/jdk1.5.0_14; export CV_JDKHOME
(11) 新建oracle home目录:
/home/oracle/product/10.2.0
(12) 划分裸设备
手工可以这样做,但重启后会不存在。
raw /dev/raw/raw1 /dev/xvdb1 (OCR Location)
raw /dev/raw/raw2 /dev/xvdb2 (Voting Disk Location)
cd /dev/raw
chown oracle:oinstall *
我们配置到/etc/udev/rules.d/60-raw.rules
添加如下几句,其他的也可以类推
ACTION=="add", KERNEL=="xvdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="xvdb2", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="raw*", WNER=="oracle", GROUP=="oinstall", MODE=="0664"
(13) 开始安装oracle cluster软件
xhost +
./runInstaller -ignoresysprereqs
# ORACLE
ORACLE_BASE=/home/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/crs; export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
在rac2(remote机器运行root.sh)是最容易出的,问题有:
1) /home/oracle/product/10.2.0/crs/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
:
a.修改$CRS_HOME/bin/vipca文件
注释掉以下几行,注释后效果如下:
arch=`uname -m`
#if [ "$arch" = "i686" -o "$arch" = "ia64" ]
#then
# LD_ASSUME_KERNEL=2.4.19
# export LD_ASSUME_KERNEL
#fi
#End workaround
b.注释$CRS_HOME/bin/srvctl文件和$ORACLE_HOME/bin/srvctl文件
注释掉以下几行,注释后效果如下:
#Remove this workaround when the bug 3937317 is fixed
#LD_ASSUME_KERNEL=2.4.19
#export LD_ASSUME_KERNEL
2) The given interface(s), "eth0" is not public. Public interfaces should be used to configure virtual IPs.
解决方法:
图形界面上运行$CRS_HOME/bin/vipca,手工重新配置rac1-vip和rac2-vip。
su - oracle
su root
vipca
3) Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]
解决方法:
重新运行sh root.sh
step1: rm -rf /var/tmp/.oracle
step2: cd /etc/oracle/scls_scr/rac2/oracle/
rm -rf cssfatal
step3: re-run sh root.sh
step4: 如果还不成功的话,基本就是共享磁盘有问题。
4) 最后的3个检查不成功
不成功也没关系,其实它是运行 $CRS_HOME/cfgtoollogs/configToolAllCommands
手工一步步执行,排除错误达到下面的效果就可以了。
错误的命令也会记录在$CRS_HOME/cfgtoollogs/configToolFailedCommands
[oracle@rac1 cfgtoollogs]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
5) 自动:$ORA_CRS_HOME/install/rootdelete.sh
$ORA_CRS_HOME/install/rootdeinstall.sh
手工:cluster安装过程中可能需要重新安装,如何彻底铲除cluster是一个关键
a. 用图形界面删除cluster软件,这样清除得比较彻底
也可以删除$CRS_HOME下的所有文件,有时候需要两步都要做。
b. cluster自启动修改
经常发现cluster是自己启动的,所以检查后发现在/etc/inittab最后有几行删除掉或注释掉。
h1:35:respawn:/etc/init.d/init.evmd run >/dev/null 2>&1 ITPUB个人空间erGr#b
h2:35:respawn:/etc/init.d/init.cssd fatal >/dev/null 2>&1 h3:35:respawn:/etc/init.d/init.crsd run >/dev/null 2>&1
c. 还有几个自启动调用的服务
/etc/init.d
init.evmd, init.cssd, init.crsd, init.crs删除掉就可以了。
/etc/rc2.d/K96init.crs
/etc/rc3.d/S96init.crs
/etc/rc5.d/S96init.crs
d. 还需要删除/etc/oracle下的所有文件
e. 还需要删除以下的文件
rm -rf /var/tmp/.oracle
f. 装了数据库