Linux上安装oracle客户端instantclient-11.2.0.4.0的笔记



从这里http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html下载以下三个文件

 

instantclient-basic-linux.x64-11.2.0.4.0.zip

instantclient-sdk-linux.x64-11.2.0.4.0.zip

instantclient-sqlplus-linux.x64-11.2.0.4.0.zip

 

新建并复制到oracle文件夹下,自然解压后,会生成“instantclient_11_2”目录,basicsqlplus会在其根下,而sdk会在其下生成“sdk”目录;在其下建立目录“/network/admin”,创建文件:“tnsnames.ora”,并添加:

ORCL =

 (DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.232.1)(PORT = 1521))

   (CONNECT_DATA =

     (SERVER = DEDICATED)

     (SERVICE_NAME = orcl)

   )

 )

配置:”sudo gedit /etc/profile”

 

export ORACLE_HOME=/home/u/oracle/instantclient_11_2

export PATH=$ORACLE_HOME:$PATH

export TNS_ADMIN=$ORACLE_HOME/network/admin

export LD_LIBRARY_PATH=$ORACLE_HOME:$LD_LIBRARY_PATH

export NLS_LANG= 'SIMPLIFIEDCHINESE_CHINA.AL32UTF8'

 运行:“source /etc/profile”使之生效

运行命令:sqlplus

sqlplus: error while loading sharedlibraries: libaio.so.1: cannot open shared object file: No such file ordirectory

解决方法:执行如下命令:sudo apt-get install libaio*。问题解决

执行:sqlplus /nolog

结果:

u@ubuntu:~$ sqlplus /nolog

 

SQL*Plus: Release 11.2.0.4.0 Production on星期二 3 31 23:35:222015

 

Copyright (c) 1982, 2013, Oracle. All rights reserved.

 

SQL>


注:登陆示例:scott/tigger@test




你可能感兴趣的:(数据库/oracle)