ORACLE_BASE=/data/u01/app/oracle
ORACLE_HOME=/data/u01/app/oracle/product/11.2
ORACLE_SID=ecworld
export ORACLE_BASE ORACLE_HOME ORACLE_SID
#export DISPLAY=:0.0 #只要注释掉此行,然后执行xhost + 就不会出现上述错误了。
export EMLOCALHOST=rhlinux
export PATH=$ORACLE_HOME/bin:$PATH
--------------------------
2、 执行netca进行网络配置的时候报错。
信息如下:
------------------
[oracle@localhost database]$ netca
Oracle Net Services Configuration:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x00002aaab7a9a9f1, pid=9102, tid=47804837936800
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_17-b03 mixed mode)
# Problematic frame:
# C [libclntsh.so.11.1+0x62a9f1] snlinGetAddrInfo+0x1b1
#
# An error report file with more information is saved as hs_err_pid9102.log
#
# If you would like to submit a bug report, please visit:
#
#
/data/u01/app/oracle/product/11.2/bin/netca: line 178: 9102 Aborted (core dumped) $JRE $JRE_OPTIONS -classpath $CLASSPATH oracle.net.ca.NetCA $*
------------------
解决如下:
修改 /etc/hosts
127.0.0.1 localhost.localdomain localhost oracle11gr2 #在这行最后添加这个。
然后命令行执行修改主机名的操作
#hostname oracle11gr2
然后再次执行 netca 就可以正常安装配置了。