如何在linux下安装Oracle 客户端
1个回答
2016-11-14 · 行业引领,齐商共赢,开拓创新
关注
展开全部
linux下安装Oracle客户端步骤如下:
1、下载
从Oracle官方网站上下载客户端和sqlplus程序。
以root用户安装
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
2、配置
vim/etc/profile 添加
exportORACLE_HOME=/usr/lib/oracle/11.1.0.1/client64
exportORACLE_BASE=/usr/lib/oracle/11.1.0.1
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
exportNLS_LANG=AMERICAN_AMERICA.AL32UTF8
设置好环境变量需要重启机器!
3、创建配置文件
在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.
111 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.15.111)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dmsdb)
)
)
4、测试
到ORACLE_HOME/bin目录下,执行命令:
[yleesun@centosbin]$ ./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 objectfile: No such file or directory
说明环境变量没有生效!
1、下载
从Oracle官方网站上下载客户端和sqlplus程序。
以root用户安装
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
2、配置
vim/etc/profile 添加
exportORACLE_HOME=/usr/lib/oracle/11.1.0.1/client64
exportORACLE_BASE=/usr/lib/oracle/11.1.0.1
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
exportNLS_LANG=AMERICAN_AMERICA.AL32UTF8
设置好环境变量需要重启机器!
3、创建配置文件
在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.
111 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.15.111)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dmsdb)
)
)
4、测试
到ORACLE_HOME/bin目录下,执行命令:
[yleesun@centosbin]$ ./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 objectfile: No such file or directory
说明环境变量没有生效!
名片
2024-10-28 广告
2024-10-28 广告
Altair HyperWorks是一套功能强大的集成化CAE(计算机辅助工程)软件平台,由Altair公司开发。它涵盖了结构分析、流体动力学、优化、多体动力学、电磁场仿真等多个领域,提供了丰富的仿真工具和优化算法。HyperWorks以其...
点击进入详情页
本回答由名片提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询