http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
sudo apt-get install alien libaio1 unixodbc
cd Disk1
sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
sudo pico /sbin/chkconfig
7. The pico text editor is started and the commands are shown at the bottom of the screen. Now copy and paste the following into the file and save:
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
echo >> $file
echo '### BEGIN INIT INFO' >> $file
echo '# Provides: OracleXE' >> $file
echo '# Required-Start: $remote_fs $syslog' >> $file
echo '# Required-Stop: $remote_fs $syslog' >> $file
echo '# Default-Start: 2 3 4 5' >> $file
echo '# Default-Stop: 0 1 6' >> $file
echo '# Short-Description: Oracle 11g Express Edition' >> $file
echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01
sudo chmod 755 /sbin/chkconfig
9. Set kernel parameters. Oracle 11gR2 XE requires additional kernel parameters which you need to set using the command:
sudo pico /etc/sysctl.d/60-oracle.conf
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
kernel.sem=250 32000 100 128
kernel.shmmax=536870912
sudo cat /etc/sysctl.d/60-oracle.conf
sudo service procps start
sudo sysctl -q fs.file-max
You should see the file-max value that you entered earlier.
sudo pico /etc/rc2.d/S01shm_load
#!/bin/sh
case "$1" in
start)
mkdir /var/lock/subsys 2>/dev/null
touch /var/lock/subsys/listener
rm /dev/shm 2>/dev/null
mkdir /dev/shm 2>/dev/null
*)
echo error
exit 1
;;
esac
sudo chmod 755 /etc/rc2.d/S01shm_load
sudo ln -s /usr/bin/awk /bin/awk
sudo mkdir /var/lock/subsys
sudo touch /var/lock/subsys/listener
sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
sudo /etc/init.d/oracle-xe configure
pico ~/.bashrc
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
. ~/.bashrc
sudo service oracle-xe start
sudo usermod -a -G dba YOURUSERNAME
sudo service oracle-xe start
sudo apt install rlwrap
rlwrap sqlplus sys as sysdba
If you are seeing "Package 'libaio1' has no installation candidate" is that you are likely on a newer version of Ubuntu (like 24.04 or 2026's latest release). In these versions, the package was renamed to libaio1t64 as part of a system-wide update to 64-bit time handling.
Oracle 11g, being an older piece of software, specifically looks for a file named libaio.so.1, which is missing because of this name change.
First, install the modern version of the library and the development headers:
sudo apt update
sudo apt install libaio1t64 libaio-dev
Oracle will still fail because it doesn't recognize libaio1t64. You need to create a "shortcut" (symbolic link) so that when Oracle asks for libaio.so.1, the system points it to the new file:
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
Now that the configuration is complete and the library issue is fixed, you need to manually enter the shell. The reason your prompt didn't change is that service start only runs the background process; it doesn't open the interface.
1. Set your Environment Variables: Run these three commands to tell your current session where Oracle is:
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export PATH=$PATH:$ORACLE_HOME/bin
2. Launch SQL*Plus: Now, try to enter the command shell:
sqlplus / as sysdba
If sqlplus still says "command not found," it means the ORACLE_HOME path is slightly different on your machine. You can find the correct path by running:
find /u01 -name sqlplus