Script to install Oracle

Simple hack to install oracle on Ubuntu

#!/bin/bash
sudo sh -c 'echo "deb <a href="http://oss.oracle.com/debian" title="http://oss.oracle.com/debian">http://oss.oracle.com/debian</a> unstable main non-free" >> /etc/apt/sources.list'
wget <a href="http://oss.oracle.com/el4/RPM-GPG-KEY-oracle" title="http://oss.oracle.com/el4/RPM-GPG-KEY-oracle">http://oss.oracle.com/el4/RPM-GPG-KEY-oracle</a>  -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install oracle-xe
sudo /etc/init.d/oracle-xe configure
cat >> $HOME/.bashrc << 'EOF'
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME
export ORACLE_SID=XE
EOF

To test if its working fine
Log in as database admin : sqlplus sys as sysdba

Share this