rhel5上oracle10.2.0.4 silent配置oracle

wisdomone1發表於2010-06-13
1,解壓資料庫軟體介質包,找到response目錄的enterprise.rsp檔案,修改如下內容:
#------------------------------------------------------------------------------
#Name       : UNIX_GROUP_NAME
#Datatype   : String
#Description: Unix group to be set for the inventory directory.
#Example    : UNIX_GROUP_NAME = "install"
#------------------------------------------------------------------------------
UNIX_GROUP_NAME="oinstall"
 
#------------------------------------------------------------------------------
#Name       : FROM_LOCATION
#Datatype   : String
#Description: Complete path to the products.xml.
#Example    : FROM_LOCATION = "../stage/products.xml"
#------------------------------------------------------------------------------
FROM_LOCATION="/oracle/rpm/database/stage/products.xml"
 
 
#------------------------------------------------------------------------------
#Name       : ORACLE_HOME
#Datatype   : String
#Description: Complete path of the Oracle Home.
#Example    : ORACLE_HOME = "/product/10.2.0/db_1"
#------------------------------------------------------------------------------
ORACLE_HOME="/oracle/product/10.2.0/db_1"
 
 
 
#------------------------------------------------------------------------------
#Name       : ORACLE_HOME_NAME
#Datatype   : String
#Description: Oracle Home Name. Used in creating folders and services.
#Example    : ORACLE_HOME_NAME = "OraDbHome1"
#------------------------------------------------------------------------------
ORACLE_HOME_NAME="OraDbHome1"
 
 
#------------------------------------------------------------------------------
#Name       : COMPONENT_LANGUAGES
#Datatype   : StringList
#Description: Languages in which the components will be installed.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#             en,   : English
#             fr,   : French
#             ar,   : Arabic
#             bn,   : Bengali
#             pt_BR,: Brazilian Portuguese
#             bg,   : Bulgarian
#             fr_CA,: Canadian French
#             ca,   : Catalan
#             hr,   : Croatian
#             cs,   : Czech
#             da,   : Danish
#             nl,   : Dutch
#             ar_EG,: Egyptian
#             en_GB,: English (United Kingdom)
#             et,   : Estonian
#             fi,   : Finnish
#             de,   : German
#             el,   : Greek
#             iw,   : Hebrew
#             hu,   : Hungarian
#             is,   : Icelandic
#             in,   : Indonesian
#             it,   : Italian
#             ja,   : Japanese
#             ko,   : Korean
#             es,   : Latin American Spanish
#             lv,   : Latvian
#             lt,   : Lithuanian
#             ms,   : Malay
#             es_MX,: Mexican Spanish
#             no,   : Norwegian
#             pl,   : Polish
#             pt,   : Portuguese
#             ro,   : Romanian
#             ru,   : Russian
#             zh_CN,: Simplified Chinese
#             sk,   : Slovak
#             sl,   : Slovenian
#             es_ES,: Spanish
#             sv,   : Swedish
#             th,   : Thai
#             zh_TW,: Traditional Chinese
#             tr,   : Turkish
#             uk,   : Ukrainian
#             vi,   : Vietnamese
#
#Example    : COMPONENT_LANGUAGES = {"en"}
#------------------------------------------------------------------------------
COMPONENT_LANGUAGES={"en","zh_CN"}
 
 
 
#------------------------------------------------------------------------------
#Name       : INSTALL_TYPE
#Datatype   : String
#Description: Installation type of the component.
#
#             The following choices are available. The value should contain
#             only one of these choices.
#             EE     : Enterprise Edition
#             SE     : Standard Edition
#             Custom : Custom
#Example    : INSTALL_TYPE = "EE"
#------------------------------------------------------------------------------
INSTALL_TYPE="Enterprise Edition"
 
 
###############################################################################
#                                                                             #
# Dialog: PRIVILEGED OPERATING SYSTEM GROUPS                                  #
# ------------------------------------------                                  #
# Provide values for the OS groups you wish to grant OSDBA and OSOPER         #
# privileges.  If the user performing the install is a member of the group    #
# "dba", then that will be used unless specified otherwise below.             #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# Name       : s_nameForDBAGrp
# Datatype   : String
# Description: The OS group to be granted OSDBA privileges
# Example    : s_nameForDBAGrp = "dba"
#------------------------------------------------------------------------------
s_nameForDBAGrp="dba"
#------------------------------------------------------------------------------
# Name       : s_nameForOPERGrp
# Datatype   : String
# Description: The OS group to be granted OSOPER privileges
# Example    : s_nameForDBAGrp = "oper"
#------------------------------------------------------------------------------
s_nameForOPERGrp="dba"
 
 
###############################################################################
#                                                                             #
# Dialog: SELECT CONFIGURATION OPTION                                         #
# -----------------------------------                                         #
# Please note that you must specificy values for all three entries below in   #
# order to supress the Configuration Option Dialog.  Even if you choose not   #
# to configure an ASM instance, you must specify values for s_ASMSYSPassword  #
# and s_ASMSYSPasswordAgain in order for the dialog not to be displayed.  If  #
# you choose to create a database or perform. a software-only installation,    #
# simply leave set these passwords to "".  They will be ignored, but are      #
# required for proper screen supression.                                      #
#                                                                             #
###############################################################################
#------------------------------------------------------------------------------
# Name       : n_configurationOption
# Datatype   : Number
# Description: Determines the type of configuration to perform. for the session.
#
#              This entry should be specified as an number.  The valid values
#              that you can use map to the following options:
#              1 - Create a Database
#              2 - Configure an ASM instance
#              3 - Install Software Only
#
# Example    : n_configurationOption=1
#------------------------------------------------------------------------------
n_configurationOption=3
(注:其實enterprise.rsp相當強大,裡面內含了比如建立資料庫(例項),刪除例項,配置asm各種操作型別,此處我為了簡化,只是選用了其中一小點功能)
 
 
2,執行./runInstaller -silent -responseFile=/oracle/rpm/database/response/software.rsp ,安裝oracle 軟體
 
 
3,下載並解壓10.2.0.4升級patch包,到相應的response目錄,找到patchset.rsp,修改如下內容:
#-----------------------------------------------------------------------------
# Name          : UNIX_GROUP_NAME
# Datatype      : String
# Description   : Unix group which will have write permissions on the
#                 installer inventory directory
# Valid values  : Any Unix group to which the current user belongs
# value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
UNIX_GROUP_NAME="oinstall"
 
 
#-----------------------------------------------------------------------------
# Name          : FROM_LOCATION
# Datatype      : String
# Description   : Complete path of the products.xml file from the staging area
#                 where you untared your patch set.
# Valid values  : Full path ending in "products.xml"
# Example value : "/patchset/oracle10g/stage/products.xml"
# Default value : "../stage/products.xml"
# Mandatory     : Yes
#-----------------------------------------------------------------------------
FROM_LOCATION="/oracle/rpm/Disk1/stage/products.xml"
 
#-----------------------------------------------------------------------------
# Name          : ORACLE_HOME
# Datatype      : String
# Description   : Full path of existing Oracle Home directory to use for
#                 installing Oracle patch set, i.e. the target "Oracle Home"
# Valid values  : Directory path
# Example value : "/u01/app/oracle/products/10.2.0.4.0"
# Default value : none
# Mandatory     : Yes
#-----------------------------------------------------------------------------
ORACLE_HOME="/oracle/product/10.2.0/db_1"  #注:這裡要和源資料庫配置值一樣
#-----------------------------------------------------------------------------
# Name          : ORACLE_HOME_NAME
# Datatype      : String
# Description   : Oracle Home Name. Used in creating folders and services.
# Valid values  : any string not used for any Oracle HOME
# Example value : ORACLE_HOME_NAME = "OHOME1"
# Default value : OHOME1
# Mandatory     : Yes
#-----------------------------------------------------------------------------
ORACLE_HOME_NAME="OraDbHome1"    #注:這裡要和源資料庫配置值一樣
 
 
#-----------------------------------------------------------------------------
# Name          : COMPONENT_LANGUAGES
# Datatype      : StringList
# Description   : Languages in which the components will be installed.
#                 The following choices are available. The value should
#                 contain only one of these choices.
#                 The choices are of the form. Internal Name : External name.
#                 Please use the internal name while specifying the value.
# Valid values  :
#    en,   : English
#    fr,   : French
#    ar,   : Arabic
#    bn,   : Bengali
#    pt_BR,   : Brazilian Portuguese
#    bg,   : Bulgarian
#    fr_CA,   : Canadian French
#    ca,   : Catalan
#    hr,   : Croatian
#    cs,   : Czech
#    da,   : Danish
#    nl,   : Dutch
#    ar_EG,   : Egyptian
#    en_GB,   : English (United Kingdom)
#    et,   : Estonian
#    fi,   : Finnish
#    de,   : German
#    el,   : Greek
#    iw,   : Hebrew
#    hu,   : Hungarian
#    is,   : Icelandic
#    in,   : Indonesian
#    it,   : Italian
#    ja,   : Japanese
#    ko,   : Korean
#    es,   : Latin American Spanish
#    lv,   : Latvian
#    lt,   : Lithuanian
#    ms,   : Malay
#    es_MX,   : Mexican Spanish
#    no,   : Norwegian
#    pl,   : Polish
#    pt,   : Portuguese
#    ro,   : Romanian
#    ru,   : Russian
#    zh_CN,   : Simplified Chinese
#    sk,   : Slovak
#    sl,   : Slovenian
#    es_ES,   : Spanish
#    sv,   : Swedish
#    th,   : Thai
#    zh_TW,   : Traditional Chinese
#    tr,   : Turkish
#    uk,   : Ukrainian
#    vi,   : Vietnamese
# Default value : en
# Mandatory     : No
#-----------------------------------------------------------------------------
COMPONENT_LANGUAGES={"en","zh_CN"}
 
(注:以上源資料庫指:就是要升級的10.2.0.1資料庫,也就是我上面幾步所操作的資料庫)
 
 
4,升級源資料庫10.2.0.1到10.2.0.4
./runInstaller  -silent -responseFile /oracle/rpm/Disk1/response/patchset_use.rsp
 
5,到資料庫軟體的response目錄,找到dbca.rsp,修改如下內容:
 
#-----------------------------------------------------------------------------
# Name          : OPERATION_TYPE
# Datatype      : String
# Description   : Type of operation
# Valid values  : "createDatabase" \ "createTemplateFromDB" \ "createCloneTemplate" \ "deleteDatabase" \ "configureDatabase" \ "configureASM" \ "addInstance"
 (RAC-only) \ "deleteInstance" (RAC-only)
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
OPERATION_TYPE = "createDatabase"  #大家可以看到,有很多型別吧,完全對應於我們圖形介面操作所有功能,還有針對rac的
 
#-----------------------------------------------------------------------------
# CREATEDATABASE section is used when OPERATION_TYPE is defined as "createDatabase".
#-----------------------------------------------------------------------------
[CREATEDATABASE]
#-----------------------------------------------------------------------------
# Name          : GDBNAME
# Datatype      : String
# Description   : Global database name of the database
# Valid values  : . - when database domain isn't NULL
#                              - when database domain is NULL
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
GDBNAME = "orcl"
#-----------------------------------------------------------------------------
# Name          : SID
# Datatype      : String
# Description   : System identifier (SID) of the database
# Valid values  : Check Oracle10g Administrator's Guide
# Default value : specified in GDBNAME
# Mandatory     : No
#-----------------------------------------------------------------------------
SID = "orcl"
 
#-----------------------------------------------------------------------------
# Name          : TEMPLATENAME
# Datatype      : String
# Description   : Name of the template
# Valid values  : Template name as seen in DBCA
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
TEMPLATENAME = "General Purpose"  #建立資料庫所用的模組
 
 
#-----------------------------------------------------------------------------
# Name          : SYSPASSWORD
# Datatype      : String
# Description   : Password for SYS user
# Valid values  : Check Oracle10g Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
SYSPASSWORD = "system"
#-----------------------------------------------------------------------------
# Name          : SYSTEMPASSWORD
# Datatype      : String
# Description   : Password for SYSTEM user
# Valid values  : Check Oracle10g Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
#SYSTEMPASSWORD = "system"
 
#-----------------------------------------------------------------------------
# Name          : DATAFILEDESTINATION
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Directory for all the database files
# Default value : $ORACLE_BASE/oradata
# Mandatory     : No
#-----------------------------------------------------------------------------
DATAFILEDESTINATION ="/oracle/oradata"
 
 
#-----------------------------------------------------------------------------
# Name          : RECOVERYAREADESTINATION
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Recovery Area location
# Default value : $ORACLE_BASE/flash_recovery_area
# Mandatory     : No
#-----------------------------------------------------------------------------
RECOVERYAREADESTINATION="$ORACLE_BASE/flash_recovery_area"
#-----------------------------------------------------------------------------
# Name          : STORAGETYPE
# Datatype      : String
# Description   : Specifies the storage on which the database is to be created
# Valid values  : FS (CFS for RAC), ASM, RAW
# Default value : FS
# Mandatory     : No
#-----------------------------------------------------------------------------
#STORAGETYPE=FS
 
 
# Name          : CHARACTERSET
# Datatype      : String
# Description   : Character set of the database
# Valid values  : Check Oracle9i National Language Support Guide
# Default value : "US7ASCII"
# Mandatory     : NO
#-----------------------------------------------------------------------------
#CHARACTERSET = "US7ASCII"    #採用了預設
#-----------------------------------------------------------------------------
# Name          : NATIONALCHARACTERSET
# Datatype      : String
# Description   : National Character set of the database
# Valid values  : "UTF8" or "AL16UTF16". For details, check Oracle9i National Language Support Guide
# Default value : "AL16UTF16"
# Mandatory     : No
#-----------------------------------------------------------------------------
#NATIONALCHARACTERSET= "UTF8"  #採用了預設
 
(注:dbca也同software.rsp一樣,具備多種功能,此處僅用了建立資料庫,還有刪除資料庫,配置asm例項,根據資料庫建立新的模組等)
 
6,利用dbca建立資料庫例項
dbca -silent   -responseFile /oracle/rpm/database_software/response/dbca_use.rsp
 
7,操作上幾步差不多,在資料庫軟體response目錄到netca.rsp,此檔案基本不用修改
  (注:netca一些概念我一直沒明白,還要再測試一下)
 
 
netca /silent /responsefile /oracle/rpm/database_software/response/netca_use.rsp
 
 
 
 
 
 
 
 

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

相關文章