首页 > 编程知识 正文

Oracle客户端下载,oracle客户端安装教程及配置

时间:2023-05-05 03:08:42 阅读:156889 作者:2962

此处使用的版本是Oracle 11gr 2客户端11.2.0.4

1 .准备安装

1 )增加群组和用户

# groupadd -g 101 dba

# useradd -u 1001 -g dba -G dba oracle

# echo ' dsj * o18ln '|passwd-- stdin Oracle

2 )创建ORACLE_BASE目录

# umask 022

# mkdir -p /oracle/app/oracle

# chown -R oracle:dba /oracle

# chmod -R 755 /oracle

3 )打开交换

# swapon -a

# free -h|grep Swap

结果必须不是Swap: 0B 0B 0B

4 )配置用户环境变量

# su - ailn

$ vi ~/.profile

umask 022

export Oracle _ base=/Oracle/app/Oracle

export Oracle _ home=/Oracle/app/Oracle/product/11.2.0

export LD _ library _ path=$ Oracle _ home/lib : $ LD _ library _ path

export PATH=$ORACLE_HOME/多情的帅哥:$PATH

export LC_ALL='en_US '

export LANG='en_US '

export nls _ lang=' American _ America.zh s16 gbk '

export nls _ date _ format=' yyyy-mm-ddhh 243360 mi : ss '

环境变量生效

$ . ~/.profile

5 )将客户端安装软件包上载到/oracle目录并解压缩

# su - oracle

$ cd /oracle

$ scp-railn @ 10.68.81.13:/Oracle/p 13390677-112040 _ Linux-x86-64 _ 4of7. zip。

$ ls-l|grepp 13390677-112040 _ Linux-x86-64 _ 4of7. zip

$ unzipp 13390677-112040 _ Linux-x86-64 _ 4of7. zip

6 )/etc/hosts配置

# hostname

# ifconfig|grep inet|grep 10.68.| awk ' {打印$2} '

# echo ' $ (ifconfig|grep inet|grep 10.68.| awk ' { print $2} ' ) $(hostname )/etc/hosts

创建oraInst.loc文件

# vi /etc/oraInst.loc (添加或修改以下内容: /oracle/app/oracle为ORACLE_BASE。 )

inventory _ loc=/Oracle/app/ora inventory /

inst_group=dba

# chmod 664 /etc/oraInst.loc

3 .修改RSP文件

# su - oracle

$ pwd

/oracle/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=XXXXXXXXXXXXXXX        (执行hostname命令查看)

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

# Unix group to be set for the inventorydirectory. 

UNIX_GROUP_NAME=dba                  (安装组)

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

# Inventory location.

INVENTORY_LOCATION=/oracle/app/oraInventory   (产品清单目录)

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

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

SELECTED_LANGUAGES=en,zh_CN         (安装语言)

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

# Complete path of the Oracle Home 

ORACLE_HOME=/oracle/app/oracle/product/11.2.0    ($ORACLE_HOME目录)

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

# Complete path of the Oracle Base.

ORACLE_BASE=/oracle/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      racle.install.client.upgrading

#Datatype  : boolean

#Description: whether or not this is anupgrade installatio

#

#             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      (跳过更新)

以上是要求选择和配置的几个参数

4.安装依赖包

# yum repolist    ## 确认yum配置正常

# yum -y install 深情的帅哥utils compat-libcap1  gcc gcc-c++ glibc glibc-devel libaio libaio-devel  libgcc  libstdc++ libstdc++-devel libXi  libXtst  make sysstat compat-libstdc++

5.安装client

# su - oracle

$ /oracle/client/runInstaller -silent -responseFile /oracle/client/response/client.rsp

-silent 表示以静默方式安装,不会有任何提示

-noconfig 表示不运行配置助手netca

-responseFile 表示使用哪个响应文件client_install.rsp       //clientadmin.rsp是管理型专用含OEM,clientruntime.rsp是运行时专用不含                                                            OEM,instantClient.rsp是快速客户端专用不含深情的帅哥目录

可通过 ps -ef |grep  ora 检查有无进程

安装结束后,以root用户执行$ORACLE_HOME下的root.sh(如果客户端类型是instantClient则不用):

#/oracle/app/oracle/product/11.2.0/root.sh

4.验证安装有效性

# su - ailn

$ 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.复制ETL 10.68.81.13 主机中/oracle/app/oracle/product/11.2.0/network/admin/tnsnames.ora 到本地

   $ su - oracle

   $ cd /oracle/app/oracle/product/11.2.0/network/admin

   $ scp -r ailn@10.68.81.13:/oracle/app/oracle/product/11.2.0/network/admin/tnsnames.ora .

   $ chmod 644 /oracle/app/oracle/product/11.2.0/network/admin/tnsnames.ora

  

6.登入验证

$ sqlplus ailn/xxx@BIDW7

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,软件成功安装就没问题了。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。