Oracle client linux ubuntu

Oracle client linux ubuntu

Learn the different methods to install Oracle Instant Client.

  • Installing Oracle Instant Client Using Zip Files
    Learn how to download and use zip files to install Oracle Instant Client Basic or Oracle Instant Client Basic Light.
  • Installing Oracle Instant Client Using the Setup Wizard
    Learn how to use the setup wizard to install Oracle Instant Client.

Installing Oracle Instant Client Using Zip Files

Learn how to download and use zip files to install Oracle Instant Client Basic or Oracle Instant Client Basic Light.

    Use any browser to access the Oracle Instant Client Downloads page:

unzip instantclient-basic-windows.x64-21.3.0.0.0dbru.zip

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.

Installing Oracle Instant Client Using the Setup Wizard

Learn how to use the setup wizard to install Oracle Instant Client.

    Use any browser to access the Oracle Database Software Downloads page:

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 remove this Oracle Instant Client installation use the setup.exe command along with the -deinstall -home options:

setup.exe -deinstall -home C:\app\oracle\product\21.3.0.0\client_1

Источник

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.

Читайте также:  При установке linux нет загрузки windows

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

Читайте также:  Using cups printer linux

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

Источник

Oracle client linux ubuntu

(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.

Источник

Установка Oracle Instant Client в Ubuntu Server

Ubuntu

Данный кусок статьи был выдран из инета и размещён как есть. Перевод любительский. Работоспособность не гарантируется, но нашим админам он помог в настройке Oracle Instant Client на Ubuntu. Сам не настраивал.

Install RPMs

Конвертируем .rpm файлы в .deb пакеты и устанавливаем с помощью «alien».

sudo apt-get install alien

Например, для версии 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» или «sqlplus64» для проверки соединения с БД:

sqlplus username/password@//dbhost:1521/SID

В этом случае читайте ниже про ORACLE_HOME.

Если sqlplus не может найти файл libsqlplus.so, то читайте ниже про Integrate Oracle Libraries.

Если sqlplus не может найти файл libaio.so.1, выполните:

sudo apt-get install libaio1

Или, если у вас 32-битный клиент:

sudo apt-get install libaio1:i386

Integrate Oracle Libraries

Если sqlplus не может найти библиотеки, вы можете добавить Oracle Libraries в переменную LD_LIBRARY_PATH:

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

Например, версия 12.1 для Linux x86_64:

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

Или добавьте в системные библиотеки:

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

Многие оракловые приложения ищут свой софт в переменной ‘ORACLE_HOME’.

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

Или каждый пользователь может переопределить переменную в ~/.bash_profile.

Примечание: с ubuntu 11.04 (и 14.04) sqlplus не находится без строки в oracle.sh:

export PATH=$PATH:$ORACLE_HOME/bin

SDK fix

Некоторые сборки могут требовать ‘oci.h’ в $ORACLE_HOME/include, или в $ORACLE_HOME/rdbms/public

Instant client иногда размещает include файлы, такие как oci.h, в /usr/include/oracle//client.

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

Если там нет папки ‘include’ ниже ORACLE_HOME, и она расположена в /usr/include/oracle/ , создайте символическую ссылку:

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

Источник

Оцените статью
Adblock
detector