Red Hat 6.5安裝Oracle 10g故障彙總
目前Oracle 12c第一版已經推出接近一年時間,行業普遍接受11gR2作為安裝標準配置。筆者接受了一個在64bit Red Hat安裝老版本Oracle 10gR2的任務。在這個過程中,遇到一些問題,將解決策略記錄下來,留待需要的朋友待查。
1、OS版本相容
OS與Database Software之間的相容性問題是我們需要考慮的第一關。在Oracle 10g時代,Linux普遍版本是4.x,所以對於我們安裝的Red Hat 6.5,在安裝相容性檢查過程中是會報錯的。
這個問題還是比較好解決的。原則上6.5版本和之前Linux版本沒有本質的差異。而且,我們在選擇Linux安裝的時候,還是儘可能選擇高版本的進行嘗試。解決這個問題的方法就是要“騙”過Oracle軟體的安裝過程。
Oracle檢驗版本,主要是檢視/etc/redhat-release檔案中的版本資訊。我們手工將其修改之後,就可以了。
--修改前
[root@SimpleLinux ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
--修改後
[root@SimpleLinux ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 4.8 (Santiago)
檢驗透過。
2、圖形介面啟用報錯libXp.so
安裝軟體過程中,使用圖形化介面方式進行安裝。執行runInstaller指令碼,報錯。
[oracle@CRSimpleLinux database]$ ./runInstaller
Starting Oracle 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
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-05-19_12-33-59PM. Please wait ...[oracle@CRSimpleLinux database]$ Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2014-05-19_12-33-59PM/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.<clinit>(Unknown Source)
at java.awt.Component.<clinit>(Unknown Source)
筆者對libXp並不陌生,在過去32bit系統安裝10g中,是需要安裝libXp包的。所以在之前已經安裝了libXp。
[oracle@CRSimpleLinux database]$ rpm -qa | grep libXp
libXpm-3.5.10-2.el6.x86_64
libXp-1.0.0-15.1.el6.x86_64
不僅是XWindows工具,直接透過本機操作也無法啟動介面工具。解決的線索在於報錯目錄中的i386。筆者伺服器是64bit的,和32bit不同,很多安裝(包括依賴包)都是需要32bit軟體版本進行支援。猜測是執行中需要安裝32bit版的libXp。
[root@CRSimpleLinux packages]# rpm -ivh libXp-1.0.0-15.1.el6.i686.rpm
warning: libXp-1.0.0-15.1.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:libXp ########################################### [100%]
安裝之後,libXp兩個版本均存在於系統中。
[root@CRSimpleLinux packages]# rpm -qa | grep libXp
libXpm-3.5.10-2.el6.x86_64
libXp-1.0.0-15.1.el6.x86_64
libXp-1.0.0-15.1.el6.i686
之後啟動指令碼正常。
[oracle@CRSimpleLinux database]$ ./runInstaller
Starting Oracle 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
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-05-19_12-40-28PM. Please wait ...[oracle@CRSimpleLinux database]$
這個問題告誡我們,凡事不能想當然,在64bit環境中,安裝資料庫許多軟體包是需要32bit和64bit同時安裝。
3、ins_ctx.mk編譯link錯誤
在安裝過程中,進入持續執行狀態之後,在link步驟Oracle終止操作,報錯說link失敗。檢查錯誤日誌,如下內容:
INFO: chmod 751 /u01/app/oracle/product/10.2.0/db_1/bin/ctxlc
INFO: gcc -m32 -o ctxhx -L/u01/app/oracle/product/10.2.0/db_1/ctx//lib32/ -L/u01/app/oracle/product/10.2.0/db_1/lib32/ -L/u01/app/oracle/product/10.2.0/db_1/lib32/stubs/ /u01/app/oracle/product/10.2.0/db_1/ctx/lib/ctxhx.o -L/u01/app/oracle/product/10.2.0/db_1/ctx/lib/ -ldl -lm -lctxhx -Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/ctx/lib -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `cat /u01/app/oracle/product/10.2.0/db_1/lib/
INFO: sysliblist`
INFO: /usr/bin/ld: crt1.o: No such file: No such file or directory
INFO: collect2: ld returned 1 exit status
INFO: make: *** [ctxhx] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'install' of makefile '/u01/app/oracle/product/10.2.0/db_1/ctx/lib/ins_ctx.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2014-05-12_06-22-42PM.log' for details.
Exception Severity: 1
INFO: *** Cancel Dialog: ***
INFO: User Selected: Stop installation of all products.
INFO: Error in invoking target 'install' of makefile '/u01/app/oracle/product/10.2.0/db_1/ctx/lib/ins_ctx.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2014-05-12_06-22-42PM.log' for details.
INFO: Setting variable 'PREREQ_CONFIG_LOCATION' to ''. Received the value from variable association.
查詢後,發現是安裝依賴包的問題。在32bit環境下,我們使用rpm直接安裝或者yum安裝時,只安裝32bit版本就可以了。但是在64bit環境下,是需要將兩個版本的均進行安裝。這個過程中是需要嚴格遵守文件對安裝包的要求。安裝完全包之後,錯誤消失。
4、ins_emdb.mk問題
安裝包均安裝完全之後,繼續安裝時依然在link階段報錯。
INFO: make[1]: Leaving directory `/u01/app/oracle/product/10.2.0/db_1/sysman/lib'
INFO: /u01/app/oracle/product/10.2.0/db_1/sysman/lib/snmccolm.o: could not read symbols: File in wrong format
INFO: collect2: ld returned 1 exit status
make[1]: *** [/u01/app/oracle/product/10.2.0/db_1/sysman/lib/nmccollector] Error 1
make: *** [nmccollector] Error 2
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'collector' of makefile '/u01/app/oracle/product/10.2.0/db_1/sysman/lib/ins_emdb.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2014-05-12_06-34-52PM.log' for details.
Exception Severity: 1
這個問題是比較複雜的,筆者查詢了很多資料也沒有一個確切的回應。最後在網路上檢索到一位前輩的解決之道。
首先點選ignore跳過步驟,後面就可以直接完成runInstaller指令碼執行。在$ORACLE_HOME/bin目錄下,修改oracle檔案為oracle.bin。
建立檔案oracle在相同目錄,內容如下:
#!/bin/bash
export DISABLE_HUGETLBFS=1
exec $ORACLE_HOME/bin/oracle.bin $@
EOF
儲存後使用chmod a+x oracle命令對檔案進行許可權修改。經過這種策略修改之後,Oracle後續的dbca過程建立資料庫執行正常。
但是,在後臺程式中也表現出點問題,我們透過ps –ef不能看到常見pmon等後臺程式,只有oracle.bin的系列物件。
[root@CRSimpleLinux packages]# ps -ef | grep pmon
root 542 406 0 12:57 pts/1 00:00:00 grep pmon
[root@CRSimpleLinux packages]# ps -ef | grep oracle
root 326 32748 0 12:32 pts/0 00:00:00 su - oracle
oracle 327 326 0 12:32 pts/0 00:00:00 -bash
oracle 389 1 0 12:34 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin (LOCAL=NO)
oracle 391 1 0 12:34 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin (LOCAL=NO)
oracle 399 1 0 12:35 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin (LOCAL=NO)
oracle 401 1 0 12:35 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin (LOCAL=NO)
oracle 3172 1 0 May13 ? 00:00:02 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin
oracle 3181 1 0 May13 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin
oracle 3183 1 0 May13 ? 00:00:01 /u01/app/oracle/product/10.2.0/db_1/bin/oracle.bin
(篇幅原因,有省略……)
其餘尚未發現相容問題。
5、Memory Notification in alert log
安裝完成後,監控alert log資訊確定資料庫執行正常。發現資料庫日誌中階段性提示記憶體變動。
Mon May 12 19:39:09 2014
Memory Notification: Library Cache Object loaded into SGA
Heap size 3596K exceeds notification threshold (2048K)
KGL object name :XDB.XDbD/PLZ01TcHgNAgAIIegtw==
Mon May 12 19:39:09 2014
Memory Notification: Library Cache Object loaded into SGA
Heap size 3567K exceeds notification threshold (2048K)
Details in trace file /u01/app/oracle/admin/chinaredb/udump/chinaredb_ora_20268.trc
KGL object name :XDB.XDA8XlWX/h+P3gQFeMmGQWfg==
進入10g之後,一些記憶體、檔案告警通知機制被引入到Oracle執行過程中。對一些效能關注點,如SGA物件、Swap使用,Oracle是有自己的控制機制的。一旦超過了設定閾值,就會在alert log中記錄下來,提醒使用者。
這個memory notification很簡單,就是SGA中引入了比較大的library cache物件之後,就會自動寫入進去,從效能上也沒有什麼大問題。如果需要解決就是修改內部的控制閾值,不要讓提示過於頻繁發生。
SQL> alter system set "_kgl_large_heap_warning_threshold"=8388608 scope=spfile ;
SQL> shutdown immediate
SQL> startup
內部引數_kgl_large_heap_warning_threshold就起到這個作用。修改引數後重新啟動資料庫,報錯資訊不再出現。
6、結論
安裝Oracle資料庫,特別是在Unix/Linux家族體系下,是比較複雜的過程。我們實際生產運維環境是複雜多樣的,版本、軟硬體相容、網路等諸多因素最後決定我們是否可以完成安裝工作。在這個過程中,幾點是需要關注的:
首先,標準安裝、文件在先。儘可能不要進行特殊安裝,儘量選擇官方文件推薦的軟硬體配置,避免出現相容性問題。安裝規劃中,官方文件是我們的根本,絕對不要到網路上搜尋幾篇文章來作為指引。
第二,步步為營,小步迭代。在規劃步驟中,要做好詳細的計劃步驟,最好將指令碼語句都事先準備好,不要現安裝現準備。如果安裝中出現了錯誤,要確保已有成果保護備份工作。
最後,反覆測試。沒有測試的安裝時很魯莽的。目前我們有虛擬化環境,可以藉助這個基礎進行反覆安裝策略。測試不僅僅起到方案驗證的作用,更重要的是給我們熟悉流程的機會。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29067253/viewspace-2137351/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 虛擬機器下red hat 6.5 linux安裝oracle11g虛擬機LinuxOracle
- red hat linux 9.0下安裝oracle 8.1.7(轉)LinuxOracle
- 在Red Hat和Centos上安裝MongoDBCentOSMongoDB
- red hat linux 9.0安裝求助!(轉)Linux
- Oracle故障彙總Oracle
- Oracle9.2.0.4 在 Red Hat Enterprise 4上的安裝Oracle
- Linux red hat 核心版下安裝NginxLinuxNginx
- Red Hat Linux安裝CentOS的yum源LinuxCentOS
- 安裝red hat 9.0遇到的問題(轉)
- 安裝Red Hat9.0兩三事(轉)
- 在 Red Hat Linux 9 上安裝 Oracle9i Database(轉)LinuxOracleDatabase
- 在 Red Hat Advanced Server 4 上安裝 Oracle 10.2.0.1 RAC (zt)ServerOracle
- Red Hat Enterprise Linux Server 7.4 安裝LinuxServer
- 在red hat enterprise linux 5.4上安裝oracle11gLinuxOracle
- oracle9i在Red Hat Linux7.3上的安裝(轉)OracleLinux
- 安裝Red Hat Linux 9最小磁碟空間(轉)Linux
- Red Hat Linux 5.3 (虛擬機器) 上安裝 Oracle11g RACLinux虛擬機Oracle
- CentOS 6.5安裝Oracle 11.2.0.4------CentOS 6.5安裝CentOSOracle
- zt_Red Hat 5.5中java JDK的解除安裝和安裝rpmJavaJDK
- Red Hat Linux 7.0安裝使用手記(六則) (轉)Linux
- Oracle 9i/10g安裝包和PATCH下載地址彙總Oracle
- Red hat公司對Oracle的回應(轉)Oracle
- RED HAT 7.3裝Oracle8.1.7配置什麼核心引數(轉)Oracle
- [zt]oracle 9i/10g安裝包和PATCH下載地址彙總Oracle
- Migrating Red Hat Linux 2.1 or 3.0 to Red Hat Linux 4.0Linux
- Red Hat linux9 初裝配置(轉)Linux
- AIX安裝oracle遇到的問題彙總AIOracle
- Installing Oracle 10G RAC on Red Hat Advanced Server Version 3 Update 2Oracle 10gServer
- ORACLE 10G中閃回彙總Oracle 10g
- 新手安裝red hat 9,無法進行下去,請高手指教(轉)
- oracle 9i/10g/11g安裝包和PATCH下載地址彙總Oracle
- Oracle 9i Installation on Red Hat Linux (轉)OracleLinux
- Red Hat Magazine釋出
- CENTOS 6.5 安裝 Python 2.7 總結CentOSPython
- 【Linux】Virtualbox 安裝 Red hat Enterprise Linux 6.4-64位Linux
- ORACLE Install (10g r2) FOR Red Hat Enterprise Linux Server release 5.5 (64 bit)OracleLinuxServer
- Oracle ASMLib & Red Hat Linux & Linux核心版本資訊OracleASMLinux
- Red Hat Linux 5.4 (虛擬機器) 上安裝 Oracle11g R2 RAC (ASM) 【final】Linux虛擬機OracleASM