Oracle – for when it was like that when you got there

Main menu

Post navigation

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

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 :

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 :

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 …

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…

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 :

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…

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 …

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 :

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.

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 calledGet 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.

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.

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 … .

Hi Mikie, there are few theme and variation on installing XE, in the Dude’s case the chkconfig is deleted after installation, can you give an opinion for this one from a Japanese guy:http://ameblo.jp/labunix/entry-11109670450.html
it looks much simpler, but would it work?

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.

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.

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

Make sure that the rpm is on a Linux-based partition, like ext4. If it’s on an NTFS partition (Windows-based). NTFS partitions can’t store the executable file permission that scripts require in order to run (this is a security feature of Linux). If the rpm is stored on an NTFS partition, just move it to your desktop, for example, and run Alien again.

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

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

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.

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

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

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!

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

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.

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

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!

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

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 ?

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.

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

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

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.

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) ..

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!

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

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.

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.

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!

So intalled everthing, but when I try to startup the database i dont get a reply from the command line and when I click on the get started icon Firefox outputs: Unable to connect.
this is the output for start and status:

I assume that every stept that I have follow it is fine since I am able to login through http://localhost:8088/apex (in my case), I am able to see admin console, create workspaces, and
more, but I can not connect to the service through a simple java APP, I have always got “java.sql.SQLException: ORA-01017: invalid username/password; logon denied” and I am pretty sure that are fine, since I can use it in the web console. I have found that maybe it is a problem with upper/lower case, now it is set to false, I have found this tips http://www.dba-oracle.com/t_ora_01017.htm and all are fine, I really want to use Oracle on my linux mint, I dont want to use from windows, is there anything that I should validate? same error occurs from SQL developer connection page.

Hi,
First thanks for the instruction. I was able to install and configure the oracle but i can’t actually start it…
I open the shortcut “get started” and it opens a webpage at http://localhost:8080/apex/f?p=4950 and shows “unable to connect” error. I remember setting the port at 9090 yet changing it to http://localhost:9090/apex/f?p=4950 gave me the same result.

Seems the listener is fine:

LSNRCTL for Linux: Version 11.2.0.2.0 – Production on 15-APR-2015 20:24:42

a couple of things that might help to diagnose your problem.
First, can you logon to the database via SQL*Plus ?
If you can then the database is actually up, it’s APEX that is not working.
It takes a while for APEX to become accessible after the database has started (maybe a minute or so ?)
I believe that this is partly due to the internal PL/SQL Gateway.
If you can’t login via SQL*Plus then my next question would be – did you specify that Oracle should start automatically on startup or did you, like me, specify that you would explicitly start it?
If you need to start it explicitly, then you can use the Start Database menu option.

Hi,
I specified it to start automatically. I am able to login via SQL*Plus and now I am facing another issue… when clicking “get started” it just opens the browser on my homepage (google.com) – it’s not trying to open localhost:8080 anymore.

First – does the icon on your desktop have the Oracle XE logo ? If not, then if you right-click it, you should get the properties dialog. Click on the Permissions tab and check “Allow executing file as program”.
If you’ve already done this and it’s still not working, you probably need to have a look at the file that gets run when you click the icon.
This is /u01/app/oracle/product/11.2.0/xe/config/scripts/gettingstarted.sh

Looking at the copy I have, it looks to be setup for either firefox or konqueror. Are you using a different browser ?
In any case, it will attempt to start the browser with the URL of your APEX installation.
I’d suggest that you try pasting this URL into the browser and see if you get the APEX home page that way. This will at least prove that APEX is up and running ( although I can’t think why it wouldn’t be).
The other thing you could do is to double-check that APEX connections are being listened for on the port you think they are.
To do this, go into the terminal and type :

lsnrctl status

This will give you the current status of the TNS Listener. The output should include a line like this under the heading “Listening Endpoints Summary…”

This looks a little bit different to what you’ve posted.
If this is, in fact, different from what you have then you may want to try copying this and using it instead ( although I’d backup the current one first !)
If you’ve setup APEX on a different port ( you said it may have been 9090), then you’ll need to amend the script accordingly.
If you can’t remember the port number, then you can get it from the following query in SQL*Plus :

Just a quick note on my last reply – Note that the default APEX application when you first install Oracle XE has an ID for 4950 ( my APEX is currently pointing to a different application).
If you do use the gettingstarted.sh that I’ve posted, you need to make sure that the url (http://localhost…etc) ends with f?p=4950 and NOT f?p=101.

First off, just to re-iterate – APEX doesn’t start immediately when the database does. There is a bit of a lag between the two. I’d suggest that, if you’re trying this just after database start up, you wait 2 or 3 minutes and then try again.

If you’re still getting this problem…

I assume that you are still getting a Page Not Found error in the browser ?
Does the URL you’re browser tries to open use the correct port number ?
It should be the same as the one returned by the query :

select dbms_xdb.gethttpport
from dual
/

If so, it may be something to do with how localhost is getting evaluated.
I’d suggest that you try the following.

Verify the IP address of localhost ( it’s usually 127.0.0.1, but not always – I have seen it as 127.0.1.1 before) :
Run the following in a Terminal…

ping -c1 localhost

The command will show the IP address that localhost gets translated to.

Once you have this then enter the APEX URL directly into your browser, using the IP address rather than localhost.

Unfortunately nothing has changed… I seems I need to reinstall oracle again. Maybe I’ll have more luck the second time.
I would like to thank you again for all the support and the patience. I really appreciate it.

I’ve scoured the internet and cannot find a reason this would be the case. I also couldn’t find an example of what the permissions and user groups should be, though I assume it should be the dba group (which both user accounts are a part of).

My .bashrc and bash.bashrc (for some reason on Mint 17 I have both) lists the correct path:
“. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh”

The space is there in mine too and I can confirm now it is running correctly after-all as all the environment variables are configured when starting terminal! 🙂
So actually my original issue may no longer be an issue. But the line 55 error is still present? Oracle appears to be running fine otherwise.

the only other thing that springs to mind is this.
The error is being reported when reading the /etc/bash.bashrc file so it’s not a problem with the oracle_env.sh as such.
In my bash.bashrc, the call to oracle_env.sh is on the last line (line 97). This is on Mint 17.
I wonder if there’s anything before or after the entry in your file that’s causing the problem ?

My call to oracle_env.sh is at the end of the file, line 96 so you’re right in that it’s not an issue with oracle_env.sh. I commented the for loop out and restarted terminal and it seemed to make the issue disappear. But that’s pretty dirty and I don’t know if it will cause an issue further down the line.
Thanks for your help though! I’d not have seen anything if you’d not suggested it!

Hi Mike , I have successfully done the setup till configrue.
But While running the ” sh ./u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh” , It just finishes. Then I check $ORACLE_HOME or any other variable , I see a blank line and in next line cursor.

I was getting Memory Error like you mentioned . Then I follow the same process. But unfortunately I missed MOVE command in there ,, then I remove the service (Using update-rc.d oracle-shm remove. ) Then I corrected the script and again run the same as you mentioned .

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

Shubham,
Well done for getting it up and running :-).
The Issue with the SQL Command Line may be because your .bashrc doesn’t include the environment variables that you were having trouble with earlier ?

Hi Mike
Thank youuu for this Amaaaazing tutoriel, i “finally” install oracle on my linux mint 😀
Well when i redemare my laptop, I start my database, and i run sql commands i have this error TNS: NO LISTENER
I’ve tried lsnrctl start in my terminal, but i have another error lsnrctl command not found
Plzzz what can I do ? I am reaaaaaally lost