測試版本:
系統版本:RHEL 6.5
oracle版本:11.2.4
一、前言
最近在自學oracle,今天嘗試一下靜默安裝的方法,廢話不多說下面開始。
1、準備oracle 軟體,我這裡使用的11.2.4版本,如果沒有就去oracle 網站下載下傳一下,
如果找不到就給我留言,我發網盤連結
2、将軟體上傳到/tmp 目錄下,裡面有一個response 目錄,裡面有3個rsp檔案
dbca.rsp db_install.rsp netca.rsp,其中作用如下:
db_install.rsp 是安裝資料庫軟體的檔案(本次我們用到的就是這個檔案)
dbca.rsp 是建立資料庫的檔案
netca.rsp 是建立資料庫監聽的檔案
2、将檔案cp到/home/db/oracle/response中,其中這裡測試環境oracle 家目錄為/home/db/oracle。
關于安裝oracle軟體前期的準備工作,例如建立使用者、系統參數等。如果不清楚請參考我的上一篇文章,這裡就不贅述了,連結如下:http://ureysky.blog.51cto.com/2893832/1843543
3、關于db_install.rsp 檔案的配置和解釋,因篇幅限制,可去http://down.51cto.com/data/2238464下載下傳,裡面有我整理的注釋和解釋,按自己的需求編輯好後就可以使用了。
二、開始安裝 Oracle 軟體
1、操作指令
# chmod +x –R /tmp/database
# su - oracle
# cd database 目錄,運作 runInstaller
#./runInstaller -silent -responseFile /home/db/oracle/response/db_install.rsp - ignorePrereq
開始安裝,需要等一段時間(如果沒有錯誤提示就不要按“Enter”鍵,否則可能出現指令行提示,誤以為安裝終止,其實還在安裝)
2、打開另一個終端,可以實時跟蹤檢視安裝日志,了解安裝的進度執行:
tail -f /home/db/oracle/oraInventory/logs/installActions2016-08-30_05-52-18PM.log
安裝過程中,如果提示[WARNING]不必理會,此時安裝程式仍在進行,如果出現[FATAL],則安裝程式已經停止了。
3、當出現以下配置腳本需要以 "root" 使用者的身份執行。
按其提示操作:
$ exit // 回到root使用者,運作下面兩個腳本
/home/db/oracle/oraInventory/orainstRoot.sh
/oracle/product/11.2.4/db_1/root.sh
三、在此安裝過程中遇到的問題及解決辦法:
安裝過程中我也參考了一些網上的文章,問題一是我這次安裝時候遇到的,而問題二和三,是我在網 上查資料的時候看到其他人遇到的,這裡就記錄了下來。
問題一
[FATAL] [INS-32035] Unable to create a new central inventory directory : /oracle.
CAUSE: The central inventory location provided is not empty.
ACTION: Please provide another location for the inventory, or clean up the current location.
A log of this session is currently saved as: /tmp/OraInstall2016-08-30_05-29-49PM/installActions2016-08-30_05-29-49PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
--- 解決辦法
其實這個問題賴自己,可能還是對oracle安裝過程不熟悉,折騰半天。
配置檔案裡面一定要寫上INVENTORY_LOCATION=/home/db/oracle/oraInventory
>>> 問題二
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 415 MB. Actual 4347 MB Passed
Checking swap space: must be greater than 150 MB. Actual 32768 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-03-02_04-46-11PM. Please wait ...$ [SEVERE] - Email Address Not Specified
--- 解決辦法
在安裝模闆中将 DECLINE_SECURITY_UPDATES 參數的值改為true,即:
DECLINE_SECURITY_UPDATES=true // 參見上述的安裝模闆檔案 db_install.rsp
>>> 問題三
[FATAL] [INS-13013] Target environment do not meet some mandatory requirements.
CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /orain/oracle/oraInventory/logs/installActions2011-03-02_04-49-41PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /orain/oracle/oraInventory/logs/installActions2011-03-02_04-49-41PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
這個錯誤在網上查到說在安裝指令中加入選項 -ignorePrereq 就可以解決,但問題的根本原因沒有找到。
本文轉自 yuri_cto 51CTO部落格,原文連結:http://blog.51cto.com/laobaiv1/1845960,如需轉載請自行聯系原作者