centos7 oracle 12c 安装问题记录

时间:2022-11-29 21:42:03
centos7 oracle 12c 安装问题记录

CentOS 机器:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit

解决:

安装vncserver
[root@localhost ~]# vncserver
VNC(R) Server 5.2.3 (r8648) 64-bit (Jan 28 2015 15:47:49)
Copyright (C) 2002-2015 RealVNC Ltd.
VNC is a registered trademark of RealVNC Ltd in the U.S. and in other
countries.
Protected by UK patent 2481870; US patent 8760366.
See http://www.realvnc.com for information on VNC.
For third party acknowledgements see:
http://www.realvnc.com/products/vnc/documentation/5.2/acknowledgements.txt

xauth:  file /root/.Xauthority does not exist
If a desktop environment fails to load for this virtual desktop, please see:
http://www.realvnc.com/kb-345
Running applications in /etc/vnc/xstartup

VNC Server catchphrase: "Vortex connect Lazarus. Immune editor mixer."
             signature: fb-91-a0-91-d5-93-ad-49

Log file is /root/.vnc/localhost:1.log
New desktop is localhost:1 (192.168.135.128:1)


[root@localhost ~]# export DISPLAY=localhost:1
[root@localhost ~]# xhost +
access control disabled, clients can connect from any host

暂时关闭防火墙
[root@localhost ~]# service firewalld stop
Redirecting to /bin/systemctl stop  firewalld.service



本地机器(Fedora22):
vncviewer 连接 192.168.135.128:1 (CentOS7地址)

图形界面中文乱码问题:

vncviewer登陆的终端
$ export LANG=en_us
$ ./runInstaller


INFO: /home/oracle/app/oracle/product/12.1.0/dbhome_1/bin/orald -o ctxhx -m64 -z noexecstack -Wl,--disable-new-dtags -L/home/oracle/app/oracle/product/12.1.0/dbhome_1/ctx/lib/ -L/home/oracle/app/oracle/product/12.1.0/dbhome_1/lib/ -L/home/oracle/app/oracle/product/12.1.0/dbhome_1/lib/stubs/  /home/oracle/app/oracle/product/12.1.0/dbhome_1/ctx/lib/ctxhx.o -Wl,--unresolved-symbols=ignore-in-shared-libs -L/home/oracle/app/oracle/product/12.1.0/dbhome_1/ctx/lib/ -lm -lsc_ca -lsc_fa -lsc_ex -lsc_da -lsc_ut -lsc_ch -ls
INFO: c_fi -lsc_fmt -lsc_ind -lwv_core -lsc_lo -lsc_fut -lsc_anno -lz -lctxhx -Wl,-L/home/oracle/app/oracle/product/12.1.0/dbhome_1/ctx/lib -lsnls12 -lnls12  -lcore12 -lsnls12 -lnls12 -lcore12 -lsnls12 -lnls12 -lxml12 -lcore12 -lunls12 -lsnls12 -lnls12 -lcore12 -lnls12  `cat /home/oracle/app/oracle/product/12.1.0/dbhome_1/lib/sysliblist` `cat /home/oracle/app/oracle/product/12.1.0/dbhome_1/lib/ldflags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnro12 `cat /home/oracle/app/oracle/product/12.1.0/dbhome_1/lib/ld
INFO: flags`    -lncrypt12 -lnsgr12 -lnzjs12 -ln12 -lnl12 -lnnz12 -lzt12 -lztkg12 -Wl,-rpath,'/home/oracle/app/oracle/product/12.1.0/dbhome_1/lib:/home/oracle/app/oracle/product/12.1.0/dbhome_1/ctx/lib'

INFO: /usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status

INFO: make: *** [ctxhx] Error 1

[oracle@localhost lib]$ sudo yum install zlib-devel -y



#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f9b159fa878, pid=8181, tid=140304808740608
#
# JRE version: 6.0_37-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.12-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libclntsh.so.12.1+0x6e9878]  short+0xad8
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
...

Stack: [0x00007f9b42390000,0x00007f9b42491000],  sp=0x00007f9b4248f650,  free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libclntsh.so.12.1+0x6e9878]  short+0xad8
C  [libnjni12.so+0xd02d]  Java_oracle_net_common_NetGetEnv_getDNSDomain+0x8d
j  oracle.net.common.NetGetEnv.getDNSDomain()Ljava/lang/String;+0
j  oracle.net.ca.ConfigureProfile.setDefaultProfileParams()V+0
j  oracle.net.ca.InitialSetup.setupConfigObjects()V+204
j  oracle.net.ca.InitialSetup.<init>([Ljava/lang/String;)V+888
j  oracle.net.ca.NetCA.main([Ljava/lang/String;)V+96
v  ~StubRoutines::call_stub
V  [libjvm.so+0x4e0d00]  JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x1e0
V  [libjvm.so+0x710fa9]  os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*)+0x19
V  [libjvm.so+0x4e0b15]  JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*)+0x25
V  [libjvm.so+0x51c6d7]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*)+0x147
V  [libjvm.so+0x509e6f]  unsigned+0x20f

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  oracle.net.common.NetGetEnv.getDNSDomain()Ljava/lang/String;+0
j  oracle.net.ca.ConfigureProfile.setDefaultProfileParams()V+0
j  oracle.net.ca.InitialSetup.setupConfigObjects()V+204
j  oracle.net.ca.InitialSetup.<init>([Ljava/lang/String;)V+888
j  oracle.net.ca.NetCA.main([Ljava/lang/String;)V+96
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x00007f9b3c08a800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=8189, stack(0x00007f9b410a3000,0x00007f9b411a4000)]
  0x00007f9b3c088800 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=8188, stack(0x00007f9b411a4000,0x00007f9b412a5000)]
  0x00007f9b3c086000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=8187, stack(0x00007f9b412a5000,0x00007f9b413a6000)]
  0x00007f9b3c084000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8186, stack(0x00007f9b413a6000,0x00007f9b414a7000)]
  0x00007f9b3c067800 JavaThread "Finalizer" daemon [_thread_blocked, id=8185, stack(0x00007f9b414a7000,0x00007f9b415a8000)]
  0x00007f9b3c065800 JavaThread "Reference Handler" daemon [_thread_blocked, id=8184, stack(0x00007f9b415a8000,0x00007f9b416a9000)]
=>0x00007f9b3c009800 JavaThread "main" [_thread_in_native, id=8182, stack(0x00007f9b42390000,0x00007f9b42491000)]


解决方案:修改hosname

$ sudo hostname oracle
$ sudo echo oracle > /etc/hostname
$ sudo echo "127.0.0.1 oracle" >> /etc/hosts




安装过程参考:
http://www.tuicool.com/articles/63mYBjN
java崩溃参考:
http://blog.csdn.net/zxnlmj/article/details/38901223