ORACLE 11.2.0.4靜默安裝

gaopengtttt發表於2017-07-06
今天一個朋友叫安裝ORACLE資料庫不提供桌面,哎沒辦法只有靜默了。
下面記錄一下靜默的流程,很久沒有手動建庫了,上次還是考OCM的時候


1、安裝資料庫軟體
oracle.install.responseFileVersion=oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY  
ORACLE_HOSTNAME=localhost 
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/home/oracle/product/oraInventory
SELECTED_LANGUAGES=en,zh_CN  
ORACLE_HOME=/home/oracle/product/11.2.4
ORACLE_BASE=/home/oracle/product 
oracle.install.db.InstallEdition=EE  
oracle.install.db.EEOptionsSelection=false  
oracle.install.db.DBA_GROUP=dba  
oracle.install.db.OPER_GROUP=dba
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE  
oracle.install.db.config.starterdb.memoryOption=false  
oracle.install.db.config.starterdb.installExampleSchemas=false  
oracle.install.db.config.starterdb.enableSecuritySettings=true  
oracle.install.db.config.starterdb.control=DB_CONTROL  
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false  
DECLINE_SECURITY_UPDATES=true  
oracle.installer.autoupdates.option=SKIP_UPDATES  
 ./runInstaller -silent -noconfig -ignorePrereq -responseFile /home/oracle/install.rsp

跑提示監本
安裝PSU

2、手動建庫
--編輯引數檔案
*._optimizer_use_feedback=FALSE
*.audit_file_dest='/home/oracle/adump/adump'
*.audit_sys_operations=TRUE
*.audit_trail='DB','EXTENDED'
*.compatible='11.2.0.0.0'
*.control_file_record_keep_time=20
*.control_files='/home/oracle/oradata/orcl/control01.ctl','/home/oracle/oradata/orcl/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_files=500
*.db_name='orcl'
*.diagnostic_dest='/home/oracle/diag'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=yjfcoreXDB)'
*.memory_target=5943040000
*.open_cursors=1000
*.parallel_execution_message_size=32768
*.processes=4000
*.remote_login_passwordfile='EXCLUSIVE'
*.session_cached_cursors=200
*.sessions=1655
*.sga_target=3991029248
*.standby_file_management='AUTO'
*.undo_retention=3600
*.undo_tablespace='UNDOTBS1'
*.log_archive_dest_1='LOCATION=/home/oracle/archive/'
*.log_archive_format='%t_%s_%r.dbf'
啟動到mount階段
--建立資料庫
CREATE DATABASE orcl  
   USER SYS IDENTIFIED BY oracle  
   USER SYSTEM IDENTIFIED BY oracle  
   LOGFILE GROUP 1 ('/home/oracle/oradata/orcl/redo01a.log','/home/oracle/oradata/orcl/redo01b.log') SIZE 300M BLOCKSIZE 512,  
           GROUP 2 ('/home/oracle/oradata/orcl/redo02a.log','/home/oracle/oradata/orcl/redo02b.log') SIZE 300M BLOCKSIZE 512,  
           GROUP 3 ('/home/oracle/oradata/orcl/redo03a.log','/home/oracle/oradata/orcl/redo03b.log') SIZE 300M BLOCKSIZE 512,
           GROUP 4 ('/home/oracle/oradata/orcl/redo04a.log','/home/oracle/oradata/orcl/redo04b.log') SIZE 300M BLOCKSIZE 512  
   MAXLOGFILES 5  
   MAXLOGMEMBERS 5  
   MAXLOGHISTORY 1  
   MAXDATAFILES 500  
   CHARACTER SET AL32UTF8  
   NATIONAL CHARACTER SET AL16UTF16  
   EXTENT MANAGEMENT LOCAL  
   DATAFILE '/home/oracle/oradata/orcl/system01.dbf' SIZE 325M autoextend on maxsize 30g  
   SYSAUX DATAFILE '/home/oracle/oradata/orcl/sysaux01.dbf' SIZE 325M autoextend on maxsize 30g 
   DEFAULT TABLESPACE users  
      DATAFILE '/home/oracle/oradata/orcl/users01.dbf'  
      SIZE 500M REUSE AUTOEXTEND ON MAXSIZE 30g
   DEFAULT TEMPORARY TABLESPACE temp  
      TEMPFILE '/home/oracle/oradata/orcl/temp01.dbf'  
      SIZE 100M  autoextend on maxsize 30g 
   UNDO TABLESPACE UNDOTBS1  
      DATAFILE '/home/oracle/oradata/orcl/undotbs01.dbf'  
      SIZE 200M  AUTOEXTEND ON MAXSIZE 30g;  
--跑指令碼
@?/rdbms/admin/catalog.sql  
@?/rdbms/admin/catproc.sql  
@?/sqlplus/admin/pupbld.sql  system使用者
--配置listener
這機器hosts不敢改用靜態註冊吧
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = orcl)
      (ORACLE_HOME = /home/oracle/product/11.2.4)
      (SID_NAME = orcl)
    )
  )

LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = *****)(PORT = 1521))
  )
--配置密碼檔案
orapwd file=orapworcl password=oracle entries=100; 
--開啟ARCHIVE歸檔
alter database archivelog;
--PSU指令碼
startup
@catbundle.sql psu apply
作者微信:

ORACLE 11.2.0.4靜默安裝

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

相關文章