Skip to content

Instantly share code, notes, and snippets.

@gongo
Created August 15, 2012 13:43
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gongo/3360283 to your computer and use it in GitHub Desktop.
Save gongo/3360283 to your computer and use it in GitHub Desktop.
Install document of DBD::Oracle on Ubuntu 12.04

DBD::Oracle on Ubuntu 12.04

参考:How To: Setup DBD::Oracle in Ubuntu « ZenHat

Install cpanminus

# apt-get install cpanminus
cat <<EOF >> ~/.bashrc
export PERL_CPANM_OPT="-l $HOME/.perl"
EOF

Install require package

for Oracle instant-client

# apt-get install libaio-dev

for rpm2deb

# apt-get install alien

for build

# apt-get install build-essential

Download oracle-instant-client-{basic,devel,sqlplus}

on http://www.oracle.com/technetwork/topics/linuxsoft-082809.html

2012/8/15, version 11.2.0.3-1

make deb file

# oracle-instantclient11.2-{basic,sqlplus,devel}-11.2.0.3.0-1.i386.rpm
oracle-instantclient11.2-basic_11.2.0.3.0-2_i386.deb generated
oracle-instantclient11.2-sqlplus_11.2.0.3.0-2_i386.deb generated
oracle-instantclient11.2-devel_11.2.0.3.0-2_i386.deb generated

Install oracle instant-client

# dpkg -i oracle-instantclient11.2-{basic,sqlplus,devel}_11.2.0.3.0-2_i386.deb
cat <<EOF >> ~/.bashrc
export ORACLE_HOME=/usr/lib/oracle/11.2/client
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
EOF

Install Perl Module

$ cpanm RPC::EPC::Service DBI DBD::Oracle
@guaigua
Copy link

guaigua commented Aug 27, 2014

need to add "alien" in :

make deb file

alien oracle-instantclient11.2-{basic,sqlplus,devel}-11.2.0.3.0-1.i386.rpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment