使用silent模式安裝Oracle 11g

hooca發表於2015-06-10

點選(此處)摺疊或開啟

  1. ./runInstaller -silent -noconfig -responseFile /home/oracle/response/db_install.rsp

OS:Oracle Linux 6.6 64bit
DB:Oracle 11.2.0.4

先複製response檔案模板,在/response下,


點選(此處)摺疊或開啟

  1. ls response/
  2. dbca.rsp db_install.rsp netca.rsp
1. 安裝Oracle Software

vi db_install.rsp

點選(此處)摺疊或開啟

  1. oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
  2. oracle.install.option=INSTALL_DB_SWONLY
  3. ORACLE_HOSTNAME=
  4. UNIX_GROUP_NAME=oinstall
  5. INVENTORY_LOCATION=/u01/app/oracle/oraInventory
  6. SELECTED_LANGUAGES=en,zh_CN
  7. ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
  8. ORACLE_BASE=/u01/app/oracle
  9. oracle.install.db.InstallEdition=EE
  10. oracle.install.db.EEOptionsSelection=false
  11. oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
  12. oracle.install.db.DBA_GROUP=dba
  13. oracle.install.db.OPER_GROUP=oper
  14. oracle.install.db.CLUSTER_NODES=
  15. oracle.install.db.isRACOneInstall=
  16. oracle.install.db.racOneServiceName=
  17. oracle.install.db.config.starterdb.type=
  18. oracle.install.db.config.starterdb.globalDBName=
  19. oracle.install.db.config.starterdb.SID=
  20. oracle.install.db.config.starterdb.characterSet=AL32UTF8
  21. oracle.install.db.config.starterdb.memoryOption=true
  22. oracle.install.db.config.starterdb.memoryLimit=
  23. oracle.install.db.config.starterdb.installExampleSchemas=false
  24. oracle.install.db.config.starterdb.enableSecuritySettings=true
  25. oracle.install.db.config.starterdb.password.ALL=
  26. oracle.install.db.config.starterdb.password.SYS=
  27. oracle.install.db.config.starterdb.password.SYSTEM=
  28. oracle.install.db.config.starterdb.password.SYSMAN=
  29. oracle.install.db.config.starterdb.password.DBSNMP=
  30. oracle.install.db.config.starterdb.control=DB_CONTROL
  31. oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
  32. oracle.install.db.config.starterdb.automatedBackup.enable=false
  33. oracle.install.db.config.starterdb.automatedBackup.osuid=
  34. oracle.install.db.config.starterdb.automatedBackup.ospwd=
  35. oracle.install.db.config.starterdb.storageType=
  36. oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
  37. oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
  38. oracle.install.db.config.asm.diskGroup=
  39. oracle.install.db.config.asm.ASMSNMPPassword=
  40. MYORACLESUPPORT_USERNAME=
  41. MYORACLESUPPORT_PASSWORD=
  42. SECURITY_UPDATES_VIA_MYORACLESUPPORT=
  43. DECLINE_SECURITY_UPDATES=true
  44. PROXY_HOST=
  45. PROXY_PORT=
  46. PROXY_USER=
  47. PROXY_PWD=
  48. PROXY_REALM=
  49. COLLECTOR_SUPPORTHUB_URL=
  50. oracle.installer.autoupdates.option=
  51. oracle.installer.autoupdates.downloadUpdatesLoc=
  52. AUTOUPDATES_MYORACLESUPPORT_USERNAME=
  53. AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
開始安裝


點選(此處)摺疊或開啟

  1. ./runInstaller -silent -noconfig -responseFile /home/oracle/response/db_install.rsp
注:-responsefile必須用絕對路徑


2. 建立監聽器

點選(此處)摺疊或開啟

  1. netca -silent -responsefile /home/oracle/response/netca.rsp
netca.rsp用預設即可,無需編輯

3. 建立DB

vi dbca.rsp


點選(此處)摺疊或開啟

  1. $ grep -v '#' dbca.rsp | grep [^a-Z]
  2. [GENERAL]
  3. RESPONSEFILE_VERSION = "11.2.0"
  4. OPERATION_TYPE = "createDatabase"
  5. [CREATEDATABASE]
  6. GDBNAME = "red"
  7. SID = "red"
  8. TEMPLATENAME = "General_Purpose.dbc"
  9. EMCONFIGURATION = "LOCAL"
  10. DATAFILEDESTINATION = /oradata
  11. RECOVERYAREADESTINATION = /fra
  12. STORAGETYPE=FS
  13. CHARACTERSET = "ZHS16GBK"
  14. NATIONALCHARACTERSET= "AL16UTF16"
開始安裝

點選(此處)摺疊或開啟

  1. export DISPLAY=":0.0"
  2. dbca -silent -recoveryAreaDestination /fra -responseFile /home/oracle/response/dbca.rsp
會提示輸入密碼

建立DB完成後,預設DB執行在非歸檔模式,根據需要調整FRA大小路徑和歸檔模式

刪除DB

編輯response檔案

點選(此處)摺疊或開啟

  1. $ grep -v '#' dbca.rsp | grep [^a-Z]
  2. [DELETEDATABASE]
  3. SOURCEDB = "red"
開始刪除

點選(此處)摺疊或開啟

  1. dbca -silent -deleteDatabase -responseFile /home/oracle/response/dbca.rsp




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

相關文章