linux安装oracleclient

Posted mthoutai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux安装oracleclient相关的知识,希望对你有一定的参考价值。

1、准备好所须要的安装包,http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html这个网址有各种操作系统的客户端

oracle-instantclient-basic-10.2.0.5-1.i386.rpm
oracle-instantclient-devel-10.2.0.5-1.i386.rpm
oracle-instantclient-jdbc-10.2.0.5-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm

先安装oracle-instantclient-basic-10.2.0.5-1.i386.rpm。其它依次安装

2、创建用户、组和文件夹

[[email protected] oracle]# groupadd oinstall
[[email protected] oracle]# groupadd dba
[[email protected] oracle]# useradd -g oinstall -G dba oracle    
[[email protected] oracle]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[[email protected] oracle]# mkdir -p /home/oracle/network/admin
[[email protected] oracle]# chown -R oracle:oinstall /home/oracle
[[email protected] oracle]# chmod -R 755 /home/oracle

// 3、将oracleserver上面的tnsnames.ora拷贝出来。放到/home/oracle/network/admin文件夹以下。

这一步骤能够不须要
4、改动环境变量

[[email protected] ~]$ vi .bash_profile

export ORACLE_HOME=/home/oracle
export SQLPATH=/home/oracle/network/admin
export TNS_ADMIN=/home/oracle/network/admin
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.5/client/lib/:/usr/lib/oracle/10.2.0.5/client/lib:$LD_LIBRARY_PA
TH
export PATH=$PATH:$ORACLE_HOME:$LD_LIBRARY_PATH

[[email protected] ~]$ source .bash_profile 环境变量马上生效

5、能够正常连接oracleserver了

[[email protected] ~]$ sqlplus zhgy/[email protected]/orcl

 






















以上是关于linux安装oracleclient的主要内容,如果未能解决你的问题,请参考以下文章

安装plsql

免安装Oracleclient和PL/SQL

百度文库,linux下安装oracle客户端

Oracle Client安装报错

Linux查看文件安装路径与文件所在路径

oracle linux 安装Oracle Database 11gR2