Centos7-安装oracle客户端11.2.0.4
1、Oracle客户RPM文件下载地址
https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
https://www.oracle.com/database/technologies/instant-client/linux-x86-32-downloads.html
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
选择对应系统的版本信息。
2、安装
[root@test tools]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
[root@test tools]# rpm -ivh oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:oracle-instantclient11.2-basic-11################################# [100%]
[root@test tools]# rpm -ivh oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:oracle-instantclient11.2-sqlplus-################################# [100%]
[root@JZGZdaping12 tools]# pwd
/home/data/tools
[root@test tools]#
[root@test tools]# vi ~/.bash_profile
#xin zeng
export ORACLE_VERSION=11.2
export ORACLE_HOME=/usr/lib/oracle/$ORACLE_VERSION/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export PATH=$PATH:$ORACLE_HOME/bin
[root@test tools]# source ~/.bash_profile
[root@test bin]# pwd
/usr/lib/oracle/11.2/client64/bin
[root@test bin]# ./sqlplus xxxx/xxxx@ip:port/xxxx
SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 5 16:54:57 2021
Copyright (c) 1982, 2013, Oracle. All rights reserved.