#------------------------------------------------------------------------------
# Specify the proxy realm. This value is used if auto-updates option is selected.
#
# Example : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=
#------------------------------------------------------------------------------
# Specify the Oracle Support Hub URL.
#
# Example : COLLECTOR_SUPPORTHUB_URL=https://orasupporthub.company.com:8080/
#------------------------------------------------------------------------------
COLLECTOR_SUPPORTHUB_URL=
#------------------------------------------------------------------------------
# Specify the auto-updates option. It can be one of the following:
# - MYORACLESUPPORT_DOWNLOAD
# - OFFLINE_UPDATES
# - SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=
#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD option is chosen, specify the location where
# the updates are to be downloaded.
# In case OFFLINE_UPDATES option is chosen, specify the location where the updates
# are present.
#------------------------------------------------------------------------------
oracle.installer.autoupdates.downloadUpdatesLoc=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username which has the patches download privileges
# to be used for software updates.
# Example : AUTOUPDATES_MYORACLESUPPORT_USERNAME=abc@oracle.com
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
#------------------------------------------------------------------------------
# Specify the My Oracle Support Account Username password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
在解压目录执行如下命令:
[oracle@oracle database]$./runInstaller -silent -responseFile /home/oracle/soft/database/response/db_install.rsp
出现警告可以不用管
可以另开窗口查看安装进度:
[oracle@oracle response]$tailf /home/oracle/app/oraInventory/logs/installActions2017-08-02_02-37-56AM.log
安装到最后出会出现:
切换到ROOT账户执行两个脚本
[oracle@oracle response]$sh /home/oracle/app/oraInventory/orainstRoot.sh
[oracle@oracle response]$sh /home/oracle/app/product/11.2.0/db_1/root.sh
数据库安装完成
三、监听静默安装
[oracle@oracle response]$ netca /silent /responsefile /home/soft/database/response/netca.rsp
netca.rsp脚本内容如下
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/soft/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/home/oracle/app/product/11.2.0/db_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@oracle response]$ vim /home/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
修改前
查看监听状态:
[oracle@oracle response]$ lsnrctl status
停止监听
[oracle@oracle response]$ lsnrctl stop
[oracle@oracle response]$ lsnrctl start
四、静默创建数据库
数据库脚本
dbca_orcl.rsp内容如下:
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "orcl"
SID = "orcl"
TEMPLATENAME = "General_Purpose.dbc"
STORAGETYPE=FS
DATAFILEDESTINATION =/home/oracle/app/oradata
#RECOVERYAREADESTINATION=/opt/app/flash_recovery_area
CHARACTERSET = "AL32UTF8"
NATIONALCHARACTERSET= "AL16UTF16"
LISTENERS=LISTENER
TOTALMEMORY = "700"
SYSPASSWORD = "111111"
SYSTEMPASSWORD = "111111"
[oracle@oracle response]$ dbca -silent -responseFile ./dbca_orcl.rsp
遇到的问题
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
解决办法:
可能是初始化脚本有问题造成的,于是修改环境变量的SID值为 orcl
执行sqlplus / as sysdba 成功
用sqldeveloper 连接
欢迎大家交流。