Oracle Clients: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
(→Ubuntu) |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[category:Oracle]] | |||
= Ubuntu = | = Ubuntu = | ||
Download | Download | ||
Line 7: | Line 8: | ||
from [http://www.oracle.com/technetwork/database/features/instant-client/index.html Oracle Instant Client download page] | from [http://www.oracle.com/technetwork/database/features/instant-client/index.html Oracle Instant Client download page] | ||
< | <syntaxhighlight lang=bash> | ||
$ sudo apt install alien | $ sudo apt install alien libaio1 | ||
$ sudo alien -i oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm | $ sudo alien -i oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm | ||
$ sudo alien -i oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm | $ sudo alien -i oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm | ||
Line 17: | Line 17: | ||
sudo update-alternatives --install /usr/lib/${BASENAME} ${BASENAME} ${i} 10 | sudo update-alternatives --install /usr/lib/${BASENAME} ${BASENAME} ${i} 10 | ||
done | done | ||
</ | $ dpkg -L $(dpkg -l oracle-instantclient*-basiclite | awk '$1=="ii"{print $2;}') | \ | ||
awk ' | |||
/client64$/{ | |||
oracle_home=$1; | |||
printf "ORACLE_HOME=%s\nPATH=${PATH}:${ORACLE_HOME}/bin\nexport ORACLE_HOME PATH\n",oracle_home; | |||
}' | \ | |||
sudo tee /etc/profile.d/oracle.sh | |||
</syntaxhighlight> |
Latest revision as of 10:16, 2 March 2022
Ubuntu
Download
oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
from Oracle Instant Client download page
$ sudo apt install alien libaio1
$ sudo alien -i oracle-instantclient12.2-basiclite-12.2.0.1.0-1.x86_64.rpm
$ sudo alien -i oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm
$ for i in $(dpkg -L $(dpkg -l oracle-instantclient\* | awk '$1=="ii"{print $2;}') | grep .so )
do
BASENAME=${i##*/}
sudo update-alternatives --install /usr/lib/${BASENAME} ${BASENAME} ${i} 10
done
$ dpkg -L $(dpkg -l oracle-instantclient*-basiclite | awk '$1=="ii"{print $2;}') | \
awk '
/client64$/{
oracle_home=$1;
printf "ORACLE_HOME=%s\nPATH=${PATH}:${ORACLE_HOME}/bin\nexport ORACLE_HOME PATH\n",oracle_home;
}' | \
sudo tee /etc/profile.d/oracle.sh