Oracle
在 Ubuntu 12.04 上安裝 Oracle 11g XE
在過去的 6 個小時裡,我一直在嘗試在 Ubuntu 上安裝 Oracle 11g。顯然,我不是唯一一個為此苦苦掙扎的人,因為網上有很多(通常是誤導性的)“文件”關於如何解決在 Ubuntu 上安裝 Oracle 11g 時總是遇到的各種錯誤。
我遵循了一個這樣的“指南” - (this one),並遵循了所有說明。然後我花了最後 5 個小時嘗試配置 Oracle,但無濟於事。
當我執行時
/etc/init.d/oracle-xe configure
,我得到了響應(幾分鐘後):Starting Oracle Net Listener...Done Configuring database... Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
以下是我的 /u01/app/oracle/product/11.2.0/xe/config/log 文件夾中文件的內容:
CloneDbCreation.log
Control file created. PL/SQL procedure successfully completed. ORA-01109: database not open Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2233344 bytes Variable Size 616565760 bytes Database Buffers 444596224 bytes Redo Buffers 5541888 bytes Control file created. System altered. Database altered. Database altered. System altered. System altered. Database altered. Tablespace altered. TABLESPACE_NAME ------------------------------ USERS SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 1 oracle@jupiter (PMON) 1 2 oracle@jupiter (VKTM) 1 3 oracle@jupiter (DIAG) 1 SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 4 oracle@jupiter (DIA0) 1 5 oracle@jupiter (DBW0) 1 6 oracle@jupiter (CKPT) 1 SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 7 oracle@jupiter (RECO) 1 8 oracle@jupiter (MMNL) 3 9 oracle@jupiter (VKRM) 7 SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 10 oracle@jupiter (CJQ0) 5 87 sqlplus@jupiter (TNS V1-V3) 3 SYS 88 oracle@jupiter (PSP0) 1 SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 89 oracle@jupiter (GEN0) 1 90 oracle@jupiter (DBRM) 1 91 oracle@jupiter (MMAN) 1 SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 92 oracle@jupiter (LGWR) 1 93 oracle@jupiter (SMON) 1 94 oracle@jupiter (MMON) 3 SID PROGRAM SERIAL# ---------- ------------------------------------------------ ---------- USERNAME ------------------------------ 98 oracle@jupiter (QMNC) 5 19 rows selected. User altered. User altered. System altered.
CloneRmanRestore.log
ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2233344 bytes Variable Size 616565760 bytes Database Buffers 444596224 bytes Redo Buffers 5541888 bytes TO_CHAR(SYSTIMEST ----------------- 20121127 08:47:46 Allocating device.... Specifying datafiles... Specifing datafiles... Restoring ... Restore done. PL/SQL procedure successfully completed. TO_CHAR(SYSTIMEST ----------------- 20121127 08:48:17
PostDBCreation.log
PL/SQL procedure successfully completed. File created. Database closed. Database dismounted. ORACLE instance shut down. ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2233344 bytes Variable Size 616565760 bytes Database Buffers 444596224 bytes Redo Buffers 5541888 bytes Database mounted. Database opened. 'UTL_RECOMP_BEGIN:'||TO_CH -------------------------- utl_recomp_begin: 08:49:11 PL/SQL procedure successfully completed. 'UTL_RECOMP_END:'||TO_CH ------------------------ utl_recomp_end: 08:49:13
postScripts.log
CREATE OR REPLACE LIBRARY dbms_sumadv_lib AS '/u01/app/oracle/product/11.2.0/xe/lib/libqsmashr.so'; * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 BEGIN dbms_datapump_utl.replace_default_dir; END; * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 commit * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 create or replace directory XMLDIR as '/u01/app/oracle/product/11.2.0/xe/rdbms/xml' * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 DROP DIRECTORY ORACLE_OCM_CONFIG_DIR * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 DROP DIRECTORY ADMIN_DIR * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 DROP DIRECTORY WORK_DIR * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 BEGIN dbms_swrf_internal.cleanup_database(cleanup_local => FALSE); END; * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 commit * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0
我的環境變數如下:
root@jupiter:~# env | grep ORACLE ORACLE_SID=XE ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/
其他系統配置:
root@jupiter:~# df -k /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on shmfs 2097152 624008 1473144 30% /dev/shm root@jupiter:~# sysctl -p |grep kernel kernel.shmmax = 1073741824
我不知道還能做什麼。我已經走到了盡頭。希望以上所有內容對 Oracle 專家都有意義,他們可以指出我所缺少的。
這部分很不尋常:
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/
每次都需要逐個字元地相同。我在這裡看到它以斜線結尾,這是非標準的,我懷疑你錯誤地添加了它。添加斜線將導致所謂的遺贈 sqlplus 中的“ORACLE 不可用”,我剛剛在我的系統上進行了實驗。使用一種一致的設置重試,例如:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe