Skip to content

Instantly share code, notes, and snippets.

@johnt1000
Last active November 6, 2015 12:02
Show Gist options
  • Save johnt1000/bacc8b1461a7547f3cb3 to your computer and use it in GitHub Desktop.
Save johnt1000/bacc8b1461a7547f3cb3 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y wget unzip
cd /vagrant && wget https://dl.dropboxusercontent.com/u/25746552/scripts/instant_client_oracle/32/instantclient-basiclite-linux-12.1.0.2.0.zip
cd /vagrant && wget https://dl.dropboxusercontent.com/u/25746552/scripts/instant_client_oracle/32/instantclient-sdk-linux-12.1.0.2.0.zip
cd /vagrant && wget https://dl.dropboxusercontent.com/u/25746552/scripts/instant_client_oracle/32/instantclient-sqlplus-linux-12.1.0.2.0.zip
sudo mkdir /opt
sudo mkdir /opt/oracle
cd /vagrant && sudo mv instantclient-basiclite-linux-12.1.0.2.0.zip /opt/oracle
cd /vagrant && sudo mv instantclient-sdk-linux-12.1.0.2.0.zip /opt/oracle
cd /vagrant && sudo mv instantclient-sqlplus-linux-12.1.0.2.0.zip /opt/oracle
cd /opt/oracle && sudo unzip -qq /opt/oracle/instantclient-basiclite-linux-12.1.0.2.0.zip
cd /opt/oracle && sudo unzip -qq /opt/oracle/instantclient-sdk-linux-12.1.0.2.0.zip
cd /opt/oracle && sudo unzip -qq /opt/oracle/instantclient-sqlplus-linux-12.1.0.2.0.zip
sudo rm /opt/oracle/instantclient-basiclite-linux-12.1.0.2.0.zip
sudo rm /opt/oracle/instantclient-sdk-linux-12.1.0.2.0.zip
sudo rm /opt/oracle/instantclient-sqlplus-linux-12.1.0.2.0.zip
sudo ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so
sudo apt-get install -y libaio1 libaio-dev
echo "LD_LIBRARY_PATH=/opt/oracle/instantclient_12_1" >> ~/.bash_profile
echo "export LD_LIBRARY_PATH" >> ~/.bash_profile
gem install ruby-oci8 -v 2.2.1 # rails 4.2
gem install activerecord-oracle_enhanced-adapter -v 1.6.0 # rails 4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment