天天看點

靜默安裝 Oracle資料庫軟體

靜默安裝資料庫軟體之前,需要将oracle安裝環境像正常安裝一樣配置好,

如果你沒有靜默安裝的響應配置文檔,可以使用OUI錄制響應檔案,記錄安裝過程;如果有響應配置文檔,直接修改安裝參數,進行安裝oracle資料庫軟體。

首先,通過OUI來錄制一個響應配置檔案。

oracle 使用者環境變量的設定:

[root@node1 /]# cat /home/oracle/.bash_profile

ORACLE_SID=orcl

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=$ORACLE_BASE/10.1.2/db

PATH=$ORACLE_HOME/bin:$PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH LD_ASSUME_KERNEL LD_LIBRARY_PATH

執行以下指令,然後在OUI中根據提示執行安裝資料庫軟體的操作:

[oracle@node1 database]$ ./runInstaller -record -destinationFile /u01/install_database.rsp

注:錄制過程中選擇隻安裝資料庫軟體不建立資料庫;當安裝界面到達最後一步時選擇cancel;/u01/install_database.rsp 目錄必須是ORACLE使用者有讀寫權限。

以下是錄制好的響應配置文檔:

[root@node1 u01]# cat install_database.rsp

RESPONSEFILE_VERSION=2.2.1.0.0               

UNIX_GROUP_NAME="oinstall"                              //----安裝使用者組

FROM_LOCATION="/opt/database/stage/products.xml"        //–-安裝源檔案位址 

FROM_LOCATION_CD_LABEL=<Value Unspecified>

ORACLE_HOME="/u01/app/oracle/10.1.2/db"                 //---ORACLE_HOME

ORACLE_HOME_NAME="OraDb10g_home1"                       //---ORACLE_HOME_NAME

SHOW_WELCOME_PAGE=true                               

SHOW_CUSTOM_TREE_PAGE=true

SHOW_COMPONENT_LOCATIONS_PAGE=true

SHOW_SUMMARY_PAGE=true

SHOW_INSTALL_PROGRESS_PAGE=true

SHOW_REQUIRED_CONFIG_TOOL_PAGE=true

SHOW_CONFIG_TOOL_PAGE=true

SHOW_RELEASE_NOTES=true

SHOW_ROOTSH_CONFIRMATION=true

SHOW_END_SESSION_PAGE=true

SHOW_EXIT_CONFIRMATION=true

NEXT_SESSION=false

NEXT_SESSION_ON_FAIL=true

NEXT_SESSION_RESPONSE=<Value Unspecified>

DEINSTALL_LIST={"oracle.server","10.2.0.1.0"}

SHOW_DEINSTALL_CONFIRMATION=true

SHOW_DEINSTALL_PROGRESS=true

CLUSTER_NODES={}

ACCEPT_LICENSE_AGREEMENT=false

TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"}

SHOW_SPLASH_SCREEN=true

SELECTED_LANGUAGES={"en"}                    //----語言

COMPONENT_LANGUAGES={"en"}                   //----語言

INSTALL_TYPE="Enterprise Edition"

sl_superAdminPasswds=<Value Unspecified>

sl_dlgASMCfgSelectableDisks={}

s_superAdminSamePasswd=<Value Unspecified>

s_globalDBName="orcl"                        //全局資料名

s_dlgASMCfgRedundancyValue="2 (Norm)"

s_dlgASMCfgNewDisksSize="0"

s_dlgASMCfgExistingFreeSpace="0"

s_dlgASMCfgDiskGroupName="DATA"

s_dlgASMCfgDiskDiscoveryString=""

s_dlgASMCfgAdditionalSpaceNeeded=" MB"

s_dbSelectedUsesASM=""

s_dbSIDSelectedForUpgrade=""

s_dbRetChar=""

s_dbOHSelectedForUpgrade=""

s_ASMSYSPassword=<Value Unspecified>

n_performUpgrade=0

n_dlgASMCfgRedundancySelected=2

n_dbType=1

n_dbSelection=0

Set this to true if same password across all the schemas is desired, else false to enter distinguish passwords for each schema.

If set to true, values from s_superAdminSamePasswd and s_superAdminSamePasswdAgain are picked up, else stringlists sl_superAdminPasswds and sl_superAdminPasswdsAgain are used.

b_useSamePassword=false

Set this to true (default) if recovery into file system is desired, else to false for ASM recovery .

b_useFileSystemForRecovery=true

Set this to true if email update is desired, false is the default .

b_receiveEmailNotification=false

Set this to true if loading example schemas is desired, else false so database won't be created with example schemas. The default is false.

b_loadExampleSchemas=false

b_enableAutoBackup=false

b_dlgASMShowCandidateDisks=true

b_centrallyManageASMInstance=true

sl_dlgASMDskGrpSelectedGroup={" "," "," "," "}

s_dlgRBOUsername=""

s_dlgEMCentralAgentSelected="No Agents Found"

Set this to true if using database control to manage the database is desired, else false so database can be managed by grid control.

b_useDBControl=true

s_superAdminSamePasswdAgain=<Value Unspecified>

s_dlgEMSMTPServer=""

s_dlgEMEmailAddress=""

s_dlgRBORecoveryLocation="/u01/app/oracle/10.1.2/db/flash_recovery_area/"     //閃回目錄

n_upgradeDB=1

n_configurationOption=3

sl_upgradableSIDBInstances={}

n_upgradeASM=0

sl_dlgASMCfgDiskSelections={}

s_ASMSYSPasswordAgain=<Value Unspecified>

Set this to the following numbers for corresponding database storage type desired:

1 - File System (default)

2 - ASM

3 - Raw Devices

n_dbStorageType=0

s_rawDeviceMapFileLocation=""

sl_upgradableRACDBInstances={}

s_dlgRBOPassword=<Value Unspecified>

b_stateOfUpgradeDBCheckbox=false

s_dbSid="orcl"                                              //執行個體名

b_dbSelectedUsesASM=false

sl_superAdminPasswdsAgain=<Value Unspecified>

s_mountPoint="/u01/app/oracle/10.1.2/db/oradata/"           //資料檔案存儲目錄

b_stateOfUpgradeASMCheckbox=false

oracle.assistants.server:OPTIONAL_CONFIG_TOOLS="{}"

oracle.has.common:OPTIONAL_CONFIG_TOOLS="{}"

oracle.network.client:OPTIONAL_CONFIG_TOOLS="{}"

oracle.sqlplus.isqlplus:OPTIONAL_CONFIG_TOOLS="{}"

oracle.sysman.console.db:OPTIONAL_CONFIG_TOOLS="{}"

varSelect=1

s_nameForOPERGrp="dba"                                      //安裝使用者所屬組

s_nameForDBAGrp="dba"

[root@node1 u01]#