linux下装oracle客户端

1.、查看rpm包的默认安装路径

[root@localhost tmp]# rpm -qpl oracle-instantclient-sqlplus-10.2.0.5-1.x86_64.rpm

/usr/bin/sqlplus64

/usr/lib/oracle/10.2.0.5/client64/bin/sqlplus

/usr/lib/oracle/10.2.0.5/client64/lib/glogin.sql 

 

3个包都需要检测,为了以后便于维护,可以把instantclient都装在目录"/oracle"

2、yum install libaio //可能需要依赖

[root@localhost tmp]# rpm -ivh --relocate /usr=/oracle oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm

[root@localhost tmp]# rpm -ivh --relocate /usr=/oracle oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm

[root@localhost tmp]# rpm -ivh --relocate /usr=/oracle oracle-instantclient18.3-sqlplus-18.3.0.0.0-1.x86_64.rpm

 

3、配置环境变量

export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib

export TNS_ADMIN=/usr/lib/oracle/18.3/client64/network/admin

export ORACLE_HOME=/usr/lib/oracle/18.3/client64

export PATH=$PATH:$ORACLE_HOME/bin

4、source /etc/profile

5、测试

sqlplus hd_bd_port/[email protected]/orcl

你可能感兴趣的:(linux下装oracle客户端)