Please provide me with the guidance to install oracle 11gr2 on Ubuntu 14.04.


2 Answers 2


1. Download Oracle Database Express Edition.

2. Instructions before installing Oracle database

  1. Copy the downloaded file and paste it in home directory.

  2. Unzip using the downloaded .zip file:

     unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip 
  3. Install required packages:

     sudo apt-get install alien libaio1 unixodbc # still works in 22.04
  4. Change directories to the Disk1 directory:

     cd Disk1/
  5. Convert .rpm package format to .deb package format (that is used by Ubuntu):

     sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm
  6. Create the required chkconfig script:

     sudo nano /sbin/chkconfig

    The nano 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:

     # Oracle 11gR2 XE installer chkconfig hack for Ubuntu
     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
     update-rc.d oracle-xe defaults 80 01
  7. Change the permission of the chkconfig file:

     sudo chmod 755 /sbin/chkconfig  
  8. Set kernel parameters. Oracle 11gR2 XE requires additional kernel parameters which you need to set using the command:

     sudo nano /etc/sysctl.d/60-oracle.conf
  9. Copy the following into the file and save:

     # Oracle 11g XE kernel parameters 
     net.ipv4.ip_local_port_range=9000 65000  
     kernel.sem=250 32000 100 128 
  10. Verify the changes:

    sudo cat /etc/sysctl.d/60-oracle.conf 
  11. You should see what you entered earlier. Now load the kernel parameters:

    sudo service procps start # If this doesn't work try sudo systemctl start procps 
  12. Verify the new parameters are loaded:

    sudo sysctl -q fs.file-max

You should see the file-max value that you entered earlier.

  1. Set up /dev/shm mount point for Oracle. Create the following file:

    sudo nano /etc/rc2.d/S01shm_load
  2. Copy the following into the file and save.

    case "$1" in
        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
  3. Change the permissions of the file:

    sudo chmod 755 /etc/rc2.d/S01shm_load
  4. Run the following commands:

    sudo ln -s /usr/bin/awk /bin/awk 
    sudo mkdir /var/lock/subsys 
    sudo touch /var/lock/subsys/listener
    sudo reboot

3. Install Oracle database

  1. Install Oracle DBMS:

    sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
  2. Configure Oracle:

    sudo /etc/init.d/oracle-xe configure 
  3. Setup environment variables by editing your .bashrc file:

    nano ~/.bashrc
  4. Add the following lines to the end of the file:

     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 PATH=$ORACLE_HOME/bin:$PATH
  5. Load the changes by executing your profile:

    . ~/.bashrc
  6. Start Oracle 11gR2 XE:

     sudo service oracle-xe start
  7. Add user YOURUSERNAME to group dba using the command:

    sudo usermod -a -G dba YOURUSERNAME

4. Using the Oracle XE command shell

  1. Start the Oracle XE 11gR2 server:

    sudo service oracle-xe start
  2. Start command-line shell as the system admin:

    sqlplus sys as sysdba

    Enter the password that you gave while configuring Oracle earlier. You will now be placed in a SQL environment that only understands SQL commands.

  3. Create a regular user account in Oracle using the SQL command:

    create user USERNAME identified by PASSWORD;

    Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password. If you had error executing the above with a message about resetlogs, then execute the following SQL command and try again:

    alter database open resetlogs;
  4. Grant privileges to the user account using the SQL command:

    grant connect, resource to USERNAME;

    Replace USERNAME and PASSWORD with the username and password of your choice. Please remember this username and password.

  5. Exit the sys admin shell using the SQL command:

  6. Start the command-line shell as a regular user using the command:


Now you can run SQL commands.

  • At step 6 I am getting Starting Oracle Net Listener...touch: cannot touch '/var/lock/subsys/listener': No such file or directory Done Configuring database... Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
    – Skynet
    May 5, 2016 at 13:39
  • 2
    @Skynet. I got the same error. Although i don't able to understand these commands, i tried and able to configure oracle XE or linux mint.
    – Jeet
    Jul 5, 2016 at 7:45
  • @Skynet. And also tried this link. Search content Reference in the comment after expand : to get it to work I needed to add the following lines in the beginning of the file "/etc/init.d/oracle-xe"...between steps 6(i) and 6(ii) if [ -L /dev/shm ]; then rm -rf /dev/shm mkdir /dev/shm mount -t tmpfs shmfs -o size=2048m /dev/shm fi if [ ! -d /var/lock/subsys ]; then mkdir /var/lock/subsys touch /var/lock/subsys/listener fi
    – Jeet
    Jul 5, 2016 at 8:08
  • 1
    /etc/rc2.d/S01shm_load seems missing ;; indicating the end of an alternative at line 7. Nov 4, 2016 at 8:18
  • 2
    Had to use sudo service procps restart instead of sudo service procps start
    – ossbuntu
    Oct 24, 2017 at 11:53

This worked fine, however I got the following error:

sudo /etc/init.d/oracle-xe start
[....] Starting oracle-xe (via systemctl): oracle-xe.serviceJob for oracle-xe.service failed because the control process exited with error code. See "systemctl status oracle-xe.service" and "journalctl -xe" for details.

Looking into it:

systemctl status oracle-xe.service
Jan 27 10:01:05 <myusername> su[29699]: No passwd entry for user 'oracle'

I resolved it by simply adding a user:

sudo adduser oracle

Hope this helps someone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .