rhel5.5 linux系統下安裝Oracle 11g

j04212發表於2014-02-13

一、配置環境變數
1、我將環境變數配置寫成了一個指令碼,將這個指令碼copy到一個新建的linux系統。(指令碼我會放到後面的文章中,感興趣的朋友可以去看看)
rhel5.5 linux系統下安裝Oracle 11g

2、進入指令碼所在的目錄。
rhel5.5 linux系統下安裝Oracle 11g

3、執行指令碼,需要輸入的地方:設定oracle使用者密碼;設定oracle sid名,其他的指令碼會自動配置。指令碼建立的預設安裝目錄為:/u01/app/oracle,如果想設定為其它的可以在指令碼中改。
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g

4、最後配置下 /etc/hosts檔案。
rhel5.5 linux系統下安裝Oracle 11g

二、安裝資料庫軟體。
1、將Oracle 11g的2個安裝包copy到安裝根目錄/u01並解壓。這裡要用unzip命令一個一個解壓,不能在windows裡解壓了在copy過來,可能會出問題。
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g

2、修改下database檔案的屬主。
rhel5.5 linux系統下安裝Oracle 11g

3、設定一下DISPLAY環境變數。
rhel5.5 linux系統下安裝Oracle 11g

4、進入database目錄,執行安裝命令:“./runInstaller”,開始安裝資料庫軟體。
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g

5、去掉“I wish to receive security updates via My Oracle Support”。
rhel5.5 linux系統下安裝Oracle 11g

6、選擇“Yes”,不管提示。
rhel5.5 linux系統下安裝Oracle 11g

7、選擇第二項:“Install database soft only”,只安裝資料庫軟體,資料庫後面再建立,這樣的好處如果有錯誤好定位。
rhel5.5 linux系統下安裝Oracle 11g

8、選擇“Single instance database installation”,安裝單例項,第二項是RAC。
rhel5.5 linux系統下安裝Oracle 11g

9、將中文新增到右邊。
rhel5.5 linux系統下安裝Oracle 11g

10、選擇“Enterprise Edition (3.95GB)”,企業版。
rhel5.5 linux系統下安裝Oracle 11g

11、下面的預設就行,一路Next。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

12、這裡會進行安裝前的檢查。
rhel5.5 linux系統下安裝Oracle 11g

13、用yum把缺少的軟體包安裝上。提前要配好yum,如果不會配置yum看這裡 http://blog.itpub.net/27633655/viewspace-1079703/
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

14、點選“Check Again”,重新檢查下看是否安裝齊全。
rhel5.5 linux系統下安裝Oracle 11g

15、實體記憶體和swap大小如果是測試用可以忽略掉,1G記憶體足夠,點選右上叫“Ignore  All”。
rhel5.5 linux系統下安裝Oracle 11g

16、出現一些概要資訊,點選“Finish”開始安裝。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

17、安裝完成後要用root使用者執行2條指令碼。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

18、安裝完成以後點選“OK”。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

三、配置監聽和tnsnames。
1、配置監聽。
在剛才的oracle使用者執行 netca 命令,選擇第一項“Listener configuration”一路Next就行。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

2、tnsnames設定。
選擇第三項“Local Net Service Name configuration”,一路Next,注意參考截圖輸入服務名和本機IP。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

點選“Finish”完成配置。
rhel5.5 linux系統下安裝Oracle 11g

四、建立資料庫。
1、在剛才的oracle使用者執行dbca 命令。
rhel5.5 linux系統下安裝Oracle 11g
rhel5.5 linux系統下安裝Oracle 11g

2、選擇“Create a Database”,建立一個資料庫。
rhel5.5 linux系統下安裝Oracle 11g

3、選則第一項“General Purpose or Transaction Processing”,一般事務資料庫。
rhel5.5 linux系統下安裝Oracle 11g

4、輸入全域性資料庫名和例項名。全域性資料庫名可以加字尾也可以不加。
rhel5.5 linux系統下安裝Oracle 11g

5、這裡是OEM、告警和自動備份,保持預設。
rhel5.5 linux系統下安裝Oracle 11g

6、這裡選擇下面的選項“Use Same Administrative Password for All Accounts”,為所有使用者設定一個統一密碼。
rhel5.5 linux系統下安裝Oracle 11g

7、如果密碼太簡單會出現提示,不管它直接選擇“Yes”。
rhel5.5 linux系統下安裝Oracle 11g

8、這裡儲存型別和檔案,保持預設。
rhel5.5 linux系統下安裝Oracle 11g

9、這裡是閃回區和歸檔設定。勾選“Enable Archiving”,開啟歸檔。
rhel5.5 linux系統下安裝Oracle 11g

10、這裡勾選“Sample Schemas”。資料庫安裝完成後會帶一些樣例使用者和表,如scott、hr等。
rhel5.5 linux系統下安裝Oracle 11g

11、這裡設定記憶體的大小,可以選擇“Typical”給一個總的記憶體大小,也可以選“Custom”自定義SGA和PGA大小。
如果選擇第一項要注意/dev/shm的大小。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

12、這裡設定資料庫連線的程式數,保持預設。
rhel5.5 linux系統下安裝Oracle 11g

13、設定字符集,預設是第一項。應該根據你的實際要求選擇第三項“Choose from the list of character sets”,選擇自己需要的字符集。
rhel5.5 linux系統下安裝Oracle 11g

14、選擇第一項“Dedicated Server Mode”,專有連線模式。第二項為共享連線模式。
rhel5.5 linux系統下安裝Oracle 11g

15、到這裡基本設定完成,資料庫開始安裝。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

16、安裝完成後彈出對話方塊,點選“Password Management...”,可以對某些鎖定使用者解鎖。
rhel5.5 linux系統下安裝Oracle 11g

17、去掉scott使用者前面的勾,輸入密碼,如tiger。如果密碼太簡單,會出現提示框,直接選擇“Yes”。
rhel5.5 linux系統下安裝Oracle 11grhel5.5 linux系統下安裝Oracle 11g

18、點選“Exit”,完成安裝。
rhel5.5 linux系統下安裝Oracle 11g

19、連線到資料庫,看是否執行正常。
rhel5.5 linux系統下安裝Oracle 11g

沒有什麼異常,資料庫安裝完成。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27633655/viewspace-1081028/,如需轉載,請註明出處,否則將追究法律責任。

相關文章