2020年8月6日 星期四

2.2 安裝 Oracle 資料庫 (Silent Mode)

若不使用圖形介面安裝 Oracle,也可使用文字介面 (Silent Mode) 來安裝。不同的是文字介面安裝需要事先編輯一個 response file ,Oracle 將藉由 response file 內所設定的參數來安裝。例如我們編輯一個 db_install.rsp 內容如下:

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

oracle.install.responseFileVersion=
/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=linuxdb
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/opt/app/oraInventory
SELECTED_LANGUAGES=en,zh_TW
ORACLE_HOME=/opt/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/opt/app/oracle/product
oracle.install.db.InstallEdition=EE
oracle.install.db.isCustomInstall=false
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true

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

 

編輯完 reponse file 之後同樣的執行 runInstaller 帶上 -silent 參數進行安裝:

[oracle@linuxdb database]$ /source/database/runInstaller -silent -responseFile /source/database/response/db_install.rsp

 

在 11g 的版本當中,silent mode 安裝過程將不會顯示出來,而是直接導入到 log file 之中,若要檢視安裝過程,則必須查看 oraInventory/logs 目錄底下的 *.log file。

安裝完畢後仍然會提示我們使用 root 來執行 orainstRoot.sh 與 root.sh 兩個 script :

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

The following configuration scripts need to be executed as the “root" user.
#!/bin/sh
#Root scripts to run

/opt/app/oraInventory/orainstRoot.sh
/opt/app/oracle/product/11.2.0/dbhome_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as “root"
3. Run the scripts
4. Return to this window and hit “Enter" key to continue

Successfully Setup Software.

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

使用 root 執行完這兩個 script 之後便完成了 silent mode 的安裝。



沒有留言:

張貼留言