腳本:單實例靜默安裝
echo '[GENERAL]
RESPONSEFILE_VERSION = "11.2.0" //查看虛擬機的版本,不能更改
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "PROD2" //數據庫名字
SID = "PROD2" //實例名
TEMPLATENAME = "General_Purpose.dbc" //模板,默認就能夠
STORAGETYPE=FS //filesystem文件系統
DATAFILEDESTINATION =/u01/app/oracle/aa/datafile //datafile地址
#RECOVERYAREADESTINATION=/opt/app/flash_recovery_area //恢復數據存放目錄
CHARACTERSET = "AL32UTF8" //字符集
NATIONALCHARACTERSET= "AL16UTF16" //國家字符集,通常默認
TOTALMEMORY = "700" //https://blog.csdn.net/xiewenbo/article/details/9346329
SYSPASSWORD = "oracle" //sys密碼
SYSTEMPASSWORD = "oracle" '>>/u01/app/oracle/aa/dbca_install.rsp
--靜默安裝數據庫
$ORACLE_HOME/bin/dbca -silent -responseFile /u01/app/oracle/aa/dbca_install.rsp //啓動home目錄下的dbca靜默安裝,執行目錄下的dbca_install.rsp數據庫
--靜默安裝監聽配置
$ netca -silent -responsefile $ORACLE_HOME/assistants/netca/netca.rsporacle
1.先檢查本機oracle版本要寫在腳本里app
2.腳本執行過程.net