1. 静默安装12c软件
[root@12cr2 ~]# cd /opt/database/response
[root@12cr2 response]# ls
dbca.rsp db_install.rsp netca.rsp
[root@12cr2 response]# cp db_install.rsp db_install2.rsp
[root@12cr2 response]# vi db_install2.rsp
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
DECLINE_SECURITY_UPDATES=true
[oracle@12cr2 database]$ ./runInstaller -silent -responseFile /opt/database/response/db_install2.rsp -ignoreSysPrereqs
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 33710 MB Passed
Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-05-09_12-01-20AM. Please wait ...[oracle@12cr2 database]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2017-05-09_12-01-20AM.log
The installation of Oracle Database 12c was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2017-05-09_12-01-20AM.log' for more details.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/12.2.0/db_1/root.sh
Successfully Setup Software.
[oracle@12cr2 database]$ exit
logout
[root@12cr2 opt]# /u01/app/oracle/product/12.2.0/db_1/root.sh
Check /u01/app/oracle/product/12.2.0/db_1/install/root_12cr2_2017-05-09_00-11-32-561808000.log for the output of root script
[oracle@12cr2 ~]$ sqlplus -v
SQL*Plus: Release 12.2.0.1.0 Production
2. dbca静默安装12c容器数据库
dbca静默安装非容器数据库
[oracle@12cr2 ~]$ dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbname orcl -sid orcl -characterSet UTF8
Enter SYS user password:
Enter SYSTEM user password:
Copying database files
1% complete
2% complete
18% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
44% complete
49% complete
50% complete
53% complete
55% complete
Completing Database Creation
56% complete
57% complete
58% complete
62% complete
65% complete
66% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
[oracle@12cr2 ~]$ export ORACLE_SID=orcl
[oracle@12cr2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue May 9 23:08:13 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string orcl
SQL> show pdbs;
SQL> show con_name
CON_NAME
------------------------------
orcl
dbca静默安装容器数据库
[oracle@12cr2 ~]$ dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbname zylong -sid zylong -characterSet UTF8 -createAsContainerDatabase true -sysPassword Highgo123 -systemPassword Highgo123
Copying database files
1% complete
2% complete
18% complete
33% complete
Creating and starting Oracle instance
35% complete
40% complete
41% complete
42% complete
46% complete
51% complete
52% complete
53% complete
55% complete
Completing Database Creation
56% complete
58% complete
59% complete
62% complete
65% complete
66% complete
Executing Post Configuration Actions
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/zylong/zylong.log" for further details.
[oracle@12cr2 ~]$ export ORACLE_SID=zylong
[oracle@12cr2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue May 9 23:23:57 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@12cr2 ~]$ cd /u01/app/oracle/oradata/
orcl/ zylong/
[oracle@12cr2 ~]$ cd /u01/app/oracle/oradata/zylong/
control01.ctl control02.ctl pdbseed/ redo01.log redo02.log redo03.log sysaux01.dbf system01.dbf temp01.dbf undotbs01.dbf users01.dbf
[oracle@12cr2 ~]$ cd /u01/app/oracle/oradata/zylong/pdbseed/
[oracle@12cr2 pdbseed]$ ll
total 696724
-rw-r----- 1 oracle oinstall 346038272 May 9 23:23 sysaux01.dbf
-rw-r----- 1 oracle oinstall 262152192 May 9 23:23 system01.dbf
-rw-r----- 1 oracle oinstall 67117056 May 9 23:20 temp012017-05-09_23-18-53-696-PM.dbf
-rw-r----- 1 oracle oinstall 104865792 May 9 23:23 undotbs01.dbf
[oracle@12cr2 pdbseed]$