linux如何安装oracle客户端?
linux安装oracle客户端的方法:
1,首先oracle官网下载安装包:
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
根据访问数据的版本下载对应客户端。每种包又分.zip、.rpm两种格式包,zip包相当于解压后免安装版,rpm包需要安装版。
2,安装解压缩到/usr/local/oracle
unzip instantclient-basic-linux.x64-11.2.0.4.0.zip
unzip instantclient-sqlplus-linux.x64-11.2.0.4.0.zip
生成目录/usr/local/oracle/instantclient_11_2
3,在上述目录新建 mkdir -p ./network/admin
生成目录/usr/local/oracle/instantclient_11_2/network/admin
4,在上述目录新建tnsnames.ora文件,并编辑数据库连接信息
history_162 = (description = (address = (protocol = tcp)(host = 10.1.197.1)(port = 1521)) (connect_data = (server = dedicated) (sid =xxx) ) )
5,配置环境变量
vi .bash_profile
export oracle_home=/usr/local/oracle/instantclient_11_2export tns_admin=$oracle_home/network/admin##export nls_lang=american_america.zhs16gbkexport nls_lang=american_america.al32utf8export ld_library_path=$oracle_homeexport path=$oracle_home:$path
source .bash_profile
6,测试数据库连接
sqlplus username/passwd@history_162
推荐教程:《linux教程》
以上就是linux如何安装oracle客户端?的详细内容。
