您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關如何靜默安裝oracle11g客戶端,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
簡述:
我這里使用的版本是Oracle 11gr2 client 11.2.0.4
1.建立oraInst.loc文件
# vi /etc/oraInst.loc
inventory_loc=/u01/app/oraInventory/
inst_group=oinstall
# chmod 664 /etc/oraInst.loc
說明:這一段是在網上看到別人這么做,具體什么意思不清楚
2.修改rsp文件
# pwd
/soft/client/response
# ls
client_install.rsp netca.rsp
# cp client_install.rsp client.rsp
# vi client.rsp
主要修改client_install.rsp腳本里面幾個參數,這里非常簡單
#-------------------------------------------------------------------------------
# This variable holds the hostname of thesystem as set by the user.
# It can be used to force the installationto use an alternative
# hostname rather than using the firsthostname found on the system
# (e.g., for systems with multiplehostnames and network interfaces).
ORACLE_HOSTNAME=Ben.element (執行hostname命令查看)
#-------------------------------------------------------------------------------
# Unix group to be set for the inventorydirectory.
UNIX_GROUP_NAME=oinstall (安裝組)
#-------------------------------------------------------------------------------
# Inventory location.
INVENTORY_LOCATION=/u01/app/oraInventory (產品清單目錄)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,zh_CN (安裝語言)
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1 ($ORACLE_HOME目錄)
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
ORACLE_BASE=/u01/app/oracle ($ORACLE_BASE目錄)
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#Name : INSTALL_TYPE
#Datatype : String
#Description: Installation type of thecomponent.
#
# The following choices areavailable. The value should contain
# only one of these choices.
# - InstantClient
# - Administrator
# - Runtime
# - Custom
#
#Example : INSTALL_TYPE = "Administrator"
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator (四種選擇安裝模式,我選擇管理員模式)
#-------------------------------------------------------------------------------
#Name
#Datatype : boolean
#Description: whether or not this is anupgrade installation
#
# The following choices areavailable. The value should contain
# only one of these choices.
# - true
# - false
#
#Example : oracle.install.client.upgrading=true
#------------------------------------------------------------------------------
oracle.install.client.upgrading=false (布爾值更新,選擇false,不知道干嘛用的,估計可以不寫,但是我這里寫,也安裝成功)
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Specify the auto-updates option. It canbe one of the following:
# -MYORACLESUPPORT_DOWNLOAD
# -OFFLINE_UPDATES
# -SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=SKIP_UPDATES (跳過更新)
以上是要求選擇和配置的幾個參數
3.安裝client
$ /soft/client/runInstaller -silent -ignorePrereq -force -responseFile /oracle/app/oracle/client_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than120 MB. Actual 217203 MB Passed
Checking swap space: must be greater than150 MB. Actual 8195 MB Passed
Preparing to launch Oracle UniversalInstaller from /tmp/OraInstall2013-09-08_01-14-28PM. Please wait...[oracle@GE_GameSrv_A ~]$ [WARNING] [INS-32016] The selected Oracle homecontains directories or files.
CAUSE: The selected Oracle home contained directories or files.
ACTION: To start with an empty Oracle home, either remove its contentsor choose another location.
You can find the log of this installsession at:
/u01/app/oraInventory/logs/installActions2013-09-08_01-14-28PM.log
The installation of Oracle Client 11g wassuccessful. (客戶端成功安裝)
Please check'/u01/app/oraInventory/logs/silentInstall2013-09-08_01-14-28PM.log' for moredetails.
Successfully Setup Software. (軟件成功安裝)
-silent 表示以靜默方式安裝,不會有任何提示
-noconfig 表示不運行配置助手netca
-responseFile 表示使用哪個響應文件client_install.rsp
注意:我這里沒有使用-noconfig參數
安裝結束后,以root用戶執行$ORACLE_HOME下的root.sh(如果客戶端類型是instantClient則不用,但是我選擇instantClient安裝模式,就沒安裝成功過):
#/u01/app/oracle/product/10.2.0/client_1/root.sh
4.驗證安裝有效性
$ SQLplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production onSun Sep 8 07:54:40 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL>
5.配置tnsnames.ora
也可以直接從數據庫copy過來
# vi tnsnames.ora
# tnsnames.ora Network Configuration File:/u01/app/oracle/product/11.2.0.4/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
BEN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.8)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 8.8.8.129)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ben)
)
)
6.登入驗證
$ sqlplus scott/tiger@ben
SQL*Plus: Release 11.2.0.4.0 Production onSun Sep 8 08:27:18 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise EditionRelease 11.2.0.4.0 - 64bit Production
With the Partitioning, Automatic StorageManagement, OLAP, Data Mining
and Real Application Testing options
SQL>
結束語
雖然執行腳本靜默安裝的時候,有一點點警告,說一些環境不符合,一些條件不滿足,但是看到提示說成功安裝client,軟件成功安裝就沒問題了。
7.安裝中遇到的問題
invalid stored block lengths
invalid stored block lengths此報錯信息一般出現在oracledatabase 安裝或者upgrade patch時
造成此錯誤的原因有以下幾種
a.)下載的安裝包有問題
b.)解壓過程中出現問題
c.)傳輸過程中存在問題
解決方案
a.)重新下載DB安裝包
b.)重新解壓
c.)重新上傳到服務器中,默認開二進制傳輸
d.)restart server
這里我選擇重新上傳安裝文件,因為在上傳的過程中遇到一點問題。
8.以下是client.rsp完整信息
###############################################################################
## Copyright(c) Oracle Corporation1998,2013. All rights reserved. ##
## ##
## Specify values for the variables listedbelow to customize ##
## your installation. ##
## ##
## Each variable is associated with acomment. The comment ##
## can help to populate the variables withthe appropriate ##
## values. ##
## ##
###############################################################################
#-------------------------------------------------------------------------------
# Do not change the following systemgenerated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v11_2_0
#-------------------------------------------------------------------------------
# This variable holds the hostname of thesystem as set by the user.
# It can be used to force the installationto use an alternative
# hostname rather than using the firsthostname found on the system
# (e.g., for systems with multiplehostnames and network interfaces).
ORACLE_HOSTNAME=Ben.element
#-------------------------------------------------------------------------------
# Unix group to be set for the inventorydirectory.
UNIX_GROUP_NAME=oinstall
#-------------------------------------------------------------------------------
# Inventory location.
INVENTORY_LOCATION=/u01/app/oraInventory/
#-------------------------------------------------------------------------------
# Specify the languages in which thecomponents 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 selectany of the languages.
# Example : SELECTED_LANGUAGES=en,fr,ja
#
# Specify value as the following to selectall the languages.
# Example : SELECTED_LANGUAGES=all_langs
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,zh_CN
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
ORACLE_BASE=/u01/app/oracle
#-------------------------------------------------------------------------------
#Name : INSTALL_TYPE
#Datatype : String
#Description: Installation type of thecomponent.
#
# The following choices areavailable. The value should contain
# only one of these choices.
# - InstantClient
# - Administrator
# - Runtime
# - Custom
#
#Example : INSTALL_TYPE = "Administrator"
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator
#-------------------------------------------------------------------------------
#Name : oracle.install.client.upgrading
#Datatype : boolean
#Description: whether or not this is anupgrade installation
#
# The following choices areavailable. The value should contain
# only one of these choices.
# - true
# - false
#
#Example : oracle.install.client.upgrading=true
#------------------------------------------------------------------------------
oracle.install.client.upgrading=false
#------------------------------------------------------------------------------
# Name : oracle.install.client.customComponents
# Datatype : StringList
#
# This property is considered only ifINSTALL_TYPE is set to "Custom"
#
# Description: List of Client Componentsyou would like to install
#
# The following choices are available. You may specify any
# combination of these choices. Thecomponents you choose should
# be specified in the form "internal-component-name:version"
# Below is a list of components you may specify to install.
#
# oracle.sqlj:11.2.0.4.0 -- "OracleSQLJ"
# oracle.rdbms.util:11.2.0.4.0 --"Oracle Database Utilities"
# oracle.Javavm.client:11.2.0.4.0 --"Oracle Java Client"
# oracle.sqlplus:11.2.0.4.0 --"SQL*Plus"
# oracle.dbjava.jdbc:11.2.0.4.0 --"Oracle JDBC/THIN Interfaces"
# oracle.ldap.client:11.2.0.4.0 --"Oracle Internet Directory Client"
# oracle.rdbms.oci:11.2.0.4.0 --"Oracle Call Interface (OCI)"
# oracle.precomp:11.2.0.4.0 -- "OracleProgrammer"
# oracle.xdk:11.2.0.4.0 -- "Oracle XMLDevelopment Kit"
# oracle.network.aso:11.2.0.4.0 --"Oracle Advanced Security"
# oracle.assistants.oemlt:11.2.0.4.0 --"Enterprise Manager Minimal Integration"
# oracle.oraolap.mgmt:11.2.0.4.0 --"OLAP Analytic Workspace Manager and Worksheet"
# oracle.network.client:11.2.0.4.0 --"Oracle Net"
# oracle.network.cman:11.2.0.4.0 --"Oracle Connection Manager"
# oracle.network.listener:11.2.0.4.0 --"Oracle Net Listener"
# oracle.ordim.client:11.2.0.4.0 --"Oracle Multimedia Client Option"
# oracle.odbc:11.2.0.4.0 -- "OracleODBC Driver"
# oracle.has.client:11.2.0.4.0 -- "OracleClusterware High Availability API"
# oracle.dbdev:11.2.0.4.0 -- "OracleSQL Developer"
# oracle.rdbms.scheduler:11.2.0.4.0 --"Oracle Scheduler Agent"
#
#-------------------------------------------------------------------------------
oracle.install.client.customComponents="oracle.sqlj:11.2.0.4.0","oracle.rdbms.util:11.2.0.4.0","oracle.javavm.client:11.2.0.4.0","oracle.sqlplus:11.2.0.4.0","oracle.dbjava.jdbc:11.2.0.4.0","oracle.ldap.client:11.2.0.4.0","oracle.rdbms.oci:11.2.0.4.0","oracle.precomp:11.2.0.4.0","oracle.xdk:11.2.0.4.0","oracle.network.aso:11.2.0.4.0","oracle.assistants.oemlt:11.2.0.4.0","oracle.oraolap.mgmt:11.2.0.4.0","oracle.network.client:11.2.0.4.0","oracle.network.cman:11.2.0.4.0","oracle.network.listener:11.2.0.4.0","oracle.ordim.client:11.2.0.4.0","oracle.odbc:11.2.0.4.0","oracle.has.client:11.2.0.4.0","oracle.dbdev:11.2.0.4.0","oracle.rdbms.scheduler:11.2.0.4.0"
#-------------------------------------------------------------------------------
# Host name to be used for by the Oracle SchedulerAgent.
# This needs to be entered in caseoracle.rdbms.scheduler is selected in the
# list of custom components during custominstall
#
# Example : oracle.install.client.schedulerAgentHostName = acme.domain.com
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentHostName=
#------------------------------------------------------------------------------
# Port number to be used for by the OracleScheduler Agent.
# This needs to be entered in caseoracle.rdbms.scheduler is selected in the
# list of custom components during custominstall
#
# Example:oracle.install.client.schedulerAgentPortNumber = 1500
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentPortNumber=
#------------------------------------------------------------------------------
# Specify the auto-updates option. It canbe one of the following:
# -MYORACLESUPPORT_DOWNLOAD
# -OFFLINE_UPDATES
# -SKIP_UPDATES
#------------------------------------------------------------------------------
oracle.installer.autoupdates.option=SKIP_UPDATES
#------------------------------------------------------------------------------
# In case MYORACLESUPPORT_DOWNLOAD optionis 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 AccountUsername 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 AccountUsername password which has the patches download privileges
# to be used for software updates.
#
# Example : AUTOUPDATES_MYORACLESUPPORT_PASSWORD=password
#------------------------------------------------------------------------------
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
#------------------------------------------------------------------------------
# Specify the Proxy server name. Lengthshould be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#------------------------------------------------------------------------------
PROXY_HOST=
#------------------------------------------------------------------------------
# Specify the proxy port number. Should beNumeric and at least 2 chars.
#
# Example : PROXY_PORT=25
#------------------------------------------------------------------------------
PROXY_PORT=
#------------------------------------------------------------------------------
# Specify the proxy user name. LeavePROXY_USER and PROXY_PWD
# blank if your proxy server requires noauthentication.
#
# Example : PROXY_USER=username
#------------------------------------------------------------------------------
PROXY_USER=
#------------------------------------------------------------------------------
# Specify the proxy password. LeavePROXY_USER and PROXY_PWD
# blank if your proxy server requires noauthentication.
#
# Example : PROXY_PWD=password
#------------------------------------------------------------------------------
PROXY_PWD=
#------------------------------------------------------------------------------
# Specify the proxy realm.
#
# Example : PROXY_REALM=metalink
#------------------------------------------------------------------------------
PROXY_REALM=
關于“如何靜默安裝oracle11g客戶端”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。