0

0

ORACLE 11G静默安装

php中文网

php中文网

发布时间:2016-06-07 15:24:49

|

1837人浏览过

|

来源于php中文网

原创

今天拿了一台虚拟机测试,进行静默安装oracle 11g,前期的准备工作(创建组,用户,配置内核参数,配置环境变量,依赖包,创建目录等)跟图形化界面安装一样,这里就不再重复了,下面就直接配置静默安装相关的文件。 STP1:修改软件安装响应文件db_install.r

今天拿了一台虚拟机测试,进行静默安装oracle 11g,前期的准备工作(创建组,用户,配置内核参数,配置环境变量,依赖包,创建目录等)跟图形化界面安装一样,这里就不再重复了,下面就直接配置静默安装相关的文件。


小麦企业网站展示系统1.1
小麦企业网站展示系统1.1

小麦企业网站展示系统介绍:一、安装使用将xiaomai.sql导入数据库二、后台登录后台帐号,密码默认都是admin,config.php 配置文件可根据自行需要修改,IP地址,数据库用户名,密码,及表名后台目录默认admin,支持自行任意修改目录名三、注意事项1 本源码完全免费,采用伪静态,减少不必要的源码重复,速度更快,支持二次开发。2、注明本程序编码为UTF8,如发生乱码,请注意修改编码3、

下载

STP1:修改软件安装响应文件db_install.rsp (在oracle解压缩安装文件的 /database/response目录下面)

####################################################################
## Copyright(c) Oracle Corporation 1998,2011. All rights reserved.##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.							  ##
##                                                                ##
## IMPORTANT NOTE: This file contains plain text passwords and    ##
## should be secured to have read permission only by oracle user  ##
## or db administrator who owns this installation.                ##
##                                                                ##
####################################################################

#------------------------------------------------------------------------------
# Do not change the following system generated value. 
#------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

#------------------------------------------------------------------------------
# Specify the installation option.
# It can be one of the following:
# 1. INSTALL_DB_SWONLY
# 2. INSTALL_DB_AND_CONFIG
# 3. UPGRADE_DB
#-------------------------------------------------------------------------------
oracle.install.option=INSTALL_DB_SWONLY

#-------------------------------------------------------------------------------
# Specify the hostname of the system as set during the install. It can be used
# to force the installation to use an alternative hostname rather than using the
# first hostname found on the system. (e.g., for systems with multiple hostnames 
# and network interfaces)
#-------------------------------------------------------------------------------
ORACLE_HOSTNAME=localhost.localdomain

#-------------------------------------------------------------------------------
# Specify the Unix group to be set for the inventory directory.  
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=oinstall

#-------------------------------------------------------------------------------
# Specify the location which holds the inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=/u01/app/oracle/oraInventory

#-------------------------------------------------------------------------------
# Specify the languages in which the components will be installed.             
# 
# en   : English                  ja   : Japanese                  
# fr   : French                   ko   : Korean                    
# ar   : Arabic                   es   : Latin American Spanish    
# bn   : Bengali                  lv   : Latvian                   
# pt_BR: Brazilian Portuguese     lt   : Lithuanian                
# bg   : Bulgarian                ms   : Malay                     
# fr_CA: Canadian French          es_MX: Mexican Spanish           
# ca   : Catalan                  no   : Norwegian                 
# hr   : Croatian                 pl   : Polish                    
# cs   : Czech                    pt   : Portuguese                
# da   : Danish                   ro   : Romanian                  
# nl   : Dutch                    ru   : Russian                   
# ar_EG: Egyptian                 zh_CN: Simplified Chinese        
# en_GB: English (Great Britain)  sk   : Slovak                    
# et   : Estonian                 sl   : Slovenian                 
# fi   : Finnish                  es_ES: Spanish                   
# de   : German                   sv   : Swedish                   
# el   : Greek                    th   : Thai                      
# iw   : Hebrew                   zh_TW: Traditional Chinese       
# hu   : Hungarian                tr   : Turkish                   
# is   : Icelandic                uk   : Ukrainian                 
# in   : Indonesian               vi   : Vietnamese                
# it   : Italian                                                   
#
# all_langs   : All languages
#
# Specify value as the following to select any of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to select all the languages.
# Example : SELECTED_LANGUAGES=all_langs  
#------------------------------------------------------------------------------
SELECTED_LANGUAGES=en

#------------------------------------------------------------------------------
# Specify the complete path of the Oracle Home.
#------------------------------------------------------------------------------
ORACLE_HOME=/u01/app/oracle

#------------------------------------------------------------------------------
# Specify the complete path of the Oracle Base. 
#------------------------------------------------------------------------------
ORACLE_BASE=/u01/app

#------------------------------------------------------------------------------
# Specify the installation edition of the component.                        
#                                                             
# The value should contain only one of these choices.        
# EE     : Enterprise Edition                                
# SE     : Standard Edition                                  
# SEONE  : Standard Edition One
# PE     : Personal Edition (WINDOWS ONLY)
#------------------------------------------------------------------------------
oracle.install.db.InstallEdition=EE

#------------------------------------------------------------------------------
# This variable is used to enable or disable custom install and is considered
# only if InstallEdition is EE.
#
# true  : Components mentioned as part of 'optionalComponents' property
#         are considered for install.
# false : Value for 'optionalComponents' is not considered.
#------------------------------------------------------------------------------
oracle.install.db.EEOptionsSelection=false

#------------------------------------------------------------------------------
# This variable is considered only if 'EEOptionsSelection' is set to true. 
#
# Description: List of Enterprise Edition Options you would like to enable.
#
#              The following choices are available. You may specify any
#              combination of these choices.  The components you choose should
#              be specified in the form "internal-component-name:version"
#              Below is a list of components you may specify to enable.
#        
#              oracle.oraolap:11.2.0.3.0 - Oracle OLAP
#              oracle.rdbms.dm:11.2.0.3.0 - Oracle Data Mining
#              oracle.rdbms.dv:11.2.0.3.0 - Oracle Database Vault
#              oracle.rdbms.lbac:11.2.0.3.0 - Oracle Label Security
#              oracle.rdbms.partitioning:11.2.0.3.0 - Oracle Partitioning
#              oracle.rdbms.rat:11.2.0.3.0 - Oracle Real Application Testing
#------------------------------------------------------------------------------
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.3.0,oracle.oraolap:11.2.0.3.0,oracle.rdbms.dm:11.2.0.3.0,oracle.rdbms.dv:11.2.0.3.0,oracle.rdbms.lbac:11.2.0.3.0,oracle.rdbms.rat:11.2.0.3.0

###############################################################################
#                                                                             #
# PRIVILEGED OPERATING SYSTEM GROUPS                                  	      #
# ------------------------------------------                                  #
# Provide values for the OS groups to which OSDBA and OSOPER privileges       #
# needs to be granted. If the install is being performed as a member of the   #		
# group "dba", then that will be used unless specified otherwise below.	      #
#                                                                             #
# The value to be specified for OSDBA and OSOPER group is only for UNIX based #
# Operating System.                                                           #
#                                                                             #
###############################################################################

#------------------------------------------------------------------------------
# The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
#------------------------------------------------------------------------------
oracle.install.db.DBA_GROUP=dba

#------------------------------------------------------------------------------
# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
# The value to be specified for OSOPER group is optional.
#------------------------------------------------------------------------------
oracle.install.db.OPER_GROUP=dba

#------------------------------------------------------------------------------
…………
#------------------------------------------------------------------------------
# Specify whether user doesn't want to configure Security Updates.
# The value for this variable should be true if you don't want to configure
# Security Updates, false otherwise. 
#
# The value can be either true or false. If left blank it will be assumed
# to be false.
#
# Example    : DECLINE_SECURITY_UPDATES=false
#------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=true

…………

红色标记就是需要手动配置的参数,由于之前没有设置参数 DECLINE_SECURITY_UPDATES(上面红色粗体),所以报了以下错误
[oracle@localhost oraInventory]$ tail 100 /tmp/OraInstall2015-02-01_11-06-39PM/installActions2015-02-01_11-06-39PM.log
tail: cannot open `100' for reading: No such file or directory
==> /tmp/OraInstall2015-02-01_11-06-39PM/installActions2015-02-01_11-06-39PM.log <==
INFO: Completed background operations
INFO: Validating state 
WARNING: My Oracle Support Username/Email Address Not Specified
SEVERE: Provide the My Oracle Support password.
INFO: Adding ExitStatus VAR_VALIDATION_FAILURE to the exit status set
WARNING: A log of this session is currently saved as: /tmp/OraInstall2015-02-01_11-06-39PM/installActions2015-02-01_11-06-39PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
INFO: Finding the most appropriate exit status for the current application
INFO: Exit Status is -2
INFO: Shutdown Oracle Database 11g Release 2 Installer
INFO: Unloading Setup Driver
将 DECLINE_SECURITY_UPDATES=true加上后就好了

STEP2:执行静默安装数据库软件

[oracle@localhost database]$ ./runInstaller -silent -force -responseFile /home/oracle/software/database/response/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 219625 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 10047 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-02-01_11-23-32PM. Please wait ...[oracle@localhost database]$ [WARNING] [INS-32016] The selected Oracle home contains directories or files.
   CAUSE: The selected Oracle home contained directories or files.
   ACTION: To start with an empty Oracle home, either remove its contents or choose another location.
[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
   CAUSE: The Central Inventory is located in the Oracle base.
   ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-13014] Target environment do not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2015-02-01_11-23-32PM/installActions2015-02-01_11-23-32PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2015-02-01_11-23-32PM/installActions2015-02-01_11-23-32PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
You can find the log of this install session at:
 /u01/app/oracle/oraInventory/logs/installActions2015-02-01_11-23-32PM.log
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oracle/oraInventory/logs/silentInstall2015-02-01_11-23-32PM.log' for more details.

As a root user, execute the following script(s):
	1. /u01/app/oracle/oraInventory/orainstRoot.sh
	2. /u01/app/oracle/root.sh
	
Successfully Setup Software.

安装完成后,用root的身份登录执行 
[root@localhost response]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@localhost response]# /u01/app/oracle/root.sh
Check /u01/app/oracle/install/root_localhost.localdomain_2015-02-01_23-30-25.log for the output of root script
[root@localhost response]# 

STEP3:配置静默安装监听的响应文件netca.rsp,配置监听程序
[oracle@localhost bin]$ ./netca /silent /responsefile /home/oracle/software/database/response/netca.rsp

STEP4:配置静默安装数据库的响应文件 dbca.rsp
[GENERAL]

#-----------------------------------------------------------------------------
# Name          : RESPONSEFILE_VERSION
# Datatype      : String
# Description   : Version of the database to create
# Valid values  : "11.1.0"
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
RESPONSEFILE_VERSION = "11.2.0"

#-----------------------------------------------------------------------------
# Name          : OPERATION_TYPE
# Datatype      : String
# Description   : Type of operation
# Valid values  : "createDatabase" \ "createTemplateFromDB" \ "createCloneTemplate" \ "deleteDatabase" \ "configureDatabase" \ "addInstance" (RAC-only) \ "deleteInstance" (RAC-only)
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
OPERATION_TYPE = "createDatabase"


#-----------------------------------------------------------------------------
[CREATEDATABASE]

#-----------------------------------------------------------------------------
# Name          : GDBNAME
# Datatype      : String
# Description   : Global database name of the database
# Valid values  : . - when database domain isn't NULL
#                              - when database domain is NULL
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
GDBNAME = "orcl.localdomain"

#-----------------------------------------------------------------------------

…………
#-----------------------------------------------------------------------------
# Name          : SID
# Datatype      : String
# Description   : System identifier (SID) of the database
# Valid values  : Check Oracle11g Administrator's Guide
# Default value :  specified in GDBNAME
# Mandatory     : No
#-----------------------------------------------------------------------------
SID = "orcl11g"

#-----------------------------------------------------------------------------
# Name          : NODELIST
# Datatype      : String
# Description   : Comma-separated list of cluster nodes
# Valid values  : Cluster node names
# Default value : None
# Mandatory     : No (Yes for RAC database-centric database )
#-----------------------------------------------------------------------------
#NODELIST=

#-----------------------------------------------------------------------------
# Name          : TEMPLATENAME
# Datatype      : String
# Description   : Name of the template
# Valid values  : Template file name
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
TEMPLATENAME = "General_Purpose.dbc"
#-----------------------------------------------------------------------------
# Name          : OBFUSCATEDPASSWORDS
# Datatype      : Boolean
# Description   : Set to true if passwords are encrypted
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
#OBFUSCATEDPASSWORDS = FALSE


#-----------------------------------------------------------------------------
# Name          : SYSPASSWORD
# Datatype      : String
# Description   : Password for SYS user
# Valid values  : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
SYSPASSWORD = "123456"

#-----------------------------------------------------------------------------
# Name          : SYSTEMPASSWORD
# Datatype      : String
# Description   : Password for SYSTEM user
# Valid values  : Check Oracle11g Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
SYSTEMPASSWORD = "123456"

…………

#-----------------------------------------------------------------------------
# Name          : DATAFILEDESTINATION 
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Directory for all the database files
# Default value : $ORACLE_BASE/oradata
# Mandatory     : No
#-----------------------------------------------------------------------------
DATAFILEDESTINATION =/u01/app/oradata


#-----------------------------------------------------------------------------
# Name          : CHARACTERSET
# Datatype      : String
# Description   : Character set of the database
# Valid values  : Check Oracle11g National Language Support Guide
# Default value : "US7ASCII"
# Mandatory     : NO
#-----------------------------------------------------------------------------
CHARACTERSET = "ZHS16GBK"



#-----------------------------------------------------------------------------
# Name          : TOTALMEMORY
# Datatype      : String
# Description   : total memory in MB to allocate to Oracle
# Valid values  : 
# Default value : 
# Mandatory     : NO
#-----------------------------------------------------------------------------
TOTALMEMORY = "1024"

在这些配置参数中,有个需要特别说明一下GDBNAME = "orcl.localdomain" 在配置GDBNAME时,以为只是配置全局数据库名,所以就将值配置为“orcl”,结果在静默安装时,xshell的安装界面直接空白,什么都没有,不知道问题出在哪里,于是将响应文件dbca.rsp再重新看了一下,发先GDBNAME后面还需要一个域名
[root@localhost response]# hostname
localhost.localdomain

查看了一下域名,所以将 GDBNAME = "orcl.localdomain" 再执行静默安装,就OK了

[oracle@localhost bin]$ ./dbca -silent -responseFile /home/oracle/software/database/response/dbca.rsp                                                                                          
Copying database files                                                                                                                                                                         
1% complete                                                                                                                                                                                    
3% complete                                                                                                                                                                                    
11% complete                                                                                                                                                                                   
18% complete                                                                                                                                                                                   
26% complete                                                                                                                                                                                   
37% complete                                                                                                                                                                                   
Creating and starting Oracle instance                                                                                                                                                          
40% complete                                                                                                                                                                                   
45% complete                                                                                                                                                                                   
50% complete                                                                                                                                                                                   
55% complete                                                                                                                                                                                   
56% complete                                                                                                                                                                                   
60% complete                                                                                                                                                                                   
62% complete                                                                                                                                                                                   
Completing Database Creation                                                                                                                                                                   
66% complete                                                                                                                                                                                   
70% complete                                                                                                                                                                                   
73% complete                                                                                                                                                                                   
85% complete                                                                                                                                                                                   
96% complete                                                                                                                                                                                   
100% complete                                                                                                                                                                                  
Look at the log file "/u01/app/cfgtoollogs/dbca/orcl/orcl.log" for further details.   

至此,oracle 11g的静默安装已经完成!






相关专题

更多
php源码安装教程大全
php源码安装教程大全

本专题整合了php源码安装教程,阅读专题下面的文章了解更多详细内容。

65

2025.12.31

php网站源码教程大全
php网站源码教程大全

本专题整合了php网站源码相关教程,阅读专题下面的文章了解更多详细内容。

43

2025.12.31

视频文件格式
视频文件格式

本专题整合了视频文件格式相关内容,阅读专题下面的文章了解更多详细内容。

35

2025.12.31

不受国内限制的浏览器大全
不受国内限制的浏览器大全

想找真正自由、无限制的上网体验?本合集精选2025年最开放、隐私强、访问无阻的浏览器App,涵盖Tor、Brave、Via、X浏览器、Mullvad等高自由度工具。支持自定义搜索引擎、广告拦截、隐身模式及全球网站无障碍访问,部分更具备防追踪、去谷歌化、双内核切换等高级功能。无论日常浏览、隐私保护还是突破地域限制,总有一款适合你!

41

2025.12.31

出现404解决方法大全
出现404解决方法大全

本专题整合了404错误解决方法大全,阅读专题下面的文章了解更多详细内容。

204

2025.12.31

html5怎么播放视频
html5怎么播放视频

想让网页流畅播放视频?本合集详解HTML5视频播放核心方法!涵盖<video>标签基础用法、多格式兼容(MP4/WebM/OGV)、自定义播放控件、响应式适配及常见浏览器兼容问题解决方案。无需插件,纯前端实现高清视频嵌入,助你快速打造现代化网页视频体验。

9

2025.12.31

关闭win10系统自动更新教程大全
关闭win10系统自动更新教程大全

本专题整合了关闭win10系统自动更新教程大全,阅读专题下面的文章了解更多详细内容。

8

2025.12.31

阻止电脑自动安装软件教程
阻止电脑自动安装软件教程

本专题整合了阻止电脑自动安装软件教程,阅读专题下面的文章了解更多详细教程。

3

2025.12.31

html5怎么使用
html5怎么使用

想快速上手HTML5开发?本合集为你整理最实用的HTML5使用指南!涵盖HTML5基础语法、主流框架(如Bootstrap、Vue、React)集成方法,以及无需安装、直接在线编辑运行的平台推荐(如CodePen、JSFiddle)。无论你是新手还是进阶开发者,都能轻松掌握HTML5网页制作、响应式布局与交互功能开发,零配置开启高效前端编程之旅!

2

2025.12.31

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
SQL 教程
SQL 教程

共61课时 | 3.2万人学习

Java 教程
Java 教程

共578课时 | 40.3万人学习

oracle知识库
oracle知识库

共0课时 | 0人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号