需求是这样的,大数据环境要安装Oracle客户端,
oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-jdbc-11.2.0.4.0-1.x86_64.rpm
oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm
安装完baisc后rpm 安装jdbc和sqlplus
链接:https://pan.baidu.com/s/1abTvGa1-pnwFNLbI3DP0Vg
提取码:mm9s
复制这段内容后打开百度网盘手机App,操作更方便哦
Instant Client Installation for Linux x86-64 (64-bit)
For general Instant Client information, see the Home Page.
ODBC users should follow the ODBC Installation Instructions.
Instant Client RPMs are also available without click-through from yum.oracle.com for Oracle Linux 7 and Oracle Linux 6. Oracle Linux users with a ULN Subscription may prefer to install Oracle Instant Client from the ol7_x86_64_instantclient or ol6_x86_64_instantclient channels.
Client-server version interoperability is detailed in Doc ID 207303.1. For example, Oracle Call Interface 19.3 can connect to Oracle Database 11.2 or later. Some tools may have other restrictions.
Installation of ZIP files:
1. Download the desired Instant Client ZIP files. All installations require a Basic or Basic Light package.
2. Unzip the packages into a single directory such as /opt/oracle/instantclient_19_3 that is accessible to your application. For example:
cd /opt/oracle
unzip instantclient-basic-linux.x64-19.3.0.0.0dbru.zip
3. Prior to version 18.3, create the appropriate links for the version of Instant Client. For example:
cd /opt/oracle/instantclient_12_2
ln -s libclntsh.so.12.1 libclntsh.so
ln -s libocci.so.12.1 libocci.so
4. Install the libaio package. This is called libaio1 on some Linux distributions.
For example, on Oracle Linux, run:
sudo yum install libaio
5. If Instant Client is the only Oracle Software installed on this system then update the runtime link path, for example:
sudo sh -c "echo /opt/oracle/instantclient_19_3 > \
/etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig
Alternatively, set the LD_LIBRARY_PATH environment variable prior to running applications. For example:
export LD_LIBRARY_PATH=/opt/oracle/instantclient_19_3:$LD_LIBRARY_PATH
The variable can optionally be added to configuration files such as ~/.bash_profile and to application configuration files such as /etc/sysconfig/httpd.
6. If you intend to co-locate optional Oracle configuration files such as tnsnames.ora, sqlnet.ora, ldap.ora, or oraaccess.xml with Instant Client, put them in the network/admin subdirectory. This needs to be created for 12.2 and earlier, for example:
mkdir -p /opt/oracle/instantclient_12_2/network/admin
This is the default Oracle configuration directory for applications linked with this Instant Client.
Alternatively, Oracle configuration files can be put in another, accessible directory. Then set the environment variable TNS_ADMIN to that directory name.
7. To use binaries such as sqlplus from the SQL*Plus package, unzip the package to the same directory as the Basic package and then update your PATH environment variable, for example:
export PATH=/opt/oracle/instantclient_19_3:$PATH
8. Start your application.
---------from here
Installation of RPM files:
PATH=$PATH:$HOME/bin:/usr/lib/oracle/11.2/client64/bin
export LD_LIBRARY_PATH=/opt/software/oracle
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATH
export PAT
1. Download the desired Instant Client RPM packages. All installations require a Basic or Basic Light RPM.
2. Install the packages with yum. For example:
sudo yum install oracle-instantclient11.2-basic-19.3.0.0.0-1.x86_64.rpm
Note that from 19.3, by default only one version of the Instant Client RPM libraries can be installed at a time.
3. Prior to 19.3, if Instant Client is the only Oracle Software installed on this system then update the runtime link path, for example:
sudo sh -c "echo /usr/lib/oracle/18.3/client64/lib > \
/etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig
For Instant Client 19.3 RPM packages, these commands are automatically run.
Alternatively, set the LD_LIBRARY_PATH environment variable prior to running applications. For example:
export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib:$LD_LIBRARY_PATH
The variable can optionally be added to configuration files such as ~/.bash_profile and to application configuration files such as /etc/sysconfig/httpd.
4. If you intend to co-locate optional Oracle configuration files such as tnsnames.ora, sqlnet.ora ldap.ora, or oraaccess.xml with Instant Client, put them in the network/admin subdirectory. This needs to be created for 12.2 and earlier, for example:
sudo mkdir -p /usr/lib/oracle/12.2/client64/lib/network/admin
This is the default Oracle configuration directory for applications linked with this Instant Client.
Alternatively, Oracle configuration files can be put in another, accessible directory. Then set the environment variable TNS_ADMIN to that directory name.
5. To use binaries from the tools package, use yum to install the package and then update your PATH environment variable, for example:
export PATH=/usr/lib/oracle/19.3/client64/bin:$PATH
6. Start your application.
按照上面的文档安装,很简单,必要更改路径
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29990276/viewspace-2650071/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29990276/viewspace-2650071/