Skip to content

Instantly share code, notes, and snippets.

@hyeonseop-lee
Last active October 9, 2015 03:45
Show Gist options
  • Select an option

  • Save hyeonseop-lee/596bf1404b2a1730f4af to your computer and use it in GitHub Desktop.

Select an option

Save hyeonseop-lee/596bf1404b2a1730f4af to your computer and use it in GitHub Desktop.

Assignment Environment Setup Guide

KAIST CS360, 2015 Spring

Installing Oracle SQL*Plus on Ubuntu x86_64

Download oracle-instantclient11.2-basiclite-11.2.0.4.0-1.x86_64.rpm, oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm from this link.

Install alien and libaio1:

sudo apt-get install alien libaio1

Install packages with alien:

sudo alien -i oracle-instantclient11.2-basiclite-11.2.0.4.0-1.x86_64.rpm
sudo alien -i oracle-instantclient11.2-sqlplus-11.2.0.4.0-1.x86_64.rpm

Open /etc/ld.so.conf.d/oracle.conf to configure system library path:

sudo vim /etc/ld.so.conf.d/oracle.conf

Add new path:

/usr/lib/oracle/11.2/client64/lib/

and run dynamic linker run-time bindings utility:

sudo ldconfig

If you have tnsnames.ora:

sudo mkdir -p /usr/lib/oracle/11.2/client64/lib/network/admin
sudo mv tnsnames.ora /usr/lib/oracle/11.2/client64/lib/network/admin/tnsnames.ora

Now to run SQL*Plus:

sqlplus64

Installing Oracle Precompiler on Ubuntu x86_64

Make sure you have followed instructions above and installed Oracle Instant Client.

Download oracle-instantclient11.2-precomp-11.2.0.4.0-1.x86_64.rpm from this link.

Install packages with alien:

sudo alien -i oracle-instantclient11.2-precomp-11.2.0.4.0-1.x86_64.rpm

and run dynamic linker run-time bindings utility:

sudo ldconfig

Now to run Precompiler:

proc common_parser=yes [your .ec file]

Installing Oracle JDBC on Ubuntu

Install Java 8 JDK from ppa repository:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Download ojdbc6.jar from this link.

Install Oracle JDBC Driver.

sudo mv ojdbc6.jar /usr/lib/jvm/java-8-oracle/jre/lib/ext/ojdbc6.jar

Now to compile and run Java code with Oracle JDBC:

javac [your Java file]
java [your Java class]
@blukat29
Copy link

If it takes too long to connect, try this

java -Djava.security.egd=file:/dev/./urandom [your Java class]

http://stackoverflow.com/questions/14400595/java-oracledb-connection-taking-too-long-the-first-time

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