linux安裝Oracle 11g常見問題

來源:互聯網
上載者:User
安裝ORACLE軟體

[root@redhat ~]# su -l oracle

[oracle@redhat ~]$ cd database/

[oracle@redhat database]$ ./runInstaller

這裡可能會出現這個錯誤:

Invalid source path '../stage/Components/oracle.swd.oui/11.2.0.1.0/1/DataFiles' specified for unzip. Unzip command failed. Please check oraparam.ini and specify a valid source path.
: No such file or directory。

原因可以參考這篇文章的末尾段http://space.itpub.net/16396821/viewspace-678802

大概就是linux.x64_11gR2_database_1of2和linux.x64_11gR2_database_2of2這兩個下載的包先不要解壓傳到系統後再一起解壓就能解決這個問題。

關於傳到系統。我一開始把這兩個壓縮包放u盤裡,然後掛載u盤,發現檔案名稱都縮短了,後來用ftp傳到oracle使用者下,檔案名稱就顯示正常了,不管怎樣,既然用了u盤掛載就簡單說一下u盤掛載方法吧。http://linzhanghui.iteye.com/blog/1166311

關於解壓。兩個壓縮包都是zip格式,所以分別unzip file.zip就可以了。分別解壓後也是就有一個database目錄了。

這個時候再./runInstaller。。。。。如果你安裝linux時裝了圖形介面那恭喜,如果沒有,有點麻煩,如果發現連yum也沒有,就更麻煩。

裝圖形介面還是用yum吧,因為就三個命令就完事了,那yum的安裝呢。

http://blog.csdn.net/lincy100/article/details/6803855看前面一段就好了。

http://wenku.baidu.com/view/1ed0b024192e45361066f5fb.html跟上一篇一樣的,不過有圖片,稍微詳細一點。

我當時做到第四步的時候可能有點困擾,因為一個說要vi /etc/yum.repos.d/rhel-debuginfo.repo,一個有沒說究竟是改哪個,況且我的/etc/yum.repos.d下面沒有rhel-debuginfo.repo,看了一些資料後,決定就改這個vi /etc/yum.repos.d/rhel-source.repo,按照上面第二個的介紹去改就好了。試一下yum clean all 然後yum install gcc。

既然yum裝好了,裝圖形介面就

yum install xorg*

yum groupinstall "X Window System"

yum groupinstall Desktop

yum groupinstall "Desktop Platform"

上面4步都是機器自己裝,需要點時間。

圖形介面好了之後,終於可以

[oracle@redhat database]$ ./runInstaller

又出現報錯:

DISPLAY 尚未設定。請設定 DISPLAY 後重試。
根據所使用的 Unix Shell, 您可以使用以下樣本中的一個命令來設定 DISPLAY 環境變數:
- 對於 csh:            % setenv DISPLAY 192.168.1.128:0.0
- 對於 sh, ksh 和 bash:         $ DISPLAY=192.168.1.128:0.0; export DISPLAY
使用以下命令來查看所使用的 shell:
       echo $SHELL
使用以下命令來查看當前的 DISPLAY 環境變數設定:
       echo $DISPLAY
- 確保客戶機使用者有權串連到 X 伺服器。
要允許客戶機使用者訪問 X 伺服器, 請以啟動會話的使用者身份開啟 xterm, dtterm 或 xconsole, 並鍵入以下命令:
% xhost +
要測試 DISPLAY 環境變數是否設定正確, 請運行本機作業系統內建的基於 X11 的程式, 例如 'xclock':
        % <xclock 的完整路徑.. 參見下文>
如果無法成功運行 xclock, 請與您的 PC-X 伺服器或作業系統供應商聯絡以獲得協助。
xclock 的典型路徑為: /usr/openwin/bin/xclock
      http://shuhui018125.blog.163.com/blog/static/7711050201002792325362/ 按照這篇文章去做就沒問題了。
如果你的linux系統還是沒有出現介面或者在xhost還是出現錯誤
你可以去下載vnc-4_1_2-x86_win32_viewer這個軟體
再去根據http://blog.sina.com.cn/s/blog_49c306b201011had.html這篇文章進行相應操作
用vnc去練級你的這個linux介面,此時就會出現相應的圖形介面
再次[oracle@redhat database]$ ./runInstaller

終於可以進入圖形介面去安裝oracle了,但是亂碼了。

http://www.examw.com/oracle/zhonghe/147029/這篇東西的後半部分搞掂這個問題。



然後利用netca、dbca建立監聽和建立資料庫。

http://www.linuxidc.com/Linux/2011-09/43920p2.htm這個是總流程。

但是在執行netca時可能會報錯:

Command not found

http://blog.sina.com.cn/s/blog_62200f0e0100jl2j.html建議先看這個,理解一下。

http://victorwmh.iteye.com/blog/1074854真正修改.bash_profile的時候按照這個的第3種改,記得改完要讓它生效。

我的PATH是在/u01/oracle/product/OraHome/bin

好了,netca命令有了,輸入netca斷行符號。

又報錯:

Oracle Net Services 配置:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Error: null
有關詳細資料, 請查看追蹤檔案: /oradata/oracle/cfgtoollogs/netca/trace_OraDb11g_home1-1204115下午2740.log
Oracle Net Services 配置失敗。結束代碼是1
http://www.cnblogs.com/lanzi/archive/2012/04/12/2443639.html完美解決。

執行完dbca建立資料庫後測試一下

用 Oracle 使用者 遠程登入, 然後

$ sqlplus / nolog

SQL> conn / as sysdba

Connected to an idle instance.

SQL> startup;
    ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/oracle/product/11.1.0/dbs/initorcl.ora'

http://wenku.baidu.com/view/b7980269561252d380eb6e71.html完美解決

雖然這篇文章裡是用的不是11g,所提到的目錄不同,但是大體類似,我的目錄就是在/u01/oracle下好像就有admin了,然後一步一步找。

解決完這個再試一次startup,又來報錯

ORA-00845: MEMORY_TARGET not supported on this system

http://ibmcn.blog.51cto.com/510174/766996稍微認真看一下就能明白了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.