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
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 :
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.
APEX5
If you want to get up-to-date with the latest version of APEX, installation instructions can be found here.
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.
Very helpful. Thanks 🙂
LikeLike
You have a typo here:
“sudo apt-get install alien libao1”
it should be:
“sudo apt-get install alien libaio1”
LikeLike
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
LikeLike
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
LikeLike
Dragan,
thanks again, I’ve made the corrections you suggested.
Also, nice to know that it works on Debian.
Mike
LikeLike
Awesome tutorial Mike!!! Thank you 🙂
LikeLike
A lifesaver. Thank you.
LikeLike
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 ?
LikeLike
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
LikeLike
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.
LikeLike
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
LikeLike
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
LikeLike
Thank you very much. Unfortunately, I moved to Arch and ended up with Oracle 11g XE in Windows XP in VirtualBox.
LikeLike
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?
LikeLike
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
LikeLike
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?
LikeLike
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
LikeLike
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?
LikeLike
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
LikeLike
Hi WaSeidel, I had the same problem. Did you find a solution for this failure?
LikeLike
Hi guys, i just found the same problem, I did move the downloaded oracle rpm to my ext4 ubuntu partition (Desktop) and continue the tutor said, it’s work fine.. \^_^/
https://ubuntuforums.org/showthread.php?t=1640219
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.
LikeLike
The different errors ( Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details, ORA-00845: MEMORY_TARGET not supported on this system… ) are expalined here https://forums.oracle.com/forums/thread.jspa?threadID=2301639
LikeLike
I assume you are using ext4, is it running fine?
LikeLike
Afriza,
yes I am running ext4 and I’ve had no problems to date.
Mike
LikeLike
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 🙂
LikeLike
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
LikeLike
I have the same problem!!!!!! Can you help us?
LikeLike
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 :
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
LikeLike
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
LikeLike
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??
LikeLike
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
LikeLike
I was running as root…
LikeLike
Stephen,
Having checked into this a bit more, I think you might find the link that David posted helpful OTN Forum
HTH
Mike
LikeLike
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).
LikeLike
Brian,
Good to know it worked for you. I’ll keep my fingers crossed for you on the APEX upgrade.
Mike
LikeLike
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?
LikeLike
Make sure your hostname is in the /etc/hosts file
LikeLike
i have same problem
LikeLike
As per Ramba’s comment, is your hostname in the /etc/hosts file ?
LikeLike
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………….
LikeLike
Are you the root user?
LikeLike
When i’m trying to access http://localhost:8080 , authentification is needed
“A username and password are being requested by http://localhost:8080. The site says: “XDB” ”
Which username should I use for authentification?
LikeLike
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
LikeLike
thanks A LOT. after searching 2 days for the right solution I found finally this. At only that is necessary. thanks thanks thanks
LikeLike
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!
LikeLike
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!!!
LikeLike
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
LikeLike
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 😦
LikeLike
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…
LikeLike
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 :
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):
The tnsnames.ora ( once again, replace mymachine with the name of your host) :
If you still get no joy after that, try commenting out the EXTPROC_CONNECTION_DATA entry.
HTH
Mike
LikeLike
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.
LikeLike
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 :
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
LikeLike
Hey Mike,
I have checked everything you mentionned and it all matches up…both root and oracle users are giving that error.
LikeLike
Ashu,
do you have the /var/tmp/.oracle file ? If so, what are the permissions on it ?
Mike
LikeLike
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!
LikeLike
Marcos,
Yes, please do. Glad you found it useful.
Mike
LikeLike
Thanks! I’ll post a link to your great blog.
Best regards
Marcos (from Argentina)
LikeLike
There is! http://www.esdebian.org/wiki/instalar-oracle-11g-express-edition-debian-squeeze-64-bits
LikeLike
my linux version is 2.6.18-8.el5 i686.any one tell me where can i download asmlibrarys rpm
LikeLike
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 –
LikeLike
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
LikeLike
P.S. – nothing in the logs
LikeLike
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
LikeLike
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
LikeLike
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?
LikeLike
Steven,
these environment variables can be set as follows :
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.
LikeLike
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.
LikeLike
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.
LikeLike
muchas gracias xD
LikeLike
thnaks for the nice tutorial. worked flawlessly for me.(mint 13)
LikeLike
Best ever technical guide i have ever seen…… Thanks a lot mike……
LikeLike
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!
LikeLike
Thanks a lot Mike. You saved my day installing XE on Mint. The page was truly easy to follow and really thankful to you
LikeLike
Thanks you very much!!!
After one month trying to install oracle at ubuntu 12.04 it’s done!!.
LikeLike
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.
LikeLike
Pieter,
glad you found it useful.
Regards passed on and I now have a brownie point bonus !
Thanks,
Mike
LikeLike
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
LikeLike
Udaya,
that all looks fairly normal. Does the install hang at that point ?
If not, then what problem do you have ?
Mike.
LikeLike
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.
LikeLike
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
LikeLike
Hi Mike,
Thanks a lot .I can able to install and configure the Xe .
Thanks again.
LikeLike
You sir are a hero of the internet ! Thanks for this amazing tutorial ! It worked like a charm
LikeLike
I have been working with Linux for 2 weeks. It is amazing even for me. You are great, many thanks.
LikeLike
Getting error- ORA-12547: TNS:lost contact.so
LikeLike
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 !!
LikeLike
Hi there, any one had tried to install this on Debian Wheezy?
LikeLike
Worked like a charm on Linux Mint 15 + MATE with Oracle Express 11g – thanks very much indeed!
LikeLike
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
LikeLike
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.
LikeLike
Iori,
assuming your username on your machine is iori, then the output of
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 :
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
LikeLike
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)
LikeLike
Iroi,
great to know you got it working.
Thanks,
Mike
LikeLike
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
LikeLike
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
LikeLike
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
LikeLike
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
LikeLike
Fantastic post, this was a great help.
LikeLike
Excellent post, worked perfectly for me, thank you very much
LikeLike
Thanks, your post is very helpful and I successfully Installed on Mint15-Cinn
LikeLike
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
LikeLike
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:
Thansk for writing the tutorila and excuse me for my crapy english
Regards
Clemens
LikeLike
and this is the error message when i try to start sqlplus
clemens-school clemens # sqlplus
SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 6 12:26:24 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter user-name: sys
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
LikeLike
Clemens,
Apologies, I replied to your last comment as you posted this one !
It looks like the database is not up.
Therefore, I’d suggest you try starting it as I described in my comment just now – i.e.
either from the menu or using the script.
To run the script – make sure that the user you are connected as is a member of the dba group. To check which users are in the dba group :
The other thing you need to check is that the appropriate environment variables are set for the user you are going to run the startup command as.
You can check this on the command line by :
Once you’re happy that everything is in order, you can run the script :
Note that this script starts the TNS Listener as well as the database. The listener is what facilitates connections to APEX ( which is what the Getting Started Web Page is running in).
Please let me know how you get on, or if you need any further details.
Mike
LikeLike
Hi Mike, excelent post
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.
Thanks,
LikeLike
Thanks! successfully installed on Mint 17
LikeLike
Great Post!! Runs nice on Kubuntu 14.04! Thank you!
LikeLike
Awesome post. Saved me a TON of time. Who has time sorting out the intracies of a basic install? It should be seamless! We have enough on our plates with the pace of technology. THANK YOU!
LikeLike
This a great post. You just saved me hours, if not days of frustration.
LikeLike
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
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 – Production
Start Date 15-APR-2015 20:19:46
Uptime 0 days 0 hr. 4 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/11.2.0/xe/network/log/listener.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=maciej-HP-Pavilion-dv7-Notebook-PC)(PORT=1521)))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully.
I will appreciate your help on this one.
Maciej
LikeLike
Maciej,
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.
HTH
Mike
LikeLike
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.
LikeLike
Maciej,
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 :
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…”
HTH
Mike
LikeLike
Hi Mike,
Apologies for all the trouble but I am new a this….
Regarding the icon:
It shows the right logo and has execute as program checked.
I am using firefox
Regarding the first part.
I think it looks fine:
And the second:
lsnrctl status gives me:
It seems to me that all if correct
Regards,
Maciej
LikeLike
Maciej,
My /u01/app/oracle/product/11.2.0/xe/config/scripts/gettingstarted.sh looks like this ( I haven’t made any manual changes to it) :
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 :
This should return the port number.
Please let me know if this works for you.
Thanks,
Mike
LikeLike
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.
Mike
LikeLike
Good news is that after clicking on “getting stared” the browser opens at the specified location (localhost… etc). Bad news browser in still unable to connect.
Maciej
LikeLike
Maciej,
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 :
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…
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.
The format of the URL is :
http://ip_address:port/apex/f?p=4950
For example, if the IP address for localhost is 127.0.0.1, and the port is 8080 you’d enter :
http://127.0.0.1:8080/apex/f?p=4950
HTH
Mike
LikeLike
Hi Mike,
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.
Regards,
Maciej
LikeLike
Hi Mike.
Great article! I have one question though… Since carrying out the installation, my terminal is giving some errors every time I start one.
As my own user:” bash: /u01/app/oracle/product/11.2.0/xe/bin/oracle: Permission denied”
And as su: “bash: .: /u01/app/oracle/product/11.2.0/xe/bin/oracle: cannot execute binary file”
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”
Any ideas?
LikeLike
Scratch that, this error has disappeared since reboot, but I’m now getting:
bash: /etc/bash.bashrc: line 55: syntax error near unexpected token `”oracle_env.sh”‘
bash: /etc/bash.bashrc: line 55: ` for the “oracle_env.sh” ‘
bash: /etc/bash.bashrc: line 55: syntax error near unexpected token `”oracle_env.sh”‘
bash: /etc/bash.bashrc: line 55: ` for the “oracle_env.sh” ‘
every time I log into a terminal either as myself or su…
LikeLike
Will,
the line I have in my bash.bashrc is :
From you’re previous post it looks like you may be missing the space betweeen the “.” and the /u01…
Is that the case ?
HTH
Mike
LikeLike
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.
LikeLike
Will,
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 ?
Mike
LikeLike
Had a look, at the line in question, line 55 is the start of a for loop
#for the “oracle_env.sh”
if [[ ${EUID} == 0 ]] ; then
PS1=’\[33[0;37m\]\[33[0;35m\]${debian_chroot:+($debian_chroot)}\[33[01;31m\]\h\[33[01;34m\] \W \$\[33[00m\] ‘
else
PS1=’\[33[0;37m\]\[33[0;35m\]${debian_chroot:+($debian_chroot)}\[33[0;35m\]\u@\h\[33[0;37m\]:\[33[0;36m\]\w >\[33[0;00m\] ‘
fi
alias ls=’ls –color=auto’
alias grep=’grep –colour=auto’
alias fgrep=’fgrep –colour=auto’
alias egrep=’egrep –colour=auto’
alias ll=’ls -lF’
alias la=’ls -A’
alias l=’ls -CF’
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!
LikeLike
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 am using LinuxMint 17 version , on 64 bit machine.
Please help me to finish this.
LikeLike
Shubham,
I don’t think you need the “.” when you run the script with the sh command.
When I try this ( running on Mint 17.2 64-bit) I get :
Instead, try :
HTH,
Mike
LikeLike
Hi MIke
Heartily thanks for replying
I tried below command . And then I try echo $ORACLE_HOME
sh /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
shubham@shubham-Inspiron-5537 ~ $ echo $ORACLE_HOME
—— Empty Line
shubham@shubham-Inspiron-5537 ~ $
Please suggest , I really need to get it working 😦
One point to notify u ,
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 .
Then I executed configure , works like a charm !!!! 🙂
Below is my ouput for df -k .
/dev/shm 4031256 60832 3970424 2% /run/shm
Shubham
LikeLike
Shubham,
I think the next thing to do would be to check the contents of the oracle_env.sh file.
It should look like this ( apart from the NLS_LANG, which I’ve hard-coded:
If it does then I suggest the next step is to try and run each of the commands individually on the command line e.g.
…then use the echo command to check that the variable has in fact been set to the required value.
If this doesn’t work, please can you post the contents of oracle_env.sh so that we can see if this might be the problem.
Thanks,
Mike
LikeLike
Hi MIke , This is the content of my 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
But As you suggested I have run individual export commands and it worked 🙂 .
I am Proceeding further ,, from your step 🙂
Will keep you bugging till I get Oracle Installed Completely .
Thanks a lot , for your quick and nice support / suggestion . You are awesome 🙂
LikeLike
Hi Mike ,
I have successfully reached till last point . I got the menu icon. But when I click on “get started with …..” it leads to url ” http://localhost:8080/apex/f?p=4950 ” :
And I am getting this error
Unable to connect
Firefox can’t establish a connection to the server at localhost:8080.
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.
Please Help 🙂
LikeLike
Hi Mike
Wow !!!!! It’s Working ::: I had to Click on ” GET Started ” , Now still one help ,, I am clicking on “Run SQL Command Line “,, It’s not opening any sql window. Any setup is required for this ?
Shubham
LikeLike
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 ?
Mike
LikeLike
Hi Mike,
Thanks for this space.
I’m trying to install Oracle 11g XE on my Centos 7 machine. I use this command:
/etc/init.d/oracle-xe configure
Everything is ok, 8080 port, 1521 port, SYS and SYSTEM password ok, and Yes to start service on boot. After this, the console shows:
Starting Oracle Net Listener…Done
Configuring database…
HERE it hangs for ever, no error showed, nothing on logs, nothing!! I’ve been looking for the solution for 3 days but no success.
I’ve been waiting for about 10 hours for the glorious “Done” but never comes.
Please Mike, could you please help me?
Thank youuuu
LikeLike
Diego,
I’ve done a guide for installing Oracle XE on Centos.
You can find the details at :
Hopefully, you won’t have to wait so long for the “Done” following those instructions.
HTH,
Mike
LikeLike
Hi Mike,
Going trought a problem during database configuration. I’ve got a olr error on my ubuntu vm.
LikeLike
Mathias,
Can you tell me what the error is that you are getting.
Also, can you confirm the version of Ubuntu you’re on, whether it’s 32 or 64-bit and the Host OS for the VM ?
Thanks,
Mike
LikeLike
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
LikeLike
Chaimaa,
it sounds like you may have an issue with environment variables not being set correctly.
To check this try the following :
If any of these commands return a blank line, it means that the environment variables are not set correctly, so review the steps in the “Set environment variables on startup” section of the post.
Also, it is a good idea to check that the user you are trying to start the listerner as is in the dba group. To get a list of users in this group :
HTH,
Mike
LikeLike
Hi Mike, thanks for the tutorial
I’m running Oracle XE 11 in Linux Mint 18, and I’ve had the same problem, when running the script with this command line:
Because the `export`s only work inside the running script. To run script in terminal and persist the changes, I’ve runned with:
More info: https://superuser.com/questions/46139/what-does-source-do
LikeLike
Hi Mike I’m facing the issue after this step
” dpkg –install ./oracle-xe_11.2.0-2_amd64.deb “.
It is showing as
(Reading database … 210201 files and directories currently installed.)
Preparing to unpack ./oracle-xe_11.2.0-2_amd64.deb …
ls: cannot access ‘/usr/sbin/smartctl’: No such file or directory
/usr/sbin/smartctl not found.
dpkg: error processing archive ./oracle-xe_11.2.0-2_amd64.deb (–install):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
./oracle-xe_11.2.0-2_amd64.deb
Please Mike can you help me?
LikeLike
Venkat,
are you running this as root ?
Mike
LikeLike
I installed Oracle XE on Debian Stretch and works perfectly, any one needs it, I will post it.
LikeLike
Hi Kujirasan,
Would be very interested in the recipe for installing on Debian Stretch. Especially if there are differences from Mikes recipe.
LikeLike
Lovely tutorial, saved me a lot of time.
Thank you mike
LikeLike