1、图形化界面安装参见我这篇文章:
http://blog.csdn.net/kadwf123/article/details/79602082
2、注意上篇图形化界面安装操作系统是centos6.4,本次实验环境是redhat7.3,所以安装的依赖包不同。
3、文章中前11步基本一致。
4、本次安装介质所在的目录:
/home/oracle
解压后的目录:
/home/oracle/client
5、在oracle官方提供的安装介质zip文件中,解压后会有个默认的静默安装响应文件,默认就是/home/oracle/client/response/client_install.rsp文件,内容如下:
[oracle@myclient response]$ cat client_install.rsp
###############################################################################
## Copyright(c) Oracle Corporation 1998,2008. 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. ##
## ##
###############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_clientinstall_response_schema_v11_2_0
#-------------------------------------------------------------------------------
# This variable holds the hostname of the system as set by the user.
# 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=myclient
#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
UNIX_GROUP_NAME=oinstall
#-------------------------------------------------------------------------------
# Inventory location.
INVENTORY_LOCATION=/u01/app/oraInventory
#-------------------------------------------------------------------------------
# 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
#
# Example : SELECTED_LANGUAGES=en,fr,ja
#-------------------------------------------------------------------------------
SELECTED_LANGUAGES=en,zh_CN
#-------------------------------------------------------------------------------
# Complete path of the Oracle Home
ORACLE_HOME=/u01/app/oracle/db_home_2
#-------------------------------------------------------------------------------
# Complete path of the Oracle Base.
ORACLE_BASE=/u01/app/oracle
#-------------------------------------------------------------------------------
#Name : INSTALL_TYPE
#Datatype : String
#Description: Installation type of the component.
#
# The following choices are available. The value should contain
# only one of these choices.
# InstantClient : InstantClient
# Administrator : Administrator
# Runtime : Runtime
# Custom : Custom
#
#Example : INSTALL_TYPE = "Administrator"
#------------------------------------------------------------------------------
oracle.install.client.installType=Administrator
#-------------------------------------------------------------------------------
# Name : oracle.install.client.customComponents
# Datatype : StringList
#
# This property is considered only if INSTALL_TYPE is set to "Custom"
#
# Description: List of Client Components you would like to install
#
# 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 install.
#
# oracle.sqlj:11.2.0.1.0 -- "Oracle SQLJ"
# oracle.rdbms.util:11.2.0.1.0 -- "Oracle Database Utilities"
# oracle.javavm.client:11.2.0.1.0 -- "Oracle Java Client"
# oracle.sqlplus:11.2.0.1.0 -- "SQL*Plus"
# oracle.dbjava.jdbc:11.2.0.1.0 -- "Oracle JDBC/THIN Interfaces"
# oracle.ldap.client:11.2.0.1.0 -- "Oracle Internet Directory Client"
# oracle.rdbms.oci:11.2.0.1.0 -- "Oracle Call Interface (OCI)"
# oracle.precomp:11.2.0.1.0 -- "Oracle Programmer"
# oracle.xdk:11.2.0.1.0 -- "Oracle XML Development Kit"
# oracle.network.aso:11.2.0.1.0 -- "Oracle Advanced Security"
# oracle.assistants.oemlt:11.2.0.1.0 -- "Enterprise Manager Minimal Integration"
# oracle.oraolap.mgmt:11.2.0.1.0 -- "OLAP Analytic Workspace Manager and Worksheet"
# oracle.network.client:11.2.0.1.0 -- "Oracle Net"
# oracle.network.cman:11.2.0.1.0 -- "Oracle Connection Manager"
# oracle.network.listener:11.2.0.1.0 -- "Oracle Net Listener"
# oracle.ordim.client:11.2.0.1.0 -- "Oracle Multimedia Client Option"
# oracle.ons:11.2.0.0.0 -- "Oracle Notification Service"
# oracle.odbc:11.2.0.1.0 -- "Oracle ODBC Driver"
# oracle.has.client:11.2.0.1.0 -- "Oracle Clusterware High Availability API"
# oracle.dbdev:11.2.0.1.0 -- "Oracle SQL Developer"
# oracle.rdbms.scheduler:11.2.0.1.0 -- "Oracle Scheduler Agent"
#
#-------------------------------------------------------------------------------
oracle.install.client.customComponents="oracle.sqlj:11.2.0.1.0","oracle.rdbms.util:11.2.0.1.0","oracle.javavm.client:11.2.0.1.0","oracle.sqlplus:11.2.0.1.0","oracle.dbjava.jdbc:11.2.0.1.0","oracle.ldap.client:11.2.0.1.0","oracle.rdbms.oci:11.2.0.1.0","oracle.precomp:11.2.0.1.0","oracle.xdk:11.2.0.1.0","oracle.network.aso:11.2.0.1.0","oracle.assistants.oemlt:11.2.0.1.0","oracle.oraolap.mgmt:11.2.0.1.0","oracle.network.client:11.2.0.1.0","oracle.network.cman:11.2.0.1.0","oracle.network.listener:11.2.0.1.0","oracle.ordim.client:11.2.0.1.0","oracle.ons:11.2.0.0.0","oracle.odbc:11.2.0.1.0","oracle.has.client:11.2.0.1.0","oracle.dbdev:11.2.0.1.0","oracle.rdbms.scheduler:11.2.0.1.0"
#-------------------------------------------------------------------------------
#Name : MTS_PORT
#Datatype : int
#Description: Port number to be used for by the Oracle MTS Recovery Service to listen
# for requests. This needs to be entered in case oracle.ntoramts is
# selected in the list of custom components in custom install
#
#
#Example : MTS_PORT = 2030
#------------------------------------------------------------------------------
oracle.install.client.oramtsPortNumber=
#------------------------------------------------------------------------------
# Host name to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example : oracle.install.client.schedulerAgentHostName = acme.domain.com
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentHostName=
#------------------------------------------------------------------------------
# Port number to be used for by the Oracle Scheduler Agent.
# This needs to be entered in case oracle.rdbms.scheduler is selected in the
# list of custom components during custom install
#
# Example: oracle.install.client.schedulerAgentPortNumber = 1500
#------------------------------------------------------------------------------
oracle.install.client.schedulerAgentPortNumber=
上面看起来内容较多,实际上主要就根据实际环境修改了这些值,其他默认或不填即可:
ORACLE_HOSTNAME=myclient
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/db_home_2
ORACLE_BASE=/u01/app/oracle
oracle.install.client.installType=Administrator
说明:
ORACLE_HOSTNAME就是主机名,可以通过hostname得到:
UNIX_GROUP_NAME产品清单目录的所属组,即下面这个目录的所属组:
SELECTED_LANGUAGES客户端支持的语言。
ORACLE_HOME和ORACLE_BASE按照上面oracle用户配置的环境变量来设置一致即可。
oracle.install.client.installType指客户端的安装类型,Administrator类型是三种类型中最完全的安装。
切换到解压目录下,执行下面的命令静默安装客户端:
cd /home/oracle/client
./runInstaller -silent -responseFile /home/oracle/client/response/client_install.rsp
6、等待命令执行完成,如果有失败,请检查对应的输出日志。安装完成后,使用root用户执行两个root脚本:
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/db_home_2/root.sh
7、最后确定proc命令是否可用即可。
[oracle@myclient app]$ proc
Pro*C/C++: Release 11.2.0.1.0 - Production on Wed Mar 21 22:32:06 2018
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /u01/app/oracle/db_home_2/precomp/admin/pcscfg.cfg
Option Name Current Value Description
-------------------------------------------------------------------------------
auto_connect no Allow automatic connection to ops$ account
char_map charz Mapping of character arrays and strings
close_on_commitno Close all cursors on COMMIT
cmax 100 CMAX Value for connection pool
cmin 2 CMIN Value for connection pool
cincr 1 CINCR Value for connection pool
ctimeout 0 CTIMEOUT Value for connection pool
cnowait 0 CNOWAIT Value for connection pool
common_parser no Parse using Common SQL Front End
code kr_c The type of code to be generated
comp_charset multi_byte The character set type the C compiler supports
config default Override system configuration file with another
cpool no Support connection pooling
cpp_suffix *none* Override the default C++ filename suffix
db2_array no Support DB2 array insert/select syntax
dbms native v6/v7/v8 compatibility mode
def_sqlcode no Generate '#define SQLCODE sqlca.sqlcode' macro
define __x86_64__ Define a preprocessor symbol
*none*
duration transaction Set pin duration for objects in the cache
dynamic oracle Specify Oracle or ANSI Dynamic SQL Semantics
errors yes Whether error messages are sent to the terminal
errtype *none* Name of the list file for intype file errors
events no Support publish-subscribe event notifications
fips none FIPS flagging of ANSI noncompliant usage
header *none* Specify file extension for Precompiled Headers
hold_cursor no Control holding of cursors in the cursor cache
implicit_svpt no Implicit savepoint prior to buffered insert
iname *none* The name of the input file
include *none* Directory paths for included files
intype *none* The name of the input file for type information
lines no Add #line directives to the generated code
lname *none* Override default list file name
ltype short The amount of data generated in the list file
maxliteral 1024 Maximum length of a generated string literal
maxopencursors 10 Maximum number of cached open cursors
max_row_insert 0 Maximum number of rows to buffer on insert
mode oracle Code conformance to Oracle or ANSI rules
native_types no Support for native float/double
nls_char *none* Specify National Language character variables
nls_local no Control how NLS character semantics are done
objects yes Support object types
oname *none* The name of the output file
oraca no Control the use of the ORACA
outline no Category in which Outlines are created
[yes/no/]
outlnprefix *none* Outline name prefix
pagelen 80 The page length of the list file
parse full Control which non-SQL code is parsed
prefetch 1 Number of rows pre-fetched at cursor OPEN time
release_cursor no Control release of cursors from cursor cache
runoutline no If yes, create Outlines in the Database
select_error yes Control flagging of select errors
sqlcheck syntax Amount of compile-time SQL checking
stmt_cache 0 Size of statement cache
sys_include /usr/lib64/gcc/Directory where system header files are found
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/include
/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include
/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/include
/usr/include
$ORACLE_HOME/precomp/public
threads no Indicates a multi-threaded application
type_code oracle Use Oracle or ANSI type codes for Dynamic SQL
unsafe_null no Allow a NULL fetch without indicator variable
userid *none* A username/password [@dbname] connect string
utf16_charset nchar_charset The character set form used by UTF16 variables
varchar no Allow the use of implicit varchar structures
version recent Which version of an object is to be returned
PCC-F-02135, CMD-LINE: User asked for help
[oracle@myclient app]$
8、测试sqlplus可用性: