安装Oracle 11.2.0.2.0 for RedHat5.4_32bit碰到的一些错误--分析并解决

来源:互联网 发布:期货数据库 编辑:程序博客网 时间:2024/06/11 10:55
最近在安装Oracle 11.2.0.2.0 for RedHat5.4_32bit,出现了一些问题,总结如下。



一、数据库软件安装好后,用dbca命令建库。
1、报错如下:

[oracle@mydb]$dbca
Oracle Net Services Configuration:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xa78b13a8, pid=5118, tid=3086896789
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_17-b02 mixed mode)
# Problematic frame:
# C [libnnz11.so+0x3c3a8]
#
# An error report file with more information is saved as hs_err_pid5118.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp


2、解决方法:

(1)下载p8670579_112010_LINUX.zip补丁包,上传到Liux服务器。

下补丁:http://www.itpub.net/thread-1809740-1-1.html


(2)确认是否配置了ORACLE_HOME
[oracle@mydb]$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
 
(3)检查perl的版本,需要5.00503以上的版本
[oracle@mydb]$perl -v
This is perl, v5.8.8 built for i386-linux-thread-multi
 
(4)Verify the OUI Inventory.
$opatch lsinventory
 
(5)解压并打补丁
[oracle@mydb]$unzip p8670579_112010_LINUX.zip
[oracle@mydb]$cd 8670579
[oracle@mydb]$$ORACLE_HOME/OPatch/opatch apply -invPtrLoc $ORACLE_HOME/oraInst.loc


3、dbca正常建库


二、很多Oracle的命令不能执行。


1、如执行rman命令报错如下:
[oracle@mydb]$ rman target /
rman: error while loading shared libraries: /u01/app/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot restore 
segment prot after reloc: Permission denied


2、如执行lsnrctl命令报错如下:
[oracle@mydb]$ lsnrctl status
lsnrctl: error while loading shared libraries: /u01/app/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot 
restore segment prot after reloc: Permission denied


3、什么原因导致这些错误呢?原凶就是在安装LINUX时开启了SELinux,记得关闭SELinux,如下图。


4、解决方法:
 (1)查看selinux的状态为Enforcing模式(setenforce 1设置SELinux 成为Enforcing模式,即开启SElinux)
[root@mydb]# getenforce
Enforcing


(2)setenforce 0 设置SELinux 成为permissive模式(即临时关闭SElinux)
[root@mydb]# setenforce 0


(3)查看selinux的状态为Permissive模式(setenforce 0设置SELinux 成为Permissive模式)
[root@mydb]# getenforce
Permissive


5、关闭SElinux,修改Selinux的配置文件
[root@mydb bin]# vi /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
#       targeted - Only targeted network daemons are protected.
#       strict - Full SELinux protection.
SELINUXTYPE=targeted






三、oracle11Gr2在RHEL6 X64上执行gui安装报错

转载 http://blog.sina.com.cn/s/blog_70dd7d530101d3q6.html
前些天某学生在安装oracle时碰到一个问题,报错信息如下
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x00007f5bb0bced70, pid=2732, tid=140031049791248
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_17-b03 mixed mode)
# Problematic frame:
# C  [ld-linux-x86-64.so.2+0x14d70]
#
# An error report file with more information is saved as hs_err_pid2732.log
#
# If you would like to submit a bug report, please visit:
看报错信息 很古怪
检查报错的动态库文件ld-linux-x86-64.so.2 属于glibc 应该不会是这个动态库文件出问题。
所以怀疑是执行文件没有找到要执行的函数。网上也搜索到了类似的问题 
在这个博客当中一个叫做 keyi2323 的热心网友回复找到了答案
http://blog.csdn.net/lsj19830812/article/details/7784611

答案是
export LD_BIND_NOW=1
这个环境变量的作用是什么的 
于是乎又新一轮的百度
得到答案如下
设置环境变量LD_BIND_NOW=1让连接器在程序执行前把所有的函数地址都连接好
看起来笔者的思路没有偏离太多

最后的解决方案
在oracle用户的家目录下的.bash_profile 当中添加一个全局变量:
export LD_BIND_NOW=1

即可解决在使用GUI安装oracle文件时候图形化无法出来的问题。