在CentOS 7上安裝Oracle 11.2.0.3____Oracle

來源:互聯網
上載者:User

一些簡單的過程就不列在這裡了,網上也有很多,這裡主要寫下遇到的一些問題,以及解決方案

CentOS 7 的環境為

$ uname -aLinux oracle 3.10.0-123.13.1.el7.x86_64 #1 SMP Tue Dec 9 23:06:09 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
注意安裝的時候需要安裝一個案頭系統(X-Windows + KDE 或者 Gnome),否則安裝程式無法運行。

然後根據需要修改共用記憶體等等系統參數。這個也不寫了,網上有很多。不過據我的測試,CentOS7貌似不需要修改也是可以的,Oracle在進行安裝檢查的時候沒有報告問題(和以前的不一樣)。當然為了調優資料庫的效能,還是修改的好。


安裝gcc,因為後面Oracle link的時候會用到

yum install gcc

安裝結果為

gcc --versiongcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)Copyright (C) 2013 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


(這裡注意,因為Oracle需要的3.4和安裝的4.8的參數的區別,後面link會失敗,解決方案見後)

1. 下載,需要下載兩個檔案

p10404530_112030_Linux-x86-64_1of7.zip

p10404530_112030_Linux-x86-64_2of7.zip

2. 解壓縮,把這兩個檔案解壓到同一個目錄下

3. 運行installer。中間依賴檢查那一步,可以Skip。因為Oracle要檢查是否安裝了gcc,glibc等等比較老的版本(3.4)

4. 前面一切順利。到了Link那一步,出錯了。Log顯示

     error in invoking target 'agent nmhs'

   在網上查到瞭解決方案:

vi $ORACLE_HOME/sysman/lib/ins_emagent.mkSearch for the line $(MK_EMAGENT_NMECTL)Change it to:$(MK_EMAGENT_NMECTL) -lnnz11
5. Retry重試。這就OK了。

6. 之後就沒啥問題了。正常安裝,執行root指令碼,等等。

7. 安裝後重啟伺服器。

8. 重啟後,檢查oracle使用者的環境變數:

declare -x ORACLE_HOME="/home/oracle/app/oracle/product/11.2.0/dbhome_1"declare -x ORACLE_SID="orcl"
9. 進入$ORACLE_HOME/network/admin,檢查listener.ora:


[oracle@oracle admin]$ cat listener.ora # listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora# Generated by Oracle configuration tools.SID_LIST_LISTENER = (SID_LIST =   (SID_DESC =     (SID_NAME = orcl)        (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/dbhome_1)   ) )LISTENER =  (DESCRIPTION_LIST =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.16.33.212)(PORT = 1521))    )  )ADR_BASE_LISTENER = /home/oracle/app/oracle

重點檢查其中的SID,HOST,PORT,ORACLE_HOME是否正確。如果不正確用戶端會報告ERROR-ORA-12514:TNS:監聽程式當前無法識別串連描述符中請求的服務 錯誤。

如果沒有問題,進入$ORACLE_HOME/bin,啟動監聽器:

[oracle@oracle bin]$ ./lsnrctlLSNRCTL for Linux: Version 11.2.0.3.0 - Production on 16-DEC-2014 11:22:03Copyright (c) 1991, 2011, Oracle.  All rights reserved.Welcome to LSNRCTL, type "help" for information.
LSNRCTL> startStarting /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionSystem parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.oraLog messages written to /home/oracle/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xmlListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.16.33.212)(PORT=1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.16.33.212)(PORT=1521)))STATUS of the LISTENER------------------------Alias                     LISTENERVersion                   TNSLSNR for Linux: Version 11.2.0.3.0 - ProductionStart Date                16-DEC-2014 11:22:07Uptime                    0 days 0 hr. 0 min. 0 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.oraListener Log File         /home/oracle/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xmlListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.16.33.212)(PORT=1521)))Services Summary...Service "orcl" has 1 instance(s).  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...The command completed successfullyLSNRCTL> 
啟動正常,使用sqlplus啟動資料庫:

[oracle@oracle bin]$ ./sqlplus '/ as sysdba'SQL> startupORACLE instance started.Total System Global Area  960372736 bytesFixed Size                  2234160 bytesVariable Size             557844688 bytesDatabase Buffers          394264576 bytesRedo Buffers                6029312 bytesDatabase mounted.Database opened.

10. Centos7內建了SELINUX,關掉

11. Centos7內建了下一代防火牆firewalld,關掉,否則用戶端串連過來會報TNS Timeout異常

[root@oracle ~]# service firewalld stopRedirecting to /bin/systemctl stop  firewalld.service


===============================================

現在其它機器就應該可以正常串連並使用Oracle了。

另:裝Oracle最省事的還是在Oracle自己的Enterprise Linux上安裝。那些依賴,系統參數,等等等都不需要設定了。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.