Created
December 22, 2022 11:55
-
-
Save sumanmichael/9d2e81880668070ca77352a2c373e8b8 to your computer and use it in GitHub Desktop.
Install oracle_fdw in Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tested with oracle_fdw 2.5.0, PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg22.04+1), Oracle client 21.8.0.0.0 | |
# user: root | |
apt update | |
apt install -y wget unzip | |
# change the postgres version here (15) | |
# also make sure you've configured postgres repository and installed this way: https://www.postgresql.org/download/linux/ubuntu/ | |
apt install -y build-essential libaio1 postgresql-server-dev-15 | |
mkdir -p /opt/oracle | |
cd /opt/oracle | |
# install Basic and SDK packages of Oracle InstantClient | |
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip | |
wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip | |
unzip instantclient-basic-linuxx64.zip | |
unzip instantclient-sdk-linuxx64.zip | |
# ensure directory (instantclient_21_8 is latest on the date of posting) | |
# Link the shared libraries of oracle instant client | |
echo /opt/oracle/instantclient_21_8 > /etc/ld.so.conf.d/oracle-instantclient.conf | |
ldconfig | |
cd /tmp | |
wget https://github.com/laurenz/oracle_fdw/archive/refs/tags/ORACLE_FDW_2_5_0.zip | |
unzip ORACLE_FDW_2_5_0.zip | |
cd oracle_fdw-ORACLE_FDW_2_5_0/ | |
export ORACLE_HOME=/opt/oracle/instantclient_21_8 | |
make | |
make install | |
### verify | |
# su - postgres | |
# psql | |
# CREATE EXTENSION oracle_fdw | |
# SELECT oracle_diag(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment