home / blog

Oracle 11g XE on Ubuntu 12.10

# dependencies
sudo apt-get install alien libaio1 unixodbc

# install
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip -d oraclexe
cd oraclexe/Disk1/
sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
sudo dpkg --force all --install oracle-xe_11.2.0-2_amd64.deb

# requirements for setup
sudo ln -s /usr/bin/awk /bin/awk 
sudo mkdir -p /var/lock/subsys
sudo mkdir -p /u01/app/oracle/oradata
sudo mkdir -p /u01/app/oracle/diag
sudo touch /var/lock/subsys/listener
sudo groupadd dba
sudo useradd oracle -g dba

sudo touch /sbin/chkconfig
sudo chmod a+x /sbin/chkconfig
update-rc.d oracle-xe defaults 80 01

# environment
sudo mount -t tmpfs shmfs -o size=2048m /dev/shm
sudo dd if=/dev/zero of=/swapfile bs=1024 count=2097152
sudo mkswap /swapfile
sudo su
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
exit
swapon -a
swapon -s

# set ports / username/password
sudo rm /etc/default/oracle-xe 
sudo /etc/init.d/oracle-xe configure

# update your environment 
cat /etc/profile.d/oracle.sh
source /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh 

# create normal user
sqlplus system/system
CREATE USER "foo" IDENTIFIED BY "bar";
This entry was posted in geek and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.