Install oracle instant client linux

Install oracle instant client linux

Learn how to install Oracle Instant Client by downloading the RPMs and using the yum install command.

Starting with 19c, by default, you can install only one version of the Oracle Instant Client RPM packages at a time. If you need multiple versions, use the Oracle Instant Client zip files.

Removing Earlier Oracle Instant Client Installations

Remove any earlier installations of Oracle Instant Client using yum before you start a fresh installation.

    List the currently installed Oracle Instant Client packages. For example: For Oracle Linux 7:

$ sudo yum list installed | grep instantclient
$ sudo dnf list installed | grep instantclient
oracle-instantclient19.5-basic.x86_64 19.5.0.0.0-1 @/oracle-instantclient19.5-basic-19.5.0.0.0-1.x86_64
$ sudo yum remove oracle-instantclient19.5-basic.x86_64
$ sudo dnf remove oracle-instantclient19.5-basic.x86_64
$ sudo yum remove oracle-release-el7
$ sudo dnf remove oracle-release-el8

Installing Oracle Instant Client From the yum Server

If you are using Oracle Linux and have configured your Oracle Linux yum server, then you can install Oracle Instant Client using the yum install command.

    Install the Oracle Linux release package to configure repository definitions for Oracle Instant Client: For Oracle Linux 7:

$ sudo yum install oracle-instantclient-release-el7
$ sudo dnf install oracle-instantclient-release-el8
$ sudo yum install oracle-instantclient-basic
$ sudo dnf install oracle-instantclient-basic
$ sudo yum install oracle-instantclient-sqlplus
$ sudo dnf install oracle-instantclient-sqlplus

Using versionlock to Avoid Upgrades

To ensure that you do not inadvertently upgrade Oracle Instant Client when a new major release is published, use yum versionlock after you have installed Oracle Instant Client 21c.

$ sudo yum install yum-plugin-versionlock
$ sudo yum versionlock oracle-instantclient-release-el7
$ sudo dnf versionlock oracle-instantclient-release-el8

Configuring yum versionlock still allows automatic Oracle Instant Client release updates to 21.2, 21.3, and so on.

Manually Downloading and Installing Oracle Instant Client RPM Packages

An alternative method for installing Oracle Instant Client is to manually download and install the Oracle Instant Client packages.

  1. Go to the Oracle Instant Client Downloads page: https://www.oracle.com/database/technologies/instant-client/downloads.html
  2. Download the desired Oracle Instant Client RPM packages. Select the correct platform, architecture, and packages of your choice. For example, if your application is 64-bit, then ensure that you select 64-bit Instant Client and download the Basic Package RPM file. All installations require a Basic or Basic Light package. All other packages are optional.
  3. Install the packages using yum . For Oracle Linux 7:
$ sudo yum install oracle-instantclient-basic-21.3.0.0.0-1.x86_64.rpm
$ sudo dnf install oracle-instantclient-basic-21.3.0.0.0-1.el8.x86_64.rpm

Additionally, you may have to perform the following tasks before you start your application:

  • If you intend to colocate optional Oracle configuration files such as tnsnames.ora , sqlnet.ora , ldap.ora , or oraaccess.xml with Oracle Instant Client, then move these files to the /usr/lib/oracle/21/client64/lib/network/admin subdirectory. This is the default Oracle configuration directory for applications linked with this Oracle Instant Client. Alternatively, you can move the Oracle configuration files to another, accessible directory. Then set the environment variable TNS_ADMIN to that directory name.
  • To use binaries from the tools package, use yum or dnf to install the package and then update your PATH environment variable. For example:
$ export PATH=/usr/lib/oracle/21/client64/bin:$PATH

Источник

Install oracle instant client linux

OML4R requires Oracle Database client software.

Oracle Instant Client is suitable for most configurations of OML4R .

This topic includes these sections:

Related Topics

Installing Oracle Database Instant Client on Windows

Instructions for installing Oracle Database Instant Client on Windows.

To Install Oracle Instant Client on Windows:

    Create an installation directory for the OML4R client components. For example:

c:\oml4rclient_install_dir\instantclient-basic-windows.x64-12.1.0.2.0.zip
c:\oml4rclient_install_dir\instantclient_12_1
c:\oml4rclient_install_dir\instantclient-sdk-windows.x64-12.1.0.2.0.zip
  1. In Windows Control Panel, choose System , then click Advanced system settings .
  2. On the Advanced tab, click Environment Variables .
  3. Under System variables , create OCI_LIB64 if it does not already exist. Set the value of OCI_LIB64 to c:\oml4rclient\instantclient_12_1 .
  4. Under System variables , edit PATH to include c:\oml4rclient\instantclient_12_1 .

Install Oracle Database Instant Client on Linux or UNIX

You can install Oracle Database Instant Client from a zip file on Linux or UNIX systems.

On Linux, you can also install from RPMs.

This topic includes these sections:

Install Oracle Instant Client from a Zip File

Instructions for installing Oracle Instant Client from a zip file.

    Create an installation directory for the OML4R client components. For example:

mkdir oml4rclient_install_dir
\oml4rclient_install_dir\instantclient-basic-linux.x64-12.1.0.2.0.zip
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip ls instantclient_12_1/ instantclient-basic-linux.x64-12.1.0.2.0.zip
\oml4rclient_install_dir\instantclient-sdk-linux.x64-12.1.0.2.0.zip
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip ls /instantclient_12_1 instantclient-basic-linux.x64-12.1.0.2.0.zip instantclient-sdk-linux.x64-12.1.0.2.0.zip cd instantclinet_12_1 ls /help /sdk /vc10 /vc11

Install Oracle Instant Client on Linux from RPMs

Instructions for installing Oracle Instant Client from RPMs.

    Create an installation directory for the OML4R client components. For example:

mkdir oml4rclient_install_dir
rpm -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
rpm -i oracle-instantclient12.1-sdk-12.1.0.2.0-1.x86_64.rpm
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH

Источник

Install oracle instant client linux

(31,413,713 bytes) (cksum — 384697539)

(4,649,614 bytes) (cksum — 753190421)

(331,854 bytes) (cksum — 722849044)

(294,618 bytes) (cksum — 4282446920)

Instant Client Installation for Linux (32-bit)

For general Instant Client information, see the Home Page.

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-19.3.0.0.0dbru.zip 
 cd /opt/oracle/instantclient_12_2 ln -s libclntsh.so.12.1 libclntsh.so ln -s libocci.so.12.1 libocci.so 

For example, on Oracle Linux, run:

 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:

The variable can optionally be added to configuration files such as ~/.bash_profile and to application configuration files such as /etc/sysconfig/httpd .

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.

Installation of RPM files:

  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 oracle-instantclient19.3-basic-19.3.0.0.0-1.i386.rpm

Note that from 19.3, by default only one version of the Instant Client RPM libraries can be installed at a time.

 sudo sh -c "echo /usr/lib/oracle/18.3/client/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:

The variable can optionally be added to configuration files such as ~/.bash_profile and to application configuration files such as /etc/sysconfig/httpd .

sudo mkdir -p /usr/lib/oracle/12.2/client/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.

Источник

Introduction

Oracle Instant Client is a free Oracle database client. The current version is 12.1.0.2.0, and several versions back to 10.1.0.5 are available.

Install RPMs

  • Download the Oracle Instantclient RPM files from http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html. Everyone needs either «Basic» or «Basic lite», and most users will want «SQL*Plus» and the «SDK».
  • Convert these .rpm files into .deb packages and install using «alien» («sudo apt-get install alien» if you don’t have it).
  • For example, for version 12.1.0.2.0-1 for Linux x86_64 (64-bit):
alien -i oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm alien -i oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm alien -i oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
sqlplus username/password@//dbhost:1521/SID

If you execute sqlplus and get «sqlplus: command not found», see the section below about adding the ORACLE_HOME variable.

If sqlplus complains of a missing libsqlplus.so file, follow the steps in the section «Integrate Oracle Libraries» below.

If sqlplus complains of a missing libaio.so.1 file, run

sudo apt-get install libaio1

or, if you’re installing the 32 bit instant client on 64 bit,

sudo apt-get install libaio1:i386

Integrate Oracle Libraries

If oracle applications, such as sqlplus, are complaining about missing libraries, you can add the Oracle libraries to the LD_LIBRARY_PATH each time it is used:

export LD_LIBRARY_PATH=/usr/lib/oracle//client(64)/lib/$

For example, 12.1 version for Linux x86_64:

export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/$

or to add it to the system library list create a new file as follows:

sudo vi /etc/ld.so.conf.d/oracle.conf && sudo chmod o+r /etc/ld.so.conf.d/oracle.conf
/usr/lib/oracle/12.1/client64/lib/

ORACLE_HOME

Many Oracle database applications look for Oracle software in the location specified in the environment variable ‘ORACLE_HOME’.

Typical workstations will only have one Oracle install, and will want to define this variable in a system-wide location.

sudo sudo vi /etc/profile.d/oracle.sh && sudo chmod o+r /etc/profile.d/oracle.sh
export ORACLE_HOME=/usr/lib/oracle//client(64)
export ORACLE_HOME=/usr/lib/oracle/12.1/client64

Alternatively, each user can define this in their ~/.bash_profile

Note: From Ubuntu 11.04 (confirmed in 11.04 and 14.04) sqlplus was not recognized as a command unless the following line was also included in the oracle.sh file:

export PATH=$PATH:$ORACLE_HOME/bin

SDK fix

Some packages may look for ‘oci.h’ in $ORACLE_HOME/include, or in $ORACLE_HOME/rdbms/public

The instant client sometimes places the include files, such as oci.h, in /usr/include/oracle//client.

Inspect your system by running the following commands

ls $ORACLE_HOME ls -d /usr/include/oracle/*/client*/*

If there is no ‘include’ directory under ORACLE_HOME, and it is located over in /usr/include/oracle/ , create a symbolic link to assist packages looking for these header files. For example,

sudo ln -s /usr/include/oracle/11.2/client $ORACLE_HOME/include
sudo ln -s /usr/include/oracle/12.1/client64 $ORACLE_HOME/include

And then check it is correct

Oracle Instant Client (последним исправлял пользователь host 2015-10-07 18:50:02)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Читайте также:  Linux mint path environment
Оцените статью
Adblock
detector