Installing Oracle 11gXE on Mint and Ubuntu

Things have been a bit hectic lately. What with putting in a new kitchen, being insanely busy at work, and trying not to come out with embarrassing sheep jokes, I’ve ended up with quite a long list of things to do blog-wise.
Top of the list, until now, was installing the long-awaited Oracle 11gXE Release 2 onto one of my Linux machines.
Yes, the free version of Oracle’s RDBMS has finally had an upgrade from 10g and I really want to get my hands on it and have a good nose around.
As well as being based on the latest release of the RDBMS, the Express Edition has had one or two other improvements added. Maybe the most significant of these is that the limit for the amount of user data that XE can hold has been increased from 4GB to 11GB.
What I’m going to do here is :

  • Go through the package conversion process
  • Install the database using steps applicable both to Mint and Ubuntu ( and any other Debian based distro)
  • Apply some finishing touches so that the menu items work as intended
  • Along the way, we’ll find out just why Oracle can’t speak English (and lots of other languages), where Mint has hidden the .bashrc, and how Aliens can be friendly.

Because I’m trying to cover both distros in this post, the installation process will be done entirely on the command line. Don’t worry, it’s not as bad as it sounds.

But first…a small morsel of Linux history. Debian, the distro upon which both Mint and Ubuntu are based, was named after a Deb. I had to mention that as this will cause my beloved to think that I’m writing about her ( again), and thus give me enough time to finish writing this !

What are we waiting for then ? Let’s get going.

Before you install – counting the bits

In fact, the experience of constructing flat-packed kitchen units will stand me in good stead for this installation. This is because, whilst XE is available for both 32 and 64-bit windows, Oracle have seen fit to release only a 64-bit version for Linux.
This immediately presents me with a bit of a problem because all of my Linux installs are 32-bit.
If you’re not sure whether your current installation is 32 or 64-bit, simply open a terminal and issue the command :

uname -i

If the output of this command is x86_64, the you’re good to go. If it’s i686, then you’re going to need to install a 64-bit version of your OS before you go any further.
For my part, I’ve taken one of my machines and installed a 64-bit version of Linux Mint 11.

Getting the required Linux packages

We need two packages for this installation – libaio1, which Oracle uses, and alien, which will allow us to convert Oracle’s rpm package to a Debian package, which we can then install.
Oracle’s supported Linux distros are based on Red Hat so there is no Debian package available at the time of writing. Some kind soul may eventually build one ( as happened for 10gXE), but for now, we’ll just have to make do and mend.
So, open Terminal and type :

sudo apt-get install alien libaio1

The next step is to get the Oracle package itself. Rather than go to a repository, we need to go to the web page. Oh, how Windows.
Anyway, point your browser to the 11g Express Edition Download Page. and select Oracle Express Edition 11g Release 2 for Linux x64.
If you haven’t already got an account, you’ll have to create one, but it doesn’t cost anything and you’re unlikely to get loads of spam filling up your inbox as a result.
Save the file ( the default of the Downloads directory is as good as any) and away you go.
Congratulations, you are now the proud owner of a 301 MB file called oracle-xe-11.2.0.1.0.x86_64.rpm.zip

RPM to DEB…with nothing up your sleeves

The next step is to unzip the downloaded file :

unzip oracle-xe-11.2.0.1.0.x86_64.rpm.zip

The output for this command should be something like :

Archive:  oracle-xe-11.2.0-1.0.x86_64.rpm.zip 
   creating: Disk1/ 
   creating: Disk1/upgrade/ 
  inflating: Disk1/upgrade/gen_inst.sql  
   creating: Disk1/response/ 
  inflating: Disk1/response/xe.rsp   
  inflating: Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm  

The unzipped rpm is in the Disk1 sub-directory. Now all we need to do is to use alien to magically transform the ugly rpm into a beautiful deb. Look, she’s standing behind me right now, so I had to write that.

cd Disk1
sudo alien --scripts oracle-xe-11.2.0-1.0.x86_64.rpm

It’ll probably take a while, but eventually, you should get the following message :

oracle-xe_11.2.0-2_amd64.deb generated

Re-arranging the furniture

Before we play with our shiny new deb file, we need to do a bit of sorting out.
Whilst Red Hat and Debian are both Linux, there are some variations in where stuff is kept. We need to make sure that these bits and pieces are accessible when we’re running the installation.
I know this because I blithely ignored any of these precautions before I ran this the first time with, as they say, hilarious results.
So, the following steps are definitely required if your flat-packed database is to be transformed into an all-singing all-dancing Oracle Instance.

chkconfig

For this particular tip, I’m indebted to a certain Dude who mentioned this in his installation guide for the XE11 beta on Ubuntu.

First off, check to see if you’ve got a chkconfig file under the /sbin directory.
If not, then you need to create the chkconfig file as follows :

cd /sbin
vi chkconfig

The contents of the file ( taken from the above link, complete with comments) should be :

#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Debian by Dude
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

Now set the appropriate permissions on the file :

sudo chmod 755 chkconfig

When you list the file, you should see…

ls -l chkconfig
-rwxr-xr-x 1 root root 611 2011-11-20 15:12 chkconfig

Offer a silent prayer of thanks to the inestimable Mr Dude ( well, I assume it’s Mr from the name), and move on to…

Awk

But we’ve already got awk. I mean, this is Linux. Awk is always there. Except, apparently, when it’s somewhere else.
In this case, Red Hat keeps awk under /bin whereas Debian puts it under /usr/bin.
There is, fortunately, a simple fix – just create a symbolic link to /usr/bin/awk in /bin :

sudo ln -s /usr/bin/awk /bin/awk

If you check, you should now see an entry for awk in the /bin directory :

cd /bin
ls -l awk
lrwxrwxrwx 1 root root 12 2011-11-20 15:49 awk -> /usr/bin/awk

There is one more minor glitch to take care of, but to do this, we need to do the installation first.

Targeting your Memory – avoiding ORA-00845

Just before we get onto that, I’ve added this new bit here.
Between Mint 11 (which is what I used for this installation) and Mint 13 (Maya), something has changed.
This also applies to Ubuntu 11.10 ( and possibly 11.04) and earlier.
Whatever Debian based OS you’re running, it’s worth checking that the shared memory is mounted where Oracle expects to find it.
To do this …

df -k

If the output contains a line like this

Filesystem     1K-blocks     Used Available Use% Mounted on 
...
none             3571460   624088   2947372  18% /dev/shm 

…then you’re good to go – you have shared memory mounted on /dev/shm.

If it’s not there, then you’ll need to add it to avoid needless pain and obscure Oracle Error messages (mainly ORA-00845 :MEMORY_TARGET not supported on this system).
I’ve posted the necessary steps for this, which you can find here.
NOTEI’d especially like to thank Gil Standen for the tip on this one (see his comment below).

Installing Oracle

For this bit, it’s probably a good idea to be connected as root.

sudo su -

If the $ prompt has suddenly become a # you can congratulate yourself on having been bestowed God-like powers. You are now root.
A point to note here is that su – takes you to the home directory of the user you’re switching to ( in this case /root), so you need to cd back to the directory containing the .deb file ( in my case /home/mike/Downloads/Disk1).
NOTE – stay connected as root for these next few steps. I’ll let you know when it’s safe to re-join us other mere mortals.
OK, deep breath…

dpkg --install ./oracle-xe_11.2.0-2_amd64.deb 

At this point you should get output similar to the following :

Selecting previously deselected package oracle-xe. 
(Reading database ... 141714 files and directories currently installed.) 
Unpacking oracle-xe (from ./oracle-xe_11.2.0-2_amd64.deb) ... 
Setting up oracle-xe (11.2.0-2) ... 
Executing post-install steps... 

 Adding system startup for /etc/init.d/oracle-xe ... 
   /etc/rc0.d/K01oracle-xe -> ../init.d/oracle-xe 
   /etc/rc1.d/K01oracle-xe -> ../init.d/oracle-xe 
   /etc/rc6.d/K01oracle-xe -> ../init.d/oracle-xe 
   /etc/rc2.d/S80oracle-xe -> ../init.d/oracle-xe 
   /etc/rc3.d/S80oracle-xe -> ../init.d/oracle-xe 
   /etc/rc4.d/S80oracle-xe -> ../init.d/oracle-xe 
   /etc/rc5.d/S80oracle-xe -> ../init.d/oracle-xe 

You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database. 

Processing triggers for ureadahead ... 
ureadahead will be reprofiled on next reboot 
Processing triggers for bamfdaemon ... 
Rebuilding /usr/share/applications/bamf.index... 
Processing triggers for desktop-file-utils ... 
Processing triggers for python-gmenu ... 
Rebuilding /usr/share/applications/desktop.en_GB.utf8.cache... 
Processing triggers for libc-bin ... 
ldconfig deferred processing now taking place 
Processing triggers for python-support ... 

If you want to start over

From this point on, if, by some chance, you get to a point where you’ve got an intractable error, or realise you’ve missed a step, or simply decide that you really are better off with MySQL after all, you can uninstall Oracle with the following steps :

 /etc/init.d/oracle-xe stop 

Now remove the package…

dpkg --purge oracle-xe 

And finally, tidy-up…

rm -r /u01/app 
rm /etc/default/oracle-xe 
update-rc.d -f oracle-xe remove 

Assuming you’re still raring to go, before you run the final configuration, it’s time for that other bit of tidying up I mentioned earlier.

Lock

the /etc/init.d/oracle-xe that has just been created will be looking for a directory called /var/lock/subsys. On Debian distros this is located in /var/lock.

grep /var/lock/subsys /etc/init.d/oracle-xe

You should see this :

	touch /var/lock/subsys/listener 
	touch /var/lock/subsys/oracle-xe 
			touch /var/lock/subsys/listener 
		touch /var/lock/subsys/oracle-xe 
    if [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/listener 
	rm -f /var/lock/subsys/oracle-xe 

Easiest way to fix this is :

sed -i 's,/var/lock/subsys,/var/lock,' /etc/init.d/oracle-xe

Now to when you check again…

grep /var/lock/ /etc/init.d/oracle-xe

	touch /var/lock/listener 
	touch /var/lock/oracle-xe 
			touch /var/lock/listener 
		touch /var/lock/oracle-xe 
    if [ $RETVAL -eq 0 ] && rm -f /var/lock/listener

Configure Oracle

Now, finally, we’re ready to roll. When you run the configuration, you’ll be prompted for

The HTTP Port for Application Express (default is 8080)
The port for the listener (default is 1521)
A password for SYS and SYSTEM
Whether you want XE to start at boot time

Where appropriate, you can just press Enter to accept the default.

/etc/init.d/oracle-xe configure

Oracle Database 11g Express Edition Configuration 
------------------------------------------------- 
This will configure on-boot properties of Oracle Database 11g Express 
Edition.  The following questions will determine whether the database should 
be starting upon system boot, the ports it will use, and the passwords that 
will be used for database accounts.  Press <Enter> to accept the defaults. 
Ctrl-C will abort. 

Specify the HTTP port that will be used for Oracle Application Express [8080]: 

Specify a port that will be used for the database listener [1521]: 

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]:n 

Starting Oracle Net Listener...Done 
Configuring database...Done 
Starting Oracle Database 11g Express Edition instance...Done 
Installation completed successfully.

You’ll notice that I decided not to have XE startup on boot. I can make any number of technical justifications for this, but Deb just gives me a withering look and tells me it’s because I’m a control freak.

If you are similarly afflicted, do not despair. Once the installation is complete, you will have an option on the desktop menu to allow you to start the database ( assuming you’re condition is not acute and you prefer to start the database from the command line).
NOTE – OK, that’s quite enough of the power trip. You can disconnect from the root account now.

Anyway, the last thing we need to do is setup the environment variables and then we can get on to the database.

Look, Oracle even provides a handy script to do this for us – /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh. I mean, what could possibly go wrong…

Help ! Oracle can’t speak Welsh

It’s English isn’t any better… y posiblimente, no hablo Espanol.
I should probably explain this from the beginning.
When I run the script, I get…

sh /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh 
export: 3: KINGDOM.AL32UTF8: bad variable name 

Time to take a closer look.

cat /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
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 PATH=$ORACLE_HOME/bin:$PATH 

The offending line is the NLS_LANG setting, for which another script is called – nls.lang.sh in the same directory.
The script builds the NLS_LANG value by identifying the appropriate character set and then doing a lookup on locale.
You can follow through what it’s doing as follows :

locale charmap
UTF-8
echo $LANG
en_GB.UTF-8

In the script, the locale charmap output ( UTF-8 in my case) gets resolved to AL32UTF8.
The $LANG value then gets transformed as follows :

echo $LANG |sed 's/[.@].*$//'
en_GB

The script then does another lookup to get the first half of the NLS_LANG value then outputs the concatenated string …

case $locale in 
…
en_gb) nlslang='ENGLISH_UNITED KINGDOM';;
…
esac

# construct the NLS_LANG 
# 
NLS_LANG=${nlslang}.${charset} 

echo $NLS_LANG 

Can you spot where the problem might be ?
Yes, because it’s outputting a string with a space in it but not enclosing it in quotes, instead of returning ENGLISH_UNITED KINGDOM.AL32UTF8, it returns simply KINGDOM.AL32UTF8.

Having looked through the script, you may well encounter this problem if your $LANG starts with any of the following :

af_ZA (South Africa) – Note to Wayne – you don’t have this problem in Australia
ar_AE (United Arab Emirates)
ar_SA (Saudi Arabia)
cs_CZ (Czech Republic)
cy_GB(Wales) – just in case someone was getting smug
en_BW(Botswana)
en_HK( Hong Kong)
en_NZ( New Zealand)
en_ZA(South Africa)
en_ZW(Zimbabwe)
es_AR( Argentina)
es_BO(Bolivia)
es_CL(Chile)
es_CO (Colombia) – yes German, even you
es_CR(Costa Rica)
es_DO (Dominican Republic)
es_EC(Ecuador)
es_GT(Guatemala)
es_HN(Honduras)
es_MX(Mexico)
es_NI(Nicaragua)
es_PA(Panama)
es_PE(Peru)
es_PR(Puerto Rico)
es_SV(El Salvador)
es_US( US Spanish)
es_UY(Uruguay)
es_VE(Venezuela)
gv_GB(Isle of Man)
kw_GB( Cornish)
mi_NZ(Maori New Zealand)
nl_NL( The Netherlands)
pt_BR(Brazil)
sr_YU( Serbian)
zh_CN(China)
zn_HK( Hong Kong – Chinese)
zh_TW(Taiwan)

Given that this file is always run on the machine you are on, the simplest thing to do is to just edit the oracle_env.sh script and hard-code your NLS_LANG setting ( putting it in quotes)….

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe 
export ORACLE_SID=XE 
export NLS_LANG='ENGLISH_UNITED KINGDOM.AL32UTF8' 
export PATH=$ORACLE_HOME/bin:$PATH 

If you now re-run the script, all the environment variables should now be set :

 sh /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh 
echo $ORACLE_HOME 
/u01/app/oracle/product/11.2.0/xe 
echo $ORACLE_SID 
XE 
echo $NLS_LANG 
ENGLISH_UNITED KINGDOM.AL32UTF8 
echo $PATH 
/u01/app/oracle/product/11.2.0/xe/bin:/u01/app/oracle/product/11.2.0/xe/bin:...

At this point, you can go running off to play with your lovely new database. However, it’s probably worth doing a bit of housekeeping first.
Deb’s eyes have just lit up at the mention of housekeeping and she’s started dropping hints about me running the hoover round so I’d better make this quick.

Set environment variables on startup

Rather than having to run the oracle_env.sh script every time you want to play with Oracle on the command line ( and to ensure that the desktop menu items work), it’s a good idea to just call the script from your .bashrc. You’ll probably want to add it to the oracle user’s .bashrc as well.
At this point, Mint users ( at least, the newer ones like me) will be wondering why they can’t find a .bashrc in their home directory.

Apparently, Mint abandoned individual users having their own .bashrc as standard some years ago and instead, simply uses the system-wide file which is at /etc/bash.basrc

Ubuntu users do have their own .bashrc in their home directory but, as with Mint, it executes after the /etc/bash.bashrc

Rather than mess around with multiple .bashrc changes for both myself and oracle, I’ll just add the following to the end of /etc/bash.bashrc

. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh

If you’re an independent minded soul, and do go down the route of setting up a .bashrc in your own home directory, make sure that it’s executable before you start another terminal session :

chmod a+x .bashrc 

What’s on the Menu ?

NOTE – as stated previously, I’m doing this on Mint. More to the point, I’m still on a Gnome 2.3 desktop. The steps here should be pretty much the same on Unity/Gnome 3/KDE/ Xfce but I can’t make any promises.

Update – you can find instructions for setting up the menu on XFCE here.

Whilst you’ve been doing all of that hacking around in terminal, there have been some changes to your Applications menu. Also, your desktop has acquired a new icon with the snappy name oraclexe-gettingstarted.desktop

There are a couple of things you now need to do to before you can go happily clicking on these options.

The desktop icon

Right-click the file on the desktop and select the Permissions tab.
Now check the box to “Allow executing file as program”.
Close the window.

You will notice that the icon has transformed into the familiar Oracle beehive and is now called
Get Started With Oracle Database 11g Express Edition.

Getting the Menu Options to work

Before you take this invitation, there’s one more bit of tidying up, for which you’ll have to return to the command line. Well, you could do this via tools in the Administration menu but I’m trying to keep things generic here.
So, once more unto the terminal dear friends, we need to make both ourselves and oracle members of the DBA group that was created as part of the installation :

sudo usermod -a -G dba oracle 
sudo usermod -a -G dba mike 

Just to check everything has gone according to plan :

sudo grep dba /etc/group 
dba:x:1001:oracle,mike 

Red and Green should not be seen...unless you're installing Oracle on Mint

Getting onto the database

Finally, with the database up and running, click on the Getting Started icon.
After a bit of thought on the part of your browser (well, Oracle actually), you should see something like this :

Ooohh, that looks a bit different. But it does prove it's working

Speeding up startup

Once the novelty wears off, you may begin to tire of the fact that Oracle seems to take an inordinate amount of time to start, and you’re never quite sure when it has actually started.
The reasons for this are connected with the order in which XE starts various components. If you want to tweak this ( and add a desktop notification to boot), head over to this post.

SQLDeveloper

If you want to have a play with Oracle’s own (free) IDE, you can install it on your system by following these instructions.

Acknowledgement

There’s a pretty good tutorial on XE installation by Alexander Penev here, which I used as a starting point. If you have any issues with these steps, it may well be worth a look.

I’d love to stay for a while, but domestic drudgery calls.

About these ads

103 thoughts on “Installing Oracle 11gXE on Mint and Ubuntu

    • Dragan,

      thanks for pointing that out. I’ve now corrected the typo.
      My apologies to anyone who tripped over my “fat fingers” whilst following this guide.

      Mike

      • Just few more suggestions:

        “sed -i ‘s,/var/lock/subsys,/var/lock,’ oracle-xe”
        ,but you never say that you have to be in /etc/init.d. So maybe it would be better:

        “sed -i ‘s,/var/lock/subsys,/var/lock,’ /etc/init.d/oracle-xe”

        And here, there’s some space missing:
        “grep /var/lock/etc/init.d/oracle-xe”
        Should be
        “grep /var/lock/ /etc/init.d/oracle-xe”

        Sorry to bother, but I would also like to have clean how-to, without any typos :)

        Also, I can confirm that this howto works flawlessly on Debian Squeeze, as expected…

        Best Regards

      • Dragan,

        thanks again, I’ve made the corrections you suggested.
        Also, nice to know that it works on Debian.

        Mike

  1. i read somewhere on a blog post about setting kernel parameters, and swap space etc for install of oracle DB.

    but i don’t see anything of that sort in your post.. is it true that we don’t need them ?

    • It depends what version of Oracle you’re installing. The steps in the post are the ones I followed for installation of Oracle Express Edition.
      If you wanted to install one of the commercial versions ( e.g. Standard or Enterprise Edition), then you’d want to at least check the pre-requisites detailed in the relevant Oracle Installation Guide. For XE however, I’ve never found this to be necessary – either on 10g or 11g.

      HTH
      Mike

      • ended up getting this error… in log/CloneRmanRestore.log

        ORA-00845: MEMORY_TARGET not supported on this system
        select TO_CHAR(systimestamp,’YYYYMMDD HH:MI:SS’) from dual
        *
        ERROR at line 1:
        ORA-01034: ORACLE not available

        any ideas….?
        i’m trying to install this ona openVZ ubuntu VPS instance.

      • Hi,

        it looks like Oracle is trying to grab more memory than is available and, as a consequence, is failing to start. It could be an issue with physical RAM, or swap space ( assuming you haven’t set any Oracle initialization parameters and are letting Oracle determine how much memory it wants).
        Not much of a starting point, I know but you may find this link helpful … .

        HTH

        Mike

      • This is a great tutorial – thanks! If you are getting the ORA-00845 Memory Target problem try this:

        Go to this link:

        http://ubuntuforums.org/showthread.php?t=1961644

        Go to the section in that link entitled “ORA-00845: MEMORY_TARGET”. Follow the instructions there to:

        (1) Create the /etc/init.d/oracle-shm file
        (2) Install the oracle-shm init script
        (3) Make the edit to oracle-shm according to this link:

        https://forums.oracle.com/forums/thread.jspa?threadID=2376116

        The change explained there is:

        In /etc/init.d/oracle-shm:
        replace:
        mount -B /run/shm /dev/shm
        with:
        mount –move /run/shm /dev/shm
        mount -B /dev/shm /run/shm

        Note the changed order of /dev/shm in the 2nd mount -B command.

        AFter done with edit, maybe don’t need to restart as article says; first try just running the script and then check with “df -k”

        (4) /etc/init.d/oracle-shm start

        Do a df -k and check. Your output should be similar to:

        root@somehost:/etc/init.d# df -k
        Filesystem 1K-blocks Used Available Use% Mounted on
        /dev/sda5 398009796 16013512 362072676 5% /
        udev 3918352 4 3918348 1% /dev
        tmpfs 1584052 944 1583108 1% /run
        none 5120 0 5120 0% /run/lock
        none 2097152 624248 1472904 30% /run/shm
        shmfs 2097152 624248 1472904 30% /dev/shm

        (note that you now have “/run/shm”). This is the problem that needs fixing in many cases when you have enough shmfs but still are getting the ORA-00845 and wondering why.

        Now you can run /etc/init.d/oracle-xe without any ORA-00845 error.

        See this link for explanation

    • Kujira,

      the short answer is “I don’t know”. Looks reasonable enough, but I haven’t tried this on Debian Lenny. Also, I’d imagine you’d still run into the NLS_LANG issue if you’re using one of the affected languages.

      Mike

  2. Followed your instructions and received the error below during the configuration:

    Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

    Any suggestions?

    • Kevin,

      What (if anything) does it say in the log file the error message refers to ? If you can post it here, then it might give some clue as to what’s going on. Unfortunately, I can’t think of anything obvious based on the symptoms you describe.

      Mike

  3. Pingback: Installing Oracle XE 11g on Debian Squeeze

  4. I cannot create the deb.

    wseidel Disk1 # alien –scripts oracle-xe-11.2.0-1.0.x86_64.rpm
    Package build failed; could not run generated debian/rules file.

    I have been stuck in this step few days and I have no idea what’s happening, why it couldn’t create the deb file?

    • Hi,

      nothing earth-shattering I’m afraid. The only things I can think of are :
      – is it possible that the .rpm file has somehow got corrupted during the download process
      – similar with the alien package.
      So, question 1 – can you use alien successfully on any other package.
      Question 2 – if you delete the rpm file and download again from Oracle do you still get the same issue ?
      HTH

      Mike

  5. I tried all methods to install oracle 11g at some point I got errors like invalid port number 8080 but this tutorial worked flawlessly. Thanks a lot mate :)

  6. Hello

    Nice tutorial, I have a question, when I want to configure and start the database from /etc/init.d/oracle configure i get this error

    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 looked into this log files and the file named postDBCreation.log tells me that

    begin
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    File created.

    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    ORA-00845: MEMORY_TARGET not supported on this system
    select ‘utl_recomp_begin: ‘ || to_char(sysdate, ‘HH:MI:SS’) from dual
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    BEGIN utl_recomp.recomp_serial(); END;

    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    select ‘utl_recomp_end: ‘ || to_char(sysdate, ‘HH:MI:SS’) from dual
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    Please give me some help with this, thanks a lot

    • George/Sergio,

      assuming that you have already setup oracle and you just want to change the config so the database starts up when the machine starts, you should just be able to run :

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

      I say “should” because, although this does allow the database itself to start on boot, for some reason it does not start the listener ( well, not on my machine, anyway). Therefore, if you connect via SQL*Plus on the machine the database is running on, all looks OK. However, the HTTP server doesn’t seem to start ( no APEX) and the TNS Listener doesn’t start ( no client tools).
      Not sure why this is, but I’ll keep looking.
      Mike

    • The OTN Discussion Forums has the solution for this. Go to:

      Heading 7 (ORA-00845: MEMORY_TARGET) is what you need. Worked for me, anyway!

      Cheers

  7. I am getting the following error when I try to configure the DB after installation:

    Configuring database…
    Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

    I looked into the cloneDBCreation.log file and I get the following errors:

    Create controlfile reuse set database “XE”
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    BEGIN dbms_backup_restore.zerodbid(0); END;

    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    ORA-00845: MEMORY_TARGET not supported on this system
    Create controlfile reuse set database “XE”
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter system enable restricted session
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter database “XE” open resetlogs
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter database rename global_name to “XE”
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter system switch logfile
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter system checkpoint
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter database drop logfile group 3
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    ALTER TABLESPACE TEMP ADD TEMPFILE ‘/u01/app/oracle/oradata/XE/temp.dbf’ SIZE 20480K REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    select tablespace_name from dba_tablespaces where tablespace_name=’USERS’
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    select sid, program, serial#, username from v$session
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter user sys identified by “oracle”
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter user system identified by “oracle”
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    alter system disable restricted session
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    Is there anyway that you can help me resolve this error on DB configuration??

    • Stephen,

      my best guess is that the config failed to create the database controlfile.
      I suppose the first question would be, which user are you running the config as ?
      I was on as root when I ran this on my machine.

      HTH
      Mike

  8. Thanks! It worked great on Ubuntu 10.04.4 LTS. The alien generation threw an initial error message but the deb package generated fine.

    Next step is the Upgrade to 4.1 from your blog (again).

  9. Hi,
    everything was going great until I hit /etc/init.d/oracle-xe configure
    Then it says:
    Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
    I have 4 files in that folder. 3 of them show no mistakes, but the file “postScripts.log” shows me this:

    CREATE OR REPLACE LIBRARY dbms_sumadv_lib AS ‘/u01/app/oracle/product/11.2.0/xe/lib/libqsmashr.so';
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    BEGIN dbms_datapump_utl.replace_default_dir; END;

    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    commit
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0

    create or replace directory XMLDIR as ‘/u01/app/oracle/product/11.2.0/xe/rdbms/xml’
    *
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    (the file is longer but it pretty much keeps saying the same: ORACLE not available).

    I already followed the step 7 in the OTN Forum you suggested (I was getting a MEMORY_TARGET error before, and that step helped me fix it) but it didn’t fix my problem.

    Can you help me?

  10. hi friends.
    i’m new to linux os.
    i had installed linux mint 12.
    my problem is while i’m install oracle 11g enterprise edition i’m getting error message as “permission denide”.
    please anyone tell me proper installation guide for oracle………….

    • Apologies for the late response. I’ve just moved house and my internet connection still isn’t back yet ( I’m writing this from an internet cafe !)
      I think the desktop shortcut is pointing to the wrong url. Try the following URL which should take you to your database home page :

      http://http://127.0.0.1:8080/apex/f?p=4950

      HTH

      Mike

      • thanks A LOT. after searching 2 days for the right solution I found finally this. At only that is necessary. thanks thanks thanks

  11. I have installed Oracle XE 11g, on 3 different computers with Debian Squeeze, using the procedure out lined by Mike, it installed flawlessly and and all worked like charm, the language used was US English! I installed these two first then followed the procedure: libaio1 unixodbc, Thanks Mikie!

  12. Hi, I tried installing oracle XE 11g on ubuntu following these steps. Now I am stuck with the listener. Copy/pasted below are the errors:
    It seems to me that the listener.log file is missing, please see the status messages below.
    ***************************************************************************
    lsnrctl start
    LSNRCTL for Linux: Version 11.2.0.2.0 – Production on 02-JUL-2012 12:57:28

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

    Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait…

    TNSLSNR for Linux: Version 11.2.0.2.0 – Production
    NL-00280: error creating log stream /u01/app/oracle/product/11.2.0/xe/network/log/listener.log
    NL-00278: cannot open log file
    SNL-00016: snlfohd: error opening file
    Linux Error: 13: Permission denied

    Listener failed to start. See the error message(s) above…
    ***************************************************************************
    cd $ORACLE_HOME/network/log
    root@localhost:/u01/app/oracle/product/11.2.0/xe/network/log# ls -l listener.log
    ls: cannot access listener.log: No such file or directory
    *****************************************************************************

    Now, while following your steps as mentionned in this blog, I may have done the ‘LOCK’ step twice -> the one that says –
    ‘sed -i ‘s,/var/lock/subsys,/var/lock,’ /etc/init.d/oracle-xe’
    , therefore the command–>
    ‘grep /var/lock/ /etc/init.d/oracle-xe’ displays the below mentionned lines-
    touch /var/lock/listener
    touch /var/lock/oracle-xe
    touch /var/lock/listener
    touch /var/lock/oracle-xe
    if [ $RETVAL -eq 0 ] && rm -f /var/lock/listener
    rm -f /var/lock/oracle-xe
    Also, this is my second try at installing this thing, I have un-installed it once and re-installed it following the steps you have mentioned above.

    PLEASE HELP ME!!!

    • Ashu,

      I have come across a similar problem on 10gXE. You can find the details

      Your issue could well be the same or similar to the one described here – i.e. the dba group doesn’t have write permissions on listener.log.

      HTH

      Mike

  13. Thanks Mike, i tried to fix the previous error, but now Ihave the following error –

    root@localhost:~# lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.2.0 – Production on 11-JUL-2012 11:17:02

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused

    I am lost :(

  14. And this ->

    root@localhost:~# lsnrctl start

    LSNRCTL for Linux: Version 11.2.0.2.0 – Production on 11-JUL-2012 11:19:10

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

    Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait…

    TNSLSNR for Linux: Version 11.2.0.2.0 – Production
    System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
    Log messages written to /u01/app/oracle/product/11.2.0/xe/network/log/listener.log
    Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    TNS-12555: TNS:permission denied
    TNS-12560: TNS:protocol adapter error
    TNS-00525: Insufficient privilege for operation
    Linux Error: 1: Operation not permitted
    NL-08014: Failed to initialize Diagnosability framework, falling back to old network tracing/logging
    No valid ADR Base to use

    NL-08013: Invalid ADR Base directory

    Listener failed to start. See the error message(s) above…

    • Ashu,

      Having had a bit of a look around, may be useful.
      What it’s saying is that it could be that you don’t have a file called .oracle in /var/tmp. I think this is probably where you should start.

      Also, it’s probably a good idea to start the listener as the oracle user rather than root. With the listener stopped :

      sudo su - oracle
      echo $ORACLE_HOME
      lsnrctl start
      

      NOTE – if echo $ORACLE_HOME doesn’t return anything then you need to have a look at the oracle user to make sure that the environment variables are set.

      If this doesn’t help, here are my listener.ora and tnsnames.ora files. Have a look and see if they are different to the ones you have.
      These can be found in $ORACLE_HOME/network/admin.

      The listener.ora is (NOTE – replace mymachine with the name of your host):

      # listener.ora Network Configuration File:
      
      SID_LIST_LISTENER =
        (SID_LIST =
          (SID_DESC =
            (SID_NAME = PLSExtProc)
            (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
            (PROGRAM = extproc)
          )
        )
      
      LISTENER =
        (DESCRIPTION_LIST =
          (DESCRIPTION =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
            (ADDRESS = (PROTOCOL = TCP)(HOST = mymachine)(PORT = 1521))
          )
        )
      
      DEFAULT_SERVICE_LISTENER = (XE)
      

      The tnsnames.ora ( once again, replace mymachine with the name of your host) :

      # tnsnames.ora Network Configuration File:
      XE =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = mike-minty)(PORT = 1521))
          (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = XE)
          )
        )
      
      EXTPROC_CONNECTION_DATA =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
          )
          (CONNECT_DATA =
            (SID = PLSExtProc)
            (PRESENTATION = RO)
          )
        )
      

      If you still get no joy after that, try commenting out the EXTPROC_CONNECTION_DATA entry.

      HTH

      Mike

  15. Following process as per
    [https://forums.oracle.com/forums/thread.jspa?threadID=2301639|https://forums.oracle.com/forums/thread.jspa?threadID=2301639]
    (Except point 6 as it was about “Resize the Root Partition”)
    Initially It gave me warning package architecture (amd64) does not match system (i386)
    as i was trying to install amd64 deb pkg. i run command with -force and it got installed.
    After then when i tried to configure using
    sudo /etc/init.d/oracle-xe configure
    it gave me error
    “Configuring database…grep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file or directory
    grep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file or directory

    Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details”

    There is no log file in folder as It shows No such file so cannot get what is error.

    • Gaurang,

      I could be mistaken, but it sounds as if you are trying to install on a 32-bit OS. Unfortunately 11gXE only comes in 64-bit.
      If you are not sure if this is correct, open a terminal and type :

      uname  -i
      

      If this command returns x86_64 then you are running a 64-bit OS. If it returns i686, then you’re on a 32-bit version and will need to install a 64-bit OS to be able to install 11gXE.

      HTH

      Mike

  16. Hey Mike,

    I have checked everything you mentionned and it all matches up…both root and oracle users are giving that error.

  17. Hi, can i take this article as source to create a translation for wiki in http://www.esdebian.org? I want to create a spanish resourse to explain how to install oracle 11g xe in Debian Squeeze, and some contents will be based in your great explanation. Thanks and i wait for a response!

  18. Greetings and thanks so much for the listing. I am following the steps and when I get:

    dpkg –install ./oracle-xe_11.2.0-2_amd64.deb
    Selecting previously unselected package oracle-xe.
    (Reading database … 156630 files and directories currently installed.)
    Unpacking oracle-xe (from ./oracle-xe_11.2.0-2_amd64.deb) …
    Setting up oracle-xe (11.2.0-2) …
    Executing post-install steps…

    (standard_in) 1: syntax error
    (standard_in) 2: syntax error
    /var/lib/dpkg/info/oracle-xe.postinst: line 79: [: -gt: unary operator expected
    (standard_in) 1: syntax error
    Adding system startup for /etc/init.d/oracle-xe …
    /etc/rc0.d/K01oracle-xe -> ../init.d/oracle-xe
    /etc/rc1.d/K01oracle-xe -> ../init.d/oracle-xe
    /etc/rc6.d/K01oracle-xe -> ../init.d/oracle-xe
    /etc/rc2.d/S80oracle-xe -> ../init.d/oracle-xe
    /etc/rc3.d/S80oracle-xe -> ../init.d/oracle-xe
    /etc/rc4.d/S80oracle-xe -> ../init.d/oracle-xe
    /etc/rc5.d/S80oracle-xe -> ../init.d/oracle-xe

    You must run ‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.

    Processing triggers for ureadahead …
    Processing triggers for desktop-file-utils …
    Processing triggers for bamfdaemon …
    Rebuilding /usr/share/applications/bamf.index…
    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place

    any suggestions -

  19. then I get:

    SENLinux Disk1 # /etc/init.d/oracle-xe configure

    Oracle Database 11g Express Edition Configuration
    ————————————————-
    This will configure on-boot properties of Oracle Database 11g Express
    Edition. The following questions will determine whether the database should
    be starting upon system boot, the ports it will use, and the passwords that
    will be used for database accounts. Press to accept the defaults.
    Ctrl-C will abort.

    Specify the HTTP port that will be used for Oracle Application Express [8080]:8081

    Specify a port that will be used for the database listener [1521]:

    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]:

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

    • Steven,

      apologies if you’ve already gone down this route…
      the error seems to be coming from the file /var/lib/dpkg/info/oracle-xe.postinst
      I believe that this is a file generated and then executed by the dpkg installation process.
      If you have a look at this file ( line 79 ?) I think that’s where the problem is.
      You could try correcting that script and then re-running it on it’s own and then run oracle-xe configure
      I haven’t come across this problem so I’m not sure what would cause it. What OS are you installing on ? Is it Mint or another Debian variant ?

      HTH

      Mike

      • Greetings and thanks for the reply.
        I am installing Oracle XE on Mint 13.
        I have gotten past the dpkg errors. I did that by following the steps listed here from the OTN Forum on MEMORY_TARGET issues.
        Unfortunately, I am still failing on the config. My logs show :
        ORA-01034: ORACLE not available
        ORA-27101: shared memory realm does not exist
        Linux-x86_64 Error: 2: No such file or directory
        ORA-00845: MEMORY_TARGET not supported on this system
        along with a bunch of :
        ERROR at line 1:
        ORA-01034: ORACLE not available
        Process ID: 0
        Session ID: 0 Serial number: 0

        I’m at my end here – 2 days later nowhere. Like I said, I already followed the steps from the OTB Forum to no avail.

        Any help would be greatly appreciated –

        Thanks

  20. After reading many links I have found one issue through a link that suggests my ORACLE_SID and ORACLE_HOME are not set to anything.

    # env | grep ORACLE results in
    ORACLE_SID=
    ORACLE_HOME=

    How and when should these have been set?

    • Steven,

      these environment variables can be set as follows :

      export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe 
      export ORACLE_SID=XE 
      

      Question : what user are you running as when you hit the error ? I was running as root and didn’t hit this.
      I actually setup my environment variables after the config had completed.
      Hope this is useful. Also, please let me know if it solves the problem.

      • Thanks for the help mikesmithers. I have followed the instructions and also added the memory setup. I have a 6GB system. Everything goes well until I configure and it fails.

        This is three days of attempts. I think I am going to throw in the towel. With the ability to run oracle xe, I can’t do my development and unfortunately I’ll have to stay with windows.

  21. Firstly I want to thank the person who wrote this article. I successfully managed to install Oracle XE 11g Release 2, on my laptop running Linux Mint 12 Mate.

    The final issue I faced was this:

    (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    TNS-12555: TNS:permission denied
    TNS-12560: TNS:protocol adapter error
    TNS-00525: Insufficient privilege for operation

    To resolve this, just comment out the line
    having ICP in the tnslisteners.ora file, as this is the one that is causing the listener not to start succeffully.

  22. Pingback: Instalacja bazy danych Oracle xe na linuksie Mint lub Ubuntu | WriteOnly

  23. Mike, you are a wonderful human being. Thank you so much for the great service you provided to humanity. And thank you for excellent humour as well!

  24. Thanks a great lot Mike. I’ve been trying to get this started for some time. I even considered installing Oracle Linux (I actually did and lost my other linux installs and Windows7 bootmgr…, got it all fixed agian now…). So now I have a working Oracle XE on my Mint 13 and it works great! Really thankfull and please give your Deb also my regards for giving you the opportunity to do this fine work.

  25. Hi ,

    After installation i am unable to follow the instructions.
    can any one please help me .i am using linux mint 14.1 mate 64 bit version.
    Below is the output for installation.
    Selecting previously unselected package oracle-xe.
    (Reading database … 160035 files and directories currently installed.)
    Unpacking oracle-xe (from ./oracle-xe_11.2.0-2_amd64.deb) …
    Setting up oracle-xe (11.2.0-2) …
    Executing post-install steps…

    Adding system startup for /etc/init.d/oracle-xe …
    /etc/rc0.d/K01oracle-xe -> ../init.d/oracle-xe
    /etc/rc1.d/K01oracle-xe -> ../init.d/oracle-xe
    /etc/rc6.d/K01oracle-xe -> ../init.d/oracle-xe
    /etc/rc2.d/S80oracle-xe -> ../init.d/oracle-xe
    /etc/rc3.d/S80oracle-xe -> ../init.d/oracle-xe
    /etc/rc4.d/S80oracle-xe -> ../init.d/oracle-xe
    /etc/rc5.d/S80oracle-xe -> ../init.d/oracle-xe

    You must run ‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.

    Processing triggers for bamfdaemon …
    Rebuilding /usr/share/applications/bamf.index…
    Processing triggers for desktop-file-utils …
    Processing triggers for ureadahead …
    ureadahead will be reprofiled on next reboot
    Processing triggers for libc-bin …
    ldconfig deferred processing now taking place

      • Thanks a lot Mike.
        After installation which step i need to follow please.
        I tried the” If you want to start over” step and uninstalled but after mentioned steps are not succeed like
        /etc/init.d/oracle-xe stop – not working
        update-rc.d -f oracle-xe remove
        grep /var/lock/subsys /etc/init.d/oracle-xe – not working

        Many thanks for your quick response and time.

      • Udaya,

        You only need to follow the steps in the “If you want to start over” section if you want to cancel the installation.

        If you have already run the dpkg –purge oracle-xe command then I’d suggest you need to start back at the section headed Installing Oracle.

        This time skip the “If you want to start over” section and go on from the section headed Lock.

        HTH,

        Mike

  26. Pingback: Oracle Express Edition 11gR2 in Ubuntu 13.04

  27. Pingback: Source Installing Oracle 11g XE on Ubuntu 12.10 64 bit | aginanjarm

  28. Hi !! I was able to install Oracle XE successfully using this tutorial. This is one of the best technical article I have read in my life. Everything is crystal clear with explanations and reasoning. For a new Linux user like me, it was great.

    Hats off !!

  29. Thanks a lot. This helped much, I almost did everything successfuly. But, I don’t know how to run oracle. When I execute the “getting started” desktop shortcut, it shows me a “unable to connect to 8080 port” page. It probably means the service is not running. I called the “/u01/app/oracle/product/11.2.0/xe/config/scripts/startdb.sh”, nothing happens (no errors, no other output) ..

    ps. sudo grep dba /etc/group returns dba:x:1001:oracle,iori

    • When I execute : sudo service oracle-xe start
      I get this output :

      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.

      • Iori,

        assuming your username on your machine is iori, then the output of

        sudo grep dba /etc/groups
        

        looks fine.

        The Getting Started Desktop shortcut takes you to the APEX Home Page.
        This does not start the database.
        APEX will only be running if the database is up and running.

        To start the database from the menu, you need to go to the Oracle Database 11g Express Edition menu
        and select Start Database.

        This actually calls a script called startdb.sh.
        The script itself should start the listener and the database.

        Looking at my installation on Mint the permissions are :

        ls -l /u01/app/oracle/product/11.2.0/xe/config/scripts/startdb.sh
        -rwxr-xr-x 1 oracle dba 1610 Dec 27  2012 startdb.sh
        

        If you cannot start the database using the menu ( or simply running the script as your user), then you may want to take a look at
        this post about troubleshooting.

        Although it’s about 10g XE on Ubuntu, it does remain relevant for 11g.

        Let me know if this helps. If you’re still stuck, please can you let me know the Distro (and version) that you are working on.

        Thanks,

        Mike

      • I think I’ve missed the shared memory part. Anyway, I repeated everything from the beginning, I followed every single step. the oracle-env.sh didn’t show any error, but it didn’t create any env variable, so I did them manually.
        The result is total success. I should say that, your tuto is kinda reference. Congrats! and thank you very much!

        Linux Mint 15 (Olivia)

  30. I want to thank you for showing in details step-by-step on how to install Oracle Express on Ubuntu. It worked the first time for me in Firefox, but when I restarted my computer and I went back to the ‘Get Started With Oracle Database 11g Express Edition’, I got an error from Firefox:

    Unable to connect
    Firefox can’t establish a connection to the server at localhost: 8080

    What does that mean, and please help me out once again. Thank you!

    Rob

    • Rob,

      glad to know the steps worked for you.
      Assuming that you’ve set the database NOT to start automatically on boot ( as per the post), then I think your problem is that the database is not running.
      To start it, just go to the Oracle Database 11g Express Edition Menu and select Start Database. Give it a few seconds for the database to start. Then, when you try to hit the database home page it should come up.

      HTH

      Mike

      • I’m sorry to say this, but I’m a noob at Oracle Express in Ubuntu. Where is Oracle Database 11g Express Edition Menu? I went to the dash home and typed in oracle, but all I’m seeing is ‘Get Started With Oracle Database 11g Express Edition’. Thanks.

        Rob

      • Whoops, never mind. I found out that I had to install classic Menu indicator from the terminal in Ubuntu. After that, I rebooted it and clicked on it but still got an error (8080). So I stopped the database, waited, and started the database, waited, and it finally worked! It’s annoying, but it’s the only way that it works. I won’t shut down Ubuntu and leave it saved in VirtualBox. Thanks for your help Mike!

        Rob

  31. Pingback: Versioning your database using Liquibase | Craig on software development

  32. Pingback: Instalacion Oracle11gXE | Blogs personal

  33. Hello Mike,

    I am stuck at this point (while running /etc/init.d/oracle-xe configure).

    Starting Oracle Net Listener…Done
    Configuring database…grep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file or directory
    grep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file or directory
    Done
    /bin/chmod: cannot access `/u01/app/oracle/diag': No such file or directory
    Starting Oracle Database 11g Express Edition instance…Done
    Installation completed successfully.

    Would you know why the files/directories are missing or inaccessible?

    I have tried to follow your recipe to the dot. I am using Linux Mint 13 Maya.

    Regards,

    Vineet

  34. Pingback: Installation and Getting Up and Running with Oracle 11g Express (in 30 minutes or less!) | I, T:eeeJay: Hacking My Way Into The Future

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s