如何在linux下安装Oracle 客户端
来源:互联网 发布:python中异常处理 编辑:程序博客网 时间:2024/06/05 02:33
下载
从oracle官方网站上下载客户端和sqlplus程序。
安装
rpm -ivh oracle-instantclient-basic-11.1.0.1-1.x86_64.rpm
rpm -ivh oracle-instantclient-sqlplus-11.1.0.1-1.x86_64.rpm
配置
vim /etc/profile 添加export ORACLE_HOME=/usr/lib/oracle/11.1.0.1/client64
export ORACLE_BASE=/usr/lib/oracle/11.1.0.1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
设置好环境变量需要重启机器!
创建配置文件
在ORACLE_HOME目录下创建以下目录network/admin,并创建文件tnsnames.ora,内容如下:
vim /usr/lib/oracle/11.1.0.1/client64/network/admin/tnsnames.ora# tnsnames.ora Network Configuration File: /opt/oracle10g/u01/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.15.111)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = dmsdb)
)
)
测试
到ORACLE_HOME/bin目录下,执行命令:
[yleesun@centos bin]$ ./sqlplus zxd/zxd@ORCL
[yleesun@centos bin]$ ./sqlplus zxd/zxd@111
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 9 19:14:25 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
测试成功!
注:
如果出现以下错误:
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
说明环境变量没有生效!
- 如何在linux下安装Oracle 客户端
- 如何在linux下以RPM安装Oracle 客户端
- 在linux下安装oracle客户端
- oracle客户端在linux下安装部署
- linux下安装oracle客户端
- linux下安装oracle 客户端
- linux下安装Oracle 客户端
- linux下oracle客户端安装
- linux下安装oracle客户端
- Linux下安装oracle 客户端
- linux下安装oracle客户端
- linux下oracle客户端安装
- linux下安装oracle客户端
- linux下oracle客户端安装
- Linux下安装Oracle客户端
- 如何在linux下安装redis及客户端的连接
- linux下php安装oracle客户端 oci8
- linux RedHat X64下oracle 客户端安装
- VS.net中DirectShow Filter调试方法!~
- StringOpt
- cgi表单的处理
- 北大ACM poj1248 Safecracker
- Math.net之矩阵运算
- 如何在linux下安装Oracle 客户端
- ZK编程-创建节点+watcher(转载)
- export aborted because fatal lint errors were found
- C#线程中更改TextBox 和RichText的值
- MySQL crash:InnoDB redo log error
- android .向sdcard写入json字符串、读取json字符保存到list<类>中供调用
- 如何在linux编译和使用ACE
- [linux网络] iptables+ip route 实现双线上网流量分割
- XML string 转datagrid datatable dataset