Thursday, May 10, 2012

Installing Oracle 11g R2 Express Edition on Ubuntu 12.04 64-bit

              Recently I installed Oracle 11g R2 Express Edition on my ubuntu 12.04 ( Precise Pangolin). But for this, I have to google a lot and had to install two times to get a fully working environment. So, I thought it would be better if I share my experience with my fellow ubuntu'ers so that they don't have to face the troubles that I encountered. I have came up with following series of steps ( mostly derived from the link source I given at the end of this post ) for easy and hassle-free installation.
              But at first, I must inform you about the limitations of Oracle 11g R2 Express Edition (XE) which are as follows :

    • The Installer released by Oracle is only meant for 64-bit (x86_64) systems. If you wish to install the 32-bit version , see installing oracle xe on ubuntu 32-bit
    • It will consume, at most, processing resources equivalent to one CPU.
    • Only one installation of Oracle Database XE can be performed on a single computer.
    • The maximum amount of user data in an Oracle Database XE database cannot exceed 11 GB.
    • The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if more is available.
      Now the steps for Installation :

      1) Download the Oracle 11gR2 express edition installer from the link given below:


      ( You will need to create a free oracle web account if you don't already have it )

      2) Unzip it :
      unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

      3) Install the following packages :
      sudo apt-get install alien libaio1 unixodbc vim

      4) Convert the red-hat ( rpm ) package to Ubuntu-package :
      sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm

      (Note: this may take a while , till that time you can go for step 5 )

      5) Do the following pre-requisite things:
      a) Create a special chkconfig script :

      The Red Hat based installer of Oracle XE 11gR2 relies on /sbin/chkconfig, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully: 
      sudo vim /sbin/chkconfig

      (copy and paste the following into the file )
      #!/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
      Save the above file and provide appropriate execute privilege :
             sudo chmod 755 /sbin/chkconfig

      b) Set the Kernel parameters :
      Oracle 11gR2 XE requires to set the following additional kernel parameters:
      sudo vim /etc/sysctl.d/60-oracle.conf 
      (Enter the following) 
      # Oracle 11g XE kernel parameters  
      fs.file-max=6815744  
      net.ipv4.ip_local_port_range=9000 65000  
      kernel.sem=250 32000 100 128 
      kernel.shmmax=536870912 
      (Save the file) 
      Note: kernel.shmmax = max possible value , e.g. size of physical RAM ( in bytes e.g. 512MB RAM == 512*1024*1024 == 536870912 bytes ) 
      Verify the change : 
      sudo cat /etc/sysctl.d/60-oracle.conf 
      Load new kernel parameters: 
      sudo service procps restart  
      Verify: sudo sysctl -q fs.file-max 
             -> fs.file-max = 6815744 
      c) Increase the system swap space : Analyze your current swap space by following command :
                 free -m 
      Minimum swap space requirement of Oracle 11gR2 XE is 2 GB . In case, your is lesser , you can increase it by following steps in my one of previous post .
      d) make some more required changes :
      i) sudo ln -s /usr/bin/awk /bin/awk 
      ii) mkdir /var/lock/subsys 
      iii) touch /var/lock/subsys/listener 


      6) Now you are ready to install Oracle 11gR2 XE. Go to the directory where you created the ubuntu package file in Step 4 and enter following commands in terminal :
      i) sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb  
      Update : Before you proceed to next step , do have a look at this trouble-shooting post in order to avoid MEMORY TARGET or any other "shared memory" error.

      ii) sudo /etc/init.d/oracle-xe configure 
      Enter the following configuration information:
      • A valid HTTP port for the Oracle Application Express (the default is 8080)  
      • A valid port for the Oracle database listener (the default is 1521) 
      • A password for the SYS and SYSTEM administrative user accounts
      Update / Note:- Few people have also reported ORA-01031: insufficient privileges error while connecting to the database. To avoid this simply use "oracle" ( without quotes ) as your password in this step. 
      • Confirm password for SYS and SYSTEM administrative user accounts
      • Whether you want the database to start automatically when the computer starts (next reboot).
      7) Before you start using Oracle 11gR2 XE you have to set-up more things :
      a) Set-up the environmental variables :
      Add following lines to your .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
       
      b) execute your .profile to load the changes:
           
                . ./.profile

      8) Start the Oracle 11gR2 XE :

      sudo service oracle-xe start

      The output should be similar to following :
      user@machine:~$ sudo service oracle-xe start
      Starting Oracle Net Listener.
      Starting Oracle Database 11g Express Edition instance.
      user@machine:~$
       
      8) Create your user :
      a) start sqlplus and login as sys :
      sqlplus sys as sysdba
      ( provide the password you gave while configuring the oracle in Step 6 (ii) ).
      This should come to following :

      SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:12:16 2012

      Copyright (c) 1982, 2011, Oracle. All rights reserved.

      Enter password:

      Connected to:
      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

      SQL>

      b) Enter following on the sql prompt : Replace username and password by your desired ones.
      SQL> create user username identified by password;

      User created.

      SQL> grant connect,resource to username;

      Grant succeeded. 
       

      9) Now as you have created the user , you can login to it :

      user@machine:~$ sqlplus

      SQL*Plus: Release 11.2.0.2.0 Production on Wed May 9 12:28:48 2012

      Copyright (c) 1982, 2011, Oracle. All rights reserved.

      Enter user-name: temp
      Enter password:

      Connected to:
      Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

      SQL> select 2+2 from dual;

      2+2
      ----------
      4

      SQL>


      Reference Links :-
      1. Oracle 11g reference Documents 

      143 comments:

      1. Excellent tutorial! Thank you very much, this was very helpful.

        ReplyDelete
      2. looks good, but i have 32b machine. What changes might there be?

        ReplyDelete
        Replies
        1. I am sorry to say but Oracle has not yet released a 32 bit version of Oracle 11g Express Edition. You need to have a 64-bit installation of Ubuntu to use the 64-bit version which is available at the Oracle site.

          Delete
      3. Very good tutorial thank u very much but i have some questions, i dont undestand that .bashrc, am I need to create it or this bashrc is bash.bashrc ?, and how can I execute profile ?

        ReplyDelete
        Replies
        1. Thanks for the appreciation.

          Answers to your queries are as follows :

          Ques.1) i dont undestand that .bashrc, am I need to create it or this bashrc is bash.bashrc ?

          Answer : Check for the file .bashrc in your home folder.It will be there if you are using Ubuntu. Just open that file using vim editor or any other editor of your choice and add the lines given in Step 7a in the last.

          manish@D9L412M1:~$ cd $HOME
          manish@D9L412M1:~$ pwd
          /home/manish
          manish@D9L412M1:~$ ls -l .bashrc
          -rw-r--r-- 1 manish manish 3420 May 11 12:15 .bashrc

          Ques. 2) how can I execute profile ?

          Answer: The .profile is also present in the home folder.

          manish@D9L412M1:~$ cd $HOME
          manish@D9L412M1:~$ pwd
          /home/manish
          manish@D9L412M1:~$ ls -l .profile
          -rw-r--r-- 1 manish manish 1088 Apr 27 06:06 .profile

          The .profile is needed to be executed to load the changes you made in the .bashrc / .profile file.To execute the .profile type following command from your home directory in the terminal and press enter.

          . ./.profile

          The result should be something like this :
          manish@D9L412M1:~$ cd $HOME
          manish@D9L412M1:~$ pwd
          /home/manish
          manish@D9L412M1:~$ . ./.profile
          manish@D9L412M1:~$

          Delete
        2. Thank you very much

          Delete
        3. this bashrc only in /etc/ file in Ubuntu 12.04 and its name is bash.bashrc and the profile is in the same directory

          Delete
        4. The bash.bashrc and profile files present in /etc are for system-wide configuration of the bash shell environment and it is not recommended to touch these files. Instead you can edit the files present in the user's home directory i.e. /home/user_name/.profile and /home/user_name/.bashrc . And also these are hidden files and will not be listed in normal "ls -l *something* " . You can access the files only by giving the full name or using " ls -l .something* ".

          Delete
      4. I followed your instructions and Oracle-xe worked good but after I restart my computer , there is no problem about oracle-xe everything working fine but I can not access http://localhost:8080/apex/ .I found a solution on Internet that "service oracle-xe force-reload" and after using this command I accessed localhost:8080/apex but everytime I restart my computer, I need to use "service oracle-xe force-reload" command , can you help me?

        ReplyDelete
        Replies
        1. It seems like you have chosen not to to start oracle at the startup while configuring it. If it's true you can solve the problem just by reconfiguring it. To do so, enter the following command in the terminal :

          sudo /etc/init.d/oracle-xe stop
          sudo rm /etc/default/oracle-xe
          sudo /etc/init.d/oracle-xe configure

          This should solve the problem after a re-boot. Else you can add following command to rc.local above the line containing " exit 0 ":

          $ORACLE_HOME/config/scripts/oracle-xe start

          Don't forget to replace $ORACLE_HOME by absolute path which you can check using command " echo $ORACLE_HOME ". You need to re-boot to apply the changes.

          Hope this helps you...

          Delete
      5. thank your very much, i used "$ORACLE_HOME/config/scripts/oracle-xe start" and it is working well, you are the best :)

        ReplyDelete
      6. Many thanks to you, can you write a post about how to install oracle enterprise 11g on ubuntu 12.04 ? This will be very helpful and popular post. Thank you in advance...

        ReplyDelete
        Replies
        1. I am sorry but currently I don't have the Enterprise version of Oracle 11g to try out.I will certainly write the post on its installation whenever I get it.

          Delete
        2. I am waiting your good news :)

          Delete
      7. Hi,

        Not been able to install oracle 11g XE ..Error while trying to convert it to .deb using alien using 10.04 TLS but .deb file is not generated

        sudo alien --to-deb --scripts -g oracle-xe-11.2.0-1.0.x86_64.rpm
        error: incorrect format: unknown tag
        Directories oracle-xe-11.2.0 and oracle-xe-11.2.0.orig prepared.

        ReplyDelete
        Replies
        1. Why are you using "-g" option there. As per man-page of alien, this option generates a temporary directory suitable for building a package from, but do not actually create the package.

          So, just use the command :
          sudo alien --scripts --to-deb oracle-xe-11.2.0-1.0.x86_64.rpm

          and it will be done.

          Delete
        2. Actually i had to use -g as it was giving me architecture error amd64 and i386 as i am on i386.

          this is wat it shows if i do.

          dh_gencontrol: Compatibility levels before 5 are deprecated.
          dpkg-gencontrol: error: current host architecture 'i386' does not appear in package's architecture list (amd64)
          dh_gencontrol: dpkg-gencontrol -ldebian/changelog -Tdebian/oracle-xe.substvars -Pdebian/oracle-xe returned exit code 255
          make: *** [binary-arch] Error 9
          find oracle-xe-11.2.0 -type d -exec chmod 755 {} ;
          find: `oracle-xe-11.2.0': No such file or directory
          rm -rf oracle-xe-11.2.0

          Delete
        3. I don't think that you can install the oracle 11g XE on ubuntu 32-bit ( i386 ) systems. Oracle has not yet released a 32 bit version of Oracle 11g Express Edition. You need to have a 64-bit installation of Ubuntu to use the 64-bit version which is available at the Oracle site.

          Delete
      8. works fine until I reboot. After rebooting and starting sqlplus I get (after entering user, passwd):

        ERROR:
        ORA-01034: ORACLE not available
        ORA-27101: shared memory realm does not exist
        Linux-x86_64 Error: 2: No such file or directory
        Process ID: 0
        Session ID: 0 Serial number: 0

        any idea what I'm doing wrong?

        ReplyDelete
        Replies
        1. You missed the update part b/w steps 6(i) and 6(ii) i.e. take a look at
          http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html

          Delete
        2. Hi again

          first and most important: thanks a lot for your quick answer, I'm really impressed, but

          no, I didn't miss the update part. I did the installation as you described (realy good work). After the installation it works perfect. I'm able to work with SQLPlus, with sqldeveloper and with Datamodeler. I unlocked demo user HR an I worked with its tables. Everything went fine. But after a reboot, I run into the above mentioned troubles. Could it be, that the changes I made are removed (or overwritten) by an login script? I didn't made any script myself.

          Delete
        3. Hi again

          I played a little around and found out, that when I stop the database after rebooting and repeat the 3 commands:

          sudo rm -rf /dev/shm
          sudo mkdir /dev/shm
          sudo mount -t tmpfs shmfs -o size=2048m /dev/shm

          and start the database again, it works !!!

          So what can I do, that the changes with the three commands survive a reboot of the system ?

          Hope you can help me (in fact your post helped me lot, many thanks) to solve this last issue.

          thanks, peter

          Delete
        4. In my post " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html " , I have already mentioned the trick to make the above changes (/dev/shm) permanent. Please check again carefully ( 2nd last line) .

          Delete
        5. Hi again

          I did all exactly as you posted, including the X-Bit for rc.local etc. - the result is the same.

          when i (after booting the system) stop oracle, execute the three lines and restart oracle -> it works

          when i (after booting the system) execute the three lines -> it doesn't work

          so i asume, that these commands should be executed before oracle starts. could it be, that oracle is already started when my rc.local is executed in the boot process and therefore this will be with no effect?

          thanks for your endurance
          peter

          Delete
        6. Kindly check the updated trouble-shooting post " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html "

          Hope this time it helps...

          Delete
        7. perfect, great, fantastic !!! now it works perfect !!!
          thank you very much for your endurance
          hope i wasn't to annoying
          best regards, peter

          Delete
      9. Sorry, it's me again (no, I really don't want you spam)

        I have also seen, that when I start my shell, I get:

        touch: kann »/var/lock/subsys/listener“ nicht berühren: Keine Berechtigung
        peter@trueWorld:~$


        So the touch command in the .bashrc seems not to work (can't touch due to missing rights). Don't know whether this is of importance.

        many thanks, peter

        ReplyDelete
        Replies
        1. It is not important that to which user that file belongs but important is that the file ( /var/lock/subsys/listener ) should be present. You are getting the above error because of the reason that the file belongs to root user. You can check this by following command :
          ls -l /var/lock/subsys/listener.
          So, you can delete the file using command :
          sudo rm /var/lock/subsys/listener
          Next time when you will open the shell it won't give the error. Also I advise you to add " 2>/dev/null " after the touch coomand in the ".bashrc" i.e. your ".bashrc' should contain the line :
          mkdir /var/lock/subsys 2>/dev/null
          touch /var/lock/subsys/listener 2>/dev/null

          in-stead-of

          mkdir /var/lock/subsys
          touch /var/lock/subsys/listener

          Delete
      10. The Red Hat based installer of Oracle XE 11gR2 relies on /sbin/chkconfig, which is not used in Ubuntu. The chkconfig package available for the current version of Ubuntu produces errors and my not be safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully:
        sudo vim /sbin/chkconfig

        (copy and paste the following into the file )
        #!/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

        Save the above file and provide appropriate execute privilege :
        chmod 755 /sbin/chkconfig
        how can i save the above file from terminal

        ReplyDelete
      11. how can i save the above file from terminal?

        ReplyDelete
        Replies
        1. You need to create a new file using vim editor. If you are not familiar with vim then you have following choices :-
          1) use google to know how to use vim
          2) use any other editor you are familiar with e.g. nano
          3) use following command to create the file :

          gksudo gedit /sbin/chkconfig

          Next copy and paste into the file and save it.

          4) Download the chkconfig file from my ubuntu-one share " http://ubuntuone.com/6jBGhwN9hFMf8uXnb13L5p " to your desktop and then copy it to /sbin folder using the command :
          sudo cp /home/your_user_name/Desktop/chkconfig /sbin/chkconfig

          Don't forget to change the permission of the file :

          chmod 755 /sbin/chkconfig

          Delete
      12. hello hey can you tell me what i need modify

        Specify a password to be used for database accounts. Note that the same
        password will be used for SYS and SYSTEM. Oracle recommends the use of
        different passwords for each database account. This can be done after
        initial configuration:
        Confirm the password:

        Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y

        Starting Oracle Net Listener...Done
        Configuring database...
        Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

        for this error idon't understand what i need modify or whi faile teh configuration
        atentamente: tu compadre Daniel.(from Mexico)

        ReplyDelete
      13. Try reconfiguring oracle 11g XE using my post " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html".

        ReplyDelete
      14. root@dany-Satellite-L305D:~/Descargas/Disk1# sqlplus sys as sysdba

        SQL*Plus: Release 11.2.0.2.0 Production on Fri Aug 3 13:40:22 2012

        Copyright (c) 1982, 2011, Oracle. All rights reserved.

        Enter password:
        ERROR:
        ORA-12705: Cannot access NLS data files or invalid environment specified


        Enter user-name:

        how can i repair the error i did change the kernel.shmmax by my RAM and i don't understand what i'm doing bad

        ReplyDelete
      15. Replies
        1. If you are asking about the user-name for the above comment then it will be the database user ( e.g. sys as sysdba ). Next , as it is not able to locate NLS data file and giving environment error, so I can assume that you have not configured the oracle environment properly. For this add the 6 lines in the step 7(a) to the .bashrc file of both root as well as the user which you use to login to your OS. Then either execute your .profile or open a fresh terminal.

          Hope this helps...

          Delete
      16. Hi Manish,

        I followed all the steps but at the end I am getting thew following message

        Starting Oracle Net Listener...Done
        Configuring database...
        Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
        luke@padinjhattil:~/Downloads/Disk1$ cd /
        luke@padinjhattil:/$ cd home/oracle
        bash: cd: home/oracle: No such file or directory

        Could you please tell me where I have gone wrong????????

        Regards,

        Luke

        ReplyDelete
        Replies
        1. Try re-configuring oracle 11g XE using my post " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html".

          and btw, the home of the user oracle is by default set to $ORACLE_HOME and not /home/oracle. You can check the value of ORACLE_HOME using the command :
          echo $ORACLE_HOME

          Delete
      17. Thank you very much, I was finally able to install Oracle XE, without restoring to the ugly solution of having to install CentOS in KVM.

        ReplyDelete
      18. thanks you so much. i was trying hard for this and finally able to find your guide. Again thanks very much for sharing.. works like charm..

        ReplyDelete
      19. I followed your steps evrything worked fine but after rebooting machine getting

        Enter user-name: arvind
        Enter password:
        ERROR:
        ORA-12547: TNS:lost contact

        ReplyDelete
      20. Are you able to login using the command " sqlplus sys as sysdba " ? Use the password you created while configuring the Oracle 11g XE R2 .

        If not what error message do you get ?

        ReplyDelete
      21. 1.I want to completely remove my oracle 11g r2 standard edition(2 zip files dload) and completely revert all changes (including symbolic links!) on my ubuntu 12.04 system as it has created many problems during pre installation and post installation),so that i can again install 11g r2 express following ur fantastic guide.so plz guide me.
        or
        2.plz give step by step 11gr2 standard edition installation on ubuntu 12.04 in detail(so that I can review my mistakes,including pre and post installation and ports).Please help me.
        These are the posts from which I installed 11g r2 standard..
        1.http://www.makina-corpus.org/blog/howto-install-oracle-11g-ubuntu-linux-1204-precise-pangolin-64bits
        2.http://edin.no-ip.com/comment/344
        plz plz help me...plz take sme time

        ReplyDelete
        Replies
        1. please reply me manish...

          Delete
        2. Hi Raghu,
          The two links which you gave are installing the oracle 11g standard edition in two different locations ( /opt/oracle and /var/lib/oracle ). So, I am not sure which/what path you followed to install in your machine. Secondly, currently I don't have access to any test system where I can try installing the standard edition and provide you with polished installation steps. Sorry for that.

          Delete
        3. I followed /var/lib/oracle..atleast I wanted clean uninstall steps..!

          Delete
        4. Hi Raghu,

          Considering that you followed the steps as mentioned in http://edin.no-ip.com/comment/335 ,
          performing the below mentioned steps should help you to get rid of your oracle installation. BUT please take the backup of ALL important data before proceeding :
          1) sudo rm -rf /u01 /u02
          2) sudo rm -rf /var/lib/oracle
          3) sudo rm -rf /usr/lib64
          4) sudo update-rc.d -f oracle remove
          5) sudo rm -f /etc/init.d/oracle
          6) sudo rm -f /bin/basename
          7) sudo rm -f /bin/rpm
          8) sudo rm -f /etc/rc.d
          9) sudo rm -f /etc/redhat-release
          10) delete/comment only the lines you added in /etc/sysctl.conf ( I think, by default it doesn't contain any uncommented line )
          11)do the same for /etc/security/limits.conf , /etc/pam.d/login and /etc/pam.d/su
          12)reboot the system.

          Hope this helps you...

          Delete
      22. Great tutorial!

        I'm stuck with a strange error. When I use "sqlplus sys as sysdba" I get:
        SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 4 10:40:43 2012

        Copyright (c) 1982, 2011, Oracle. All rights reserved.

        Enter password:
        ERROR:
        ORA-01031: insufficient privileges

        Any suggestions?

        ReplyDelete
        Replies
        1. Hi Panagiotis,

          Thanks for the compliment.

          Can you please try re-configuring oracle 11g XE using my post " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html".

          Please feel free to ask again if you face any more issue.

          Delete
        2. Hi Manish,

          I already did what you say in that post because when I first tried to install XE I couldn't configure oracle (configuration fail error when using "sudo /etc/init.d/oracle-xe configure").

          Anyway, I really thank you for your time.

          Delete
        3. Ok, figure it out. The think was to make myself and oracle members of the DBA group.
          sudo usermod -a -G dba oracle
          sudo usermod -a -G dba yourname

          and confirming :
          sudo grep dba /etc/group
          you should get something like:
          dba:x:1001:oracle,yourname

          After that everything went smoothly...

          Thanks Manish.

          Delete
        4. I had the same issue. Thanks to Manish for the very clear guide (on a complicated topic) and to Panagiotis for the fix.

          Delete
      23. Hi Paladugu,
        Can you please try re-configuring oracle 11g XE using my post " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html".

        Please feel free to ask again if you face any more issue.

        And for sharing the screen-shots, first upload it to ubuntu-one and then share the public link for it.

        ReplyDelete
      24. ur really intelligent,manish!I will try using ur steps,but meanwhile,please take some time to perform a 11g standard edition install on ubuntu12.04.waiting for ur clean and troubleshooting post!

        ReplyDelete
      25. AN EXCELLENT TUTORIAL...
        TRIED MANY OTHER INSTALLATION GUIDES AND HAD NEARLY GIVEN UP ON INSTALLING ORACLE ON UBUNTU 12.04

        BUT YOUR TROUBLESHOOTING AND INSTALLATION GUIDE HELPED TO NEATLY INSTALLING WITHOUT ANY PROBLEMS AT ALL

        THANKS A LOT

        ReplyDelete
      26. good work boss... :) http://indermohan.spaces.live.com

        ReplyDelete
      27. Thank you so much for this! This was such a headache until I found your walkthrough!

        ReplyDelete
      28. Excellent post in combination with the trouble-shooting and installing-swap space pages. That made a big difference, compared to other similar posts out there..
        Works perfectly in my vmware!

        ReplyDelete
      29. Great!! Now I can run my oracle and apex again...I tried many tutorials but this is the only one that works directly.

        ReplyDelete
      30. Thanks for the great tutorial, I would like to know if your guide apply the same for Ubuntu Server?

        Armando

        ReplyDelete
        Replies
        1. Thanks for the compliment.
          I have not got the chance to test the guide on a Ubuntu Server Installation. Hence, I have no idea whether it will work or not.
          If you wish, you can try it on your own risk. Please take backup of all important data before you try it.
          If successful, then do post here your results so that other users may benefit from it.

          Delete
      31. Hi!
        One more thing I found: I needed to install bc for everything to work ok
        apt-get install bc

        it was giving me "bc not found" error on the step where you install oracle-xe from .deb file

        ReplyDelete
      32. I love you!!
        God bless you! XD.

        After many unsucessfull trials , i finally did it, thank you so much.

        ReplyDelete
      33. Thank you! I've been trying to get this going for a day and a half. You got me through it. Thanks!

        ReplyDelete
      34. Hi manish,
        I am getting the below message when i execute step 6 i)
        'ldconfig deferred processing now taking place'
        Is it okay to go ahead...?

        ReplyDelete
        Replies
        1. and I went ahead and when i executed the step for configuration, I got the below message
          'Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details'
          Please help me out in this.

          Delete
        2. The message you got ( 'ldconfig deferred processing now taking place' ) is absolutely normal message which you get when you install any application in Ubuntu.

          For the failed configuration , please try re-configuring Oracle 11g XE using my trouble-shooting post i.e. http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html .

          Please feel free to ask again if you face any more issue.

          Delete
        3. Now configuration is done successfully.
          But i am not able to find the .bashrc in my home directory (.profile is present in the home directory). So is that i have to touch .bashrc in /etc/ ..?

          Thanks in advance

          Delete
        4. The .bashrc should be present in your home directory. Check it using following command :

          ls -la ~/.bashrc

          If it's not there , then you can just create it by using following command in your home directory:
          vim .bashrc

          and make the required changes.

          Hope this helps....

          Delete
        5. I have created a .bashrc file in my home directory and add those in environmental variables given step 7 a). But when i ran step 8), i got below message
          'Oracle Database 11g Express Edition is not configured. You must run
          '/etc/init.d/oracle-xe configure' as the root user to configure the database.'

          and when i tried configuring, i got the below message,

          '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
          '

          Delete
        6. You have to again try re-configuring Oracle 11g XE using my trouble-shooting post i.e. http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html . Do not forget to create the file /etc/rc2.d/S01shm_load as per the last step of the trouble-shooting post. After this you can proceed with step 8 of this post.

          Hope that helps...

          Delete
        7. yeah , i did that this time. now it is working and will have to see it work after next boot.

          Anyway thanks for ur time.

          Delete
      35. Hi, I have installed oracle following your post. It was awesome. Thanks for your post.

        I got some issue with my oracle. In one of my application, I need to set 'oracle.tns.name'. But it is giving me 'XE' is not a valid tns name. Please set valid tns name for property 'oracle.tns.name'. Can you please help out here.

        ReplyDelete
      36. Brilliant tutorial Manish!!! Saved my day!!!

        ReplyDelete
      37. Thanks for this, it's the only that worked. I've got one issue though, the sqlplus command doesn't work in my terminal. I can get into oracle using a web browser or sqldeveloper, but not the sqlplus command, i get the 'command not found' error

        ReplyDelete
        Replies
        1. Add the lines given in Step 7(a) to the .bashrc file of each user ( generally root and your login user ) which will be accessing the Oracle 11g R2. The .bashrc will be present in home directory of the user.
          e.g.:
          manish@D9L412M1:~$ cd $HOME
          manish@D9L412M1:~$ pwd
          /home/manish
          manish@D9L412M1:~$ ls -l .bashrc
          -rw-r--r-- 1 manish manish 3420 May 11 12:15 .bashrc

          The .profile is needed to be executed to load the changes you made in the .bashrc file.To execute the .profile type following command from your home directory in the terminal and press enter.

          . ./.profile

          The result should be something like this :
          manish@D9L412M1:~$ cd $HOME
          manish@D9L412M1:~$ pwd
          /home/manish
          manish@D9L412M1:~$ . ./.profile
          manish@D9L412M1:~$

          Hope this helps...

          Delete
      38. Thank you, very good post, a question, the system works well in the desktop edition of Ubuntu

        ReplyDelete
      39. Hello again, I'm the person who wrote the last comment, after giving several laps, I solved the problem by running this. / u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh

        and now I can connect, this command is not issued in your example

        ReplyDelete
        Replies
        1. This script ( /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh ) contains the same commands as given in Step 7(a) and is used to setup the environment variables required by Oracle 11g XE. If you don't add the lines in Step 7(a) to your .bashrc or .bashrc of the user which you use to connect to Oracle 11g XE, the change won't be permament and is valid only for one session.

          Delete
      40. Thank you! This walkthrough was almost perfect; got Oracle XE up and running in about an hour. One small imperfection: when I installed the package I was asked if I wanted to overwrite the created/existing script /etc/init.d/oracle-xe. I'm not sure what I chose, but it apparently was the right guess.

        Again, thank you!

        ReplyDelete
      41. Thank you very much!
        Worked from first try!

        ReplyDelete
      42. Absolute +1 for the post. Thanks for sharing.

        ReplyDelete
      43. hi manish,please help me out.i got all the steps working but when i run the command sudo service oracle-xe start, i get a message

        Oracle Database 11g Express Edition is not configured. You must run
        '/etc/init.d/oracle-xe configure' as the root user to configure the database.

        i ran the config file both as root as well as normal user.but no luck please help

        could you please help me out.

        ReplyDelete
        Replies
        1. Do you get any error message when you run the following command :
          sudo /etc/init.d/oracle-xe configure

          If yes then please post the error message here. If you don't get any error message then check whether the file "/etc/default/oracle-xe" is present , is of current time and contains the configuration as per your inputs while running the configure command.

          e.g.:

          1) command :
          ls -l /etc/default/oracle-xe

          Output:

          -rw-r--r-- 1 root root 522 Jun 28 19:51 /etc/default/oracle-xe

          2) Command:
          cat /etc/default/oracle-xe

          Output:

          #This is a configuration file for automatic starting of the Oracle
          #Database and listener at system startup.It is generated By running
          #'/etc/init.d/oracle-xe configure'.Please use that method to modify this
          #file

          # ORACLE_DBENABLED:'true' means to load the Database at system boot.
          ORACLE_DBENABLED=true

          # LISTENER_PORT: Database listener
          LISTENER_PORT=1521

          # HTTP_PORT : HTTP port for Oracle Application Express
          HTTP_PORT=8080

          # Configuration : Check whether configure has been done or not
          CONFIGURE_RUN=true

          Hope this helps.....

          Delete
      44. Thanks a lot for this guide Manish. With your help I was up and running quick.

        ReplyDelete
      45. 1) THis guy copied your guide:

        http://sysadminnotebook.blogspot.it/2012/10/installing-oracle-11g-r2-express.html

        2) Thank for the guide, btw, you should add

        apt-get install bc flex

        to the prereq, as without it it won't install.

        ReplyDelete
        Replies
        1. 1) Thanks for the info. I have no issues if he copied my stuff... main Philosophy of Ubuntu is to share information for good of other people.
          2) Whenever I have installed the Oracle 11g XE, I didn't need to install these to programs. ( Moreover I think bc is included by default with ubuntu ) .

          Delete
      46. Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y

        Starting Oracle Net Listener...Done
        Configuring database...
        Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

        i have seen recent posts about this issue but that link not at all respondind

        ReplyDelete
        Replies
        1. Have you tried the steps given in " http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html ".
          If not then try it. If you are successful then its fine. Else post your error message here.

          Delete
      47. Hi Manish,
        i have no clue why i get this error:
        marco@marco-System-Product-Name:~$ sudo service oracle-xe start
        Starting Oracle Net Listener.
        Starting Oracle Database 11g Express Edition instance.
        Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.

        What do you think?

        ReplyDelete
      48. I got the following, too:
        /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr
        and than:
        /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

        /u01/app/oracle/product/11.2.0/xe/bin/sqlplus
        /u01/app/oracle/product/11.2.0/xe/bin/sqlplus: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

        So the libaio.so.1 is missing!? So now, how do i get it?

        ReplyDelete
      49. Ok, i just did:
        apt-get install libaio1
        and that's it! Sorry for worrying. :-(

        ReplyDelete
      50. Manish:
        Thanks for your very excellent set of instructions. I now have Oracle running on my Ubuntu 12.04, and only had to make a very few tweaks.
        I mostly use SQL*Plus from the command line, and that works fine, but I was wondering if you also have any instructions on how to connect LibreOffice to Oracle to read some of the tables there.
        Frank

        ReplyDelete
      51. Awesome stuff Manish! I tried someone else's instructions and failed utterly. Your instructions were shorter and easier and worked perfectly for me. Hats off!

        ReplyDelete
      52. Great instructions, work perfectly! Thank you!

        ReplyDelete
      53. Hi , I have followed your steps until 7 a)
        When i execute .profile I get error.

        $ ./.profile
        ERROR: Failed to add module "NetID". Probable cause : "Unknown code ___P 3".
        $ sudo service oracle-xe start
        Oracle Database 11g Express Edition is not configured. You must run
        '/etc/init.d/oracle-xe configure' as the root user to configure the database.

        If i do /etc/init.d/oracle-xe configure it is not taking the same port value , i.e the previous configure was successful. Is anything else missing ?

        ReplyDelete
      54. Hi My unbuntu machine already have a /sbin/chkconfig. At first i copied the content you gave in /sbin/chkconfig at last. But doesn't work as those are shell commands. Is there a perl version of that code is availble

        ReplyDelete
      55. Your trouble shooting guide (separate /dev/shm) solved my problem - thanks!

        ReplyDelete
      56. You are awesome.. Thank you so much

        ReplyDelete
      57. Manish, i face this issue when on start up

        Starting Oracle Net Listener.
        Starting Oracle Database 11g Express Edition instance.
        Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.

        What could be the issue?

        ReplyDelete
        Replies
        1. Infact, i got this issue during the configuration itself

          /bin/chmod: cannot access `/u01/app/oracle/oradata': No such file or directory
          /bin/chmod: cannot access `/u01/app/oracle/diag': No such file or directory

          Are these linked?

          Delete
      58. Hi Manish,

        Thanks for the great post ..!
        I just followed all the instructions .. well it went well.

        But in the end, when I try to start the oracle-xe i get the error

        csd@fireci:~$ sudo service oracle-xe start
        Starting Oracle Net Listener.
        Starting Oracle Database 11g Express Edition instance.
        Failed to start Oracle Net Listener using /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr and Oracle Express Database using /u01/app/oracle/product/11.2.0/xe/bin/sqlplus.
        csd@fireci:~$

        Could you help ..

        Regards, Mohan

        ReplyDelete
      59. This is that only tutorial I found online that works.

        Thanks,

        Jerry

        ReplyDelete
      60. Hi!! thank you for this tutorial ! it seems be awesome but when i was following it,i found a problem and i really need your help :// when i
        write in my terminal " ii) sudo /etc/init.d/oracle-xe configure " and after finishing all steps,the output is similar to following :
        Starting Oracle Net Listener...Done
        Configuring database...
        Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
        and when i consult the log files i didn't understand nothing :/ so pleeeeeeeease heeeeeeelllpppppppppppppppppp :'(((

        ReplyDelete
      61. hi it's me again !! well, i found the solution in the Trouble-shooting oracle post.but now i've an other problem.after the configuring step and when i tried to run sqlplus under the prompt it says "command notfound" !! what i did wrong ?? :'((

        ReplyDelete
        Replies
        1. You have not added the commands mentioned in the step 7(a) to the .bashrc of the user from which you are running the sqlplus command.

          Delete
      62. Hi I get this error..
        cannot create directory `oracle-xe-11.2.0': File exists
        unable to mkdir oracle-xe-11.2.0: at /usr/share/perl5/Alien/Package.pm line 257

        ReplyDelete
      63. Dear Mr.Manish Raj,

        Many thanks for the very helpful, detailed (not missing any steps) instructions without which I am certain I would have needed x times more to get this working. I am certain I am not alone here and many of your blog readers as well would have saved many many hours of their time.

        Secondly kudos for thinking through the possibilities of people skipping/mi(e)ssing steps, and providing in the trouble shoot area steps for how to recover from non-working/failed installations so that it can all be tried again from the beginning.

        Thanks a ton, and in fact this post apart from explaining Oracle XE installation on Ubuntu 64 bit, is also a demonstration sample of how such tutorials should be written!

        Warm regards,
        G.Venugopalan

        ReplyDelete
      64. Just wanted to add my thanks. This worked perfectly after I performed the troubleshooting steps you also listed. I'm using Ubuntu 12.04 server. Great tutorial!

        ReplyDelete
      65. This comment has been removed by the author.

        ReplyDelete
      66. Thank you very much manish for this great tutorial.
        Does oracle express edition include proc precompiler, if does, then how to use the proc command, because it is saying "no proc command found "? Please reply soon.

        ReplyDelete
      67. Thanks Manish.

        This is very useful tutorial. I was able to install oracle without any hassles.

        Thanks a lot!!
        Vinod

        ReplyDelete
      68. Hi.
        I've followed your steps and managed to start db (almost)successfully.
        I can use sqlplus to connect to the db (it says Connected to Oracle ... Production), but I cannot connect using sql developer from another machine (Windows) - it keeps saying the listener doesn't know the SID (I'm using XE).

        Any idea?

        By the way.... nice tips on your blog!

        ReplyDelete
        Replies
        1. You can take help from "Connecting via Windows" section of the Ubuntu community help for Oracle 10g ( https://help.ubuntu.com/community/Oracle10g ) . The tutorial is old but should hold good for latest version of ubuntu , windows and oracle.

          Hope this helps...

          Delete
      69. Thanks for the info. Worked like a charm. Saved close to a day of my time. Thanks again.

        ReplyDelete
      70. i want to install oracle 10g or 11g express edition Window 7 64 bit operating system

        ReplyDelete
      71. Thanks. It helped a lot.

        ReplyDelete
      72. Después de googlear tanto di con este post, buenísimo, me funcionó perfectamente.

        After google a lot i found this post, the best, it works perfect

        ReplyDelete
      73. wow great.hey buddy i got a problem

        --what mean this error ?
        please buddy help me.

        SQL> startup
        ORA-01078: failure in processing system parameters
        LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora'

        ReplyDelete
        Replies
        1. Is the file mentioned in the error ( /u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora ) present in the path ?
          You can check it by using the command "ls -l /u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora". The file should belong to oracle user and dba group.

          Delete
      74. I was trying to install oracle xe and I got the next trouble while i was trying to start the Database

        sudo /etc/init.d/oracle-xe configure

        Starting Oracle Net Listener...Done
        Configuring database...
        Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

        ReplyDelete
        Replies
        1. Hope u followed the steps properly and also checked out the trouble-shooting steps at http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html. If u are still having the problem, can you please send the logs present in the directory /u01/app/oracle/product/11.2.0/xe/config/log to my email id : manish.raj.tcs@gmail.com for analysis.

          Thanks.
          Manish Raj

          Delete
      75. Manish, You totally rock! This was a great tutorial and worked first time for me. Thanks so much for taking the time to put this together.

        ReplyDelete
      76. Sorry, but I can not achieve start the database. I get the following:

        jrandres@jrandres-laptop:~$ sudo service oracle-xe start
        oracle-xe: unrecognized service
        jrandres@jrandres-laptop:~$

        good blog<!

        ReplyDelete
        Replies
        1. Try running following command :
          sudo /etc/init.d/oracle-xe start

          Delete
      77. Manish bro just one question did you run it as root or normal user as i keep on getting root privilges required and its very frustrating if you could let me know whther i should install using root or normal user

        ReplyDelete
        Replies
        1. You may install the Oracle 11g XE R2 by directly using root user but be extremely careful with your commands. A slight mistake can mess up your system. If you are running the same commands using sudo, you have added advantage of stopping and reviewing the command you just fired while you enter your password.

          Delete
      78. Hi Manish
        I have limited experience with ubuntu or oracle but I need to replicate one of my customers infrastructure. I first of all would like to thank you for the time and effort you have put in to deliver this post as it is easy to follow plus you explain well. Unfortunately I have a problem at step 4 where I a get the following error:
        sudo alien --scripts --to-deb oracle-xe-11.2.0-1.0.x86_64.rpm
        Unpacking of 'oracle-xe-11.2.0-1.0.x86_64.rpm' failed at /usr/share/perl5/Alien/Package/Rpm.pm line 168.

        I am using ubuntu server 12.10 in a VM.

        ReplyDelete
        Replies
        1. My guide is for Ubuntu desktop version and may not be fully applicable for server edition.
          Hope you properly installed the pre-requisites i.e. libaio1 unixodbc .As per the error line number given above ( #168 of /usr/share/perl5/Alien/Package/Rpm.pm ), it seems either 1) you are low on space ( need at least approx. 700 MB free space ) or 2) you don't have cpio / lzma programs installed. Check for programs by following commands:
          manish-raj@manishraj-Inspiron-1012:~$ which cpio
          /bin/cpio
          manish-raj@manishraj-Inspiron-1012:~$ which lzma
          /usr/bin/lzma
          These programs are present by default in normal installation of Ubuntu. You can install cpio by "sudo apt-get install cpio" and lzma by "sudo apt-get install xz-utils".

          Hope this helps..

          Delete
        2. Thanks Manish I will take another look

          Delete
      79. Manish..thanks very much for this valuable instructiOn.. Saved really a lot of time.. :)

        ReplyDelete
      80. Manish, Fantastic tutorial, Thank you very much , very resourceful... Can you post how to install oracle 11g R2(complete database) in ubuntu 12.04

        ReplyDelete
      81. It's great, only it's not working...
        Spent two days,trying to run Oracle XE on my Ubuntu without success...
        Ended up with some strange problems while creating undo tablespaces, and gave up. If it's like this - it's not worth using.
        Hope that companies will understand it and switch to some great, open-source databases instead of this overpriced crap.

        ReplyDelete
      82. A perfect instruction! Everything worked from beginning! Amazing! Thank you very much.

        ReplyDelete
      83. Very helpful. Thanks a lot!

        ReplyDelete
      84. Hi Manish,

        I tried installing oracle, but ending up with errors :(

        I am getting the below errors when I tried to re-install following your troubleshooting post:


        Selecting previously unselected package oracle-xe.
        (Reading database ... 70689 files and directories currently installed.)
        Unpacking oracle-xe (from oracle-xe_11.2.0-2_amd64.deb) ...
        dpkg-deb (subprocess): decompressing archive member: internal gzip read error: ': incorrect data check'
        dpkg-deb: error: subprocess returned error exit status 2
        dpkg: error processing oracle-xe_11.2.0-2_amd64.deb (--install):
        cannot copy extracted data for './u01/app/oracle/product/11.2.0/xe/bin/wrap' to '/u01/app/oracle/product/11.2.0/xe/bin/wrap.dpkg-new': unexpected end of file or stream
        Processing triggers for ureadahead ...
        Processing triggers for libc-bin ...
        ldconfig deferred processing now taking place
        Errors were encountered while processing:
        oracle-xe_11.2.0-2_amd64.deb
        root@techknowdomain:/home/oracle/Disk1# sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb
        (Reading database ... 70689 files and directories currently installed.)
        Unpacking oracle-xe (from oracle-xe_11.2.0-2_amd64.deb) ...
        dpkg-deb (subprocess): decompressing archive member: internal gzip read error: ': incorrect data check'
        dpkg-deb: error: subprocess returned error exit status 2
        dpkg: error processing oracle-xe_11.2.0-2_amd64.deb (--install):
        subprocess dpkg-deb --fsys-tarfile returned error exit status 2
        Processing triggers for ureadahead ...
        Processing triggers for libc-bin ...
        ldconfig deferred processing now taking place
        Errors were encountered while processing:
        oracle-xe_11.2.0-2_amd64.deb


        Can you please help me on this?

        Regards,
        Chandan

        ReplyDelete
      85. Very nice tutorial..
        i m trying to install oracle on Linux Mint Debian 64 bit..
        gotta problem...
        At starting everything works fine...
        (at time of installation, i did minor changes
        instead of 'awk', i used 'gawk'
        )
        but once i reboot...everything got ruind..
        I searchd for dirctories...
        subsys folder missing..so i manually created 'subsys' and 'listener'.
        then
        i had already created temp user...which didnt loggd after tis...
        getting error of unsufficint privilgs..
        thn i connect as sysdba using 'sys'
        i got connected...but nothing work..
        showing error 'oracle not available'...
        Please help if possible
        Thnx...

        ReplyDelete
        Replies
        1. Are you able to manually start the database using the startup command after logging in using sys user ??

          Delete
      86. I found a solution (surfing online and trying on my own) for the ORA-00845: MEMORY_TARGET problem.

        When you create the file /etc/rc2.d/S01shm_load you have to write this in it:

        #!/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
        mount --move /run/shm /dev/shm
        mount -B /dev/shm /run/shm ;;
        *) echo error
        exit 1 ;;
        esac



        So the problem was in this line:
        sudo mount -t tmpfs shmfs -o size=2048m /dev/shm

        Or, to be honest, the problem is in the fact that this line wasn't preceeded by this one:
        mount --move /run/shm /dev/shm

        This should do the trick. At least on Ubuntu 12.10

        ReplyDelete