installing-oracle-11gxe-on-mint-and-ubuntu/ Installing Oracle 11gXE on Mint and Ubuntu

58
2014/9/21 上午2:42 Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte 158 http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/ Installing Oracle 11gXE on Mint and Ubuntu Posted on November 26, 2011 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 The Anti-Kyte Oracle – for when it was like that when you got there

Transcript of installing-oracle-11gxe-on-mint-and-ubuntu/ Installing Oracle 11gXE on Mint and Ubuntu

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 1∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Installing Oracle 11gXE on Mint and UbuntuPosted on November 26, 2011

Things have been a bit hectic lately. What with putting in a new kitchen, being insanely busy at work, and trying notto 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 itand 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 otherimprovements added. Maybe the most significant of these is that the limit for the amount of user data that XE canhold has been increased from 4GB to 11GB.What I’m going to do here is :

Go through the package conversion processInstall 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 intendedAlong the way, we’ll find out just why Oracle can’t speak English (and lots of other languages), where Minthas 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 commandline. 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, wasnamed 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. Thisis because, whilst XE is available for both 32 and 64-bit windows, Oracle have seen fit to release only a 64-bit

The Anti-KyteOracle – for when it was like that when you got there

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 2∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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 :

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 convertOracle’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 ofwriting. Some kind soul may eventually build one ( as happened for 10gXE), but for now, we’ll just have to make doand mend.So, open Terminal and type :

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 11gRelease 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 toget 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 :

The output for this command should be something like :

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

1 uname -i

1 sudo apt-get install alien libaio1

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

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

1 cd Disk1

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 3∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

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 surethat 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-singingall-dancing Oracle Instance.

chkconfigFor this particular tip, I’m indebted to a certain Dude who mentioned this in his installation guide for the XE11 betaon 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 :

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

Now set the appropriate permissions on the file :

When you list the file, you should see…

2 sudo alien --scripts oracle-xe-11.2.0-1.0.x86_64.rpm

oracle-xe_11.2.0-2_amd64.deb generated

12

cd /sbinvi chkconfig

123456789

101112131415

#!/bin/bash# Oracle 11gR2 XE installer chkconfig hack for Debian by Dudefile=/etc/init.d/oracle-xeif [[ ! `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' >> $filefiupdate-rc.d oracle-xe defaults 80 01

1 sudo chmod 755 chkconfig

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 4∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

AwkBut we’ve already got awk. I mean, this is Linux. Awk is always there. Except, apparently, when it’s somewhereelse.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 :

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 Oracleexpects to find it.To do this …

If the output contains a line like this

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

If the $ prompt has suddenly become a # you can congratulate yourself on having been bestowed God-like

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

123

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

1 df -k

123

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

1 sudo su -

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 5∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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 meremortals.OK, deep breath…

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

If you want to start overFrom this point on, if, by some chance, you get to a point where you’ve got an intractable error, or realise you’vemissed a step, or simply decide that you really are better off with MySQL after all, you can uninstall Oracle with thefollowing steps :

Now remove the package…

And finally, tidy-up…

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

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

1 /etc/init.d/oracle-xe stop

1 dpkg --purge oracle-xe

123

rm -r /u01/apprm /etc/default/oracle-xeupdate-rc.d -f oracle-xe remove

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 6∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

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

You should see this :

Easiest way to fix this is :

Now to when you check again…

Configure OracleNow, 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 SYSTEMWhether you want XE to start at boot time

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

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

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

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

1234567

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

123456789

1011

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 7∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

You’ll notice that I decided not to have XE startup on boot. I can make any number of technical justifications forthis, 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 desktopmenu to allow you to start the database ( assuming you’re condition is not acute and you prefer to start thedatabase 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…

Time to take a closer look.

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 onlocale.You can follow through what it’s doing as follows :

121314151617181920212223242526

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.

12

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

12345

cat /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.shexport 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

12

locale charmapUTF-8

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 8∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

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

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 returningENGLISH_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 thefollowing :

af_ZA (South Africa) – Note to Wayne – you don’t have this problem in Australiaar_AE (United Arab Emirates)ar_SA (Saudi Arabia)cs_CZ (Czech Republic)cy_GB(Wales) – just in case someone was getting smugen_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 youes_CR(Costa Rica)es_DO (Dominican Republic)es_EC(Ecuador)es_GT(Guatemala)

34

echo $LANGen_GB.UTF-8

12

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

123456789

1011

case $locale in…en_gb) nlslang='ENGLISH_UNITED KINGDOM';;…esac # construct the NLS_LANG # NLS_LANG=${nlslang}.${charset} echo $NLS_LANG

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 9∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

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

At this point, you can go running off to play with your lovely new database. However, it’s probably worth doing a bitof housekeeping first.Deb’s eyes have just lit up at the mention of housekeeping and she’s started dropping hints about me running thehoover 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

1234

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

123456789

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 10∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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 theirhome 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 theend of /etc/bash.bashrc

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

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 stepshere 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 Applicationsmenu. 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 iconRight-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 workBefore you take this invitation, there’s one more bit of tidying up, for which you’ll have to return to the commandline. 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 DBAgroup that was created as part of the installation :

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

1 chmod a+x .bashrc

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 11∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Just to check everything has gone according to plan :

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 :

12

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

12

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

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 12∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

ACKNOWLEDGEMENT

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

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

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 13∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

106 THOUGHTS ON “INSTALLING ORACLE 11GXE ON MINT AND UBUNTU”

SHARE THIS:

StumbleUpon Reddit Email Print Twitter 3 Facebook 36 LinkedIn 1

Google Tumblr Pinterest Pocket

This entry was posted in Linux, Oracle, OraDBPedia Syndication, Ubuntu and tagged .bashrc, /var/lock,/var/lock/subsys, alien, chkconfig, Debian, dkpg --install, libaio1, MEMORY_TARGET, Mint, NLS_LANG,ORA-00845, Oracle Express Edition, oracle xe, Oracle XE 11g, oracle_env.sh, sudo su -, Ubuntu,uninstall Oracle by mikesmithers. Bookmark the permalink[http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/] .

You May Like

1.

About these ads

Like

Be the first to like this.

RELATED

Installing Oracle XE on Ubuntu9.10

Troubleshooting Oracle 10gXE Installation on Ubuntu

ORA-00845:MEMORY_TARGET errorinstalling Oracle XE on Mintand Ubuntu

In "Linux" In "Linux"

In "Linux"

Tushar Kumaron November 27, 2011 at 12:41 pm said:

Very helpful. Thanks

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 14∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Dragan Podvezanecon December 14, 2011 at 10:18 am said:

You have a typo here:

“sudo apt-get install alien libao1″

it should be:

“sudo apt-get install alien libaio1″

mikesmitherson December 20, 2011 at 1:38 pm said:

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

Dragan Podvezanecon January 12, 2012 at 9:20 am said:

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 15∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

Sorry to bother, but I would also like to have cleanhow-to, without any typos

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

Best Regards

mikesmitherson January 14, 2012 at 7:18 pm said:

Dragan,

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

Mike

Sivaon December 21, 2011 at 5:06 pm said:

Awesome tutorial Mike!!! Thank you

chrison January 5, 2012 at 4:43 pm said:

A lifesaver. Thank you.

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 16∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

w112nxson January 19, 2012 at 2:30 pm said:

i read somewhere on a blog post about setting kernel parameters, andswap 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’tneed them ?

mikesmitherson January 22, 2012 at 7:17 pm said:

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

HTHMike

w112nxson January 26, 2012 at 7:59 pm said:

ended up getting this error… in log/CloneRmanRe‐store.log

ORA-00845: MEMORY_TARGET not supported on thissystemselect TO_CHAR(systimestamp,’YYYYMMDDHH: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 in‐stance.

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 17∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

mikesmitherson January 30, 2012 at 8:28 pm said:

Hi,

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

HTH

Mike

Gil Standenon July 16, 2012 at 11:42 pm said:

This is a great tutorial – thanks! If you are getting theORA-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?threa‐

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 18∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

dID=2376116

The change explained there is:

In /etc/init.d/oracle-shm:replace:mount -B /run/shm /dev/shmwith:mount –move /run/shm /dev/shmmount -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 asarticle says; first try just running the script and thencheck 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 -kFilesystem 1K-blocks Used Available Use% Mountedon/dev/sda5 398009796 16013512 362072676 5% /udev 3918352 4 3918348 1% /devtmpfs 1584052 944 1583108 1% /runnone 5120 0 5120 0% /run/locknone 2097152 624248 1472904 30% /run/shmshmfs 2097152 624248 1472904 30% /dev/shm

(note that you now have “/run/shm”). This is the prob‐lem that needs fixing in many cases when you haveenough shmfs but still are getting the ORA-00845 andwondering why.

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

See this link for explanation

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 19∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Thaion January 20, 2012 at 11:52 pm said:

Thank you very much. Unfortunately, I moved to Arch and ended upwith Oracle 11g XE in Windows XP in VirtualBox.

Kujiraon January 23, 2012 at 7:19 pm said:

Hi Mikie, there are few theme and variation on installing XE, in theDude’s case the chkconfig is deleted after installation, can you give anopinion for this one from a Japanese guy:

http://ameblo.jp/labunix/entry-11109670450.html

it looks much simpler, but would it work?

mikesmitherson January 24, 2012 at 5:38 pm said:

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’dstill run into the NLS_LANG issue if you’re using one of the af‐fected languages.

Mike

Kevin Wisheron January 24, 2012 at 11:14 pm said:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 20∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Pingback: Installing Oracle XE 11g on Debian Squeeze

Followed your instructions and received the error below during theconfiguration:

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

Any suggestions?

mikesmitherson January 30, 2012 at 8:31 pm said:

Kevin,

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

Mike

WaSeidelon February 8, 2012 at 9:33 pm said:

I cannot create the deb.

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

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

mikesmitherson February 10, 2012 at 10:00 pm said:

Hi,

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 21∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

Mike

josir (@josir)on April 1, 2014 at 7:07 pm said:

Hi WaSeidel, I had the same problem. Did you find a solutionfor this failure?

Davidon February 17, 2012 at 12:36 pm said:

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 expalinedhere https://forums.oracle.com/forums/thread.jspa?threadID=2301639

Afriza N. Ariefon February 24, 2012 at 1:53 pm said:

I assume you are using ext4, is it running fine?

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 22∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

mikesmitherson February 26, 2012 at 1:23 pm said:

Afriza,

yes I am running ext4 and I’ve had no problems to date.

Mike

Amaron February 24, 2012 at 10:10 pm said:

I tried all methods to install oracle 11g at some point I got errors likeinvalid port number 8080 but this tutorial worked flawlessly. Thanks alot mate

Georgeon March 17, 2012 at 12:55 am said:

Hello

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

Starting Oracle Net Listener…DoneConfiguring 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 tellsme that

begin*ERROR at line 1:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 23∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

ORA-01034: ORACLE not availableProcess ID: 0Session ID: 0 Serial number: 0

File created.

ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryORA-00845: MEMORY_TARGET not supported on this systemselect ‘utl_recomp_begin: ‘ || to_char(sysdate, ‘HH:MI:SS’) from dual*ERROR at line 1:ORA-01034: ORACLE not availableProcess ID: 0Session ID: 0 Serial number: 0

BEGIN utl_recomp.recomp_serial(); END;

*ERROR at line 1:ORA-01034: ORACLE not availableProcess ID: 0Session 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 availableProcess ID: 0Session ID: 0 Serial number: 0

Please give me some help with this, thanks a lot

Sergioon March 18, 2012 at 4:40 am said:

I have the same problem!!!!!! Can you help us?

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 24∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

mikesmitherson March 19, 2012 at 7:11 pm said:

George/Sergio,

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

I say “should” because, although this does allow the databaseitself to start on boot, for some reason it does not start the lis‐tener ( well, not on my machine, anyway). Therefore, if you con‐nect 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

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

Davidon March 25, 2012 at 6:34 pm said:

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

stephen bengeon April 9, 2012 at 10:33 am said:

I am getting the following error when I try to configure the DB afterinstallation:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 25∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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 availableProcess ID: 0Session ID: 0 Serial number: 0

BEGIN dbms_backup_restore.zerodbid(0); END;

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

ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryORA-00845: MEMORY_TARGET not supported on this systemCreate controlfile reuse set database “XE”*ERROR at line 1:ORA-01034: ORACLE not availableProcess ID: 0Session ID: 0 Serial number: 0

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

alter database “XE” open resetlogs*ERROR at line 1:ORA-01034: ORACLE not available

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 26∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Process ID: 0Session ID: 0 Serial number: 0

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

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

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

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

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

select tablespace_name from dba_tablespaces wheretablespace_name=’USERS’*

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 27∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

ERROR at line 1:ORA-01034: ORACLE not availableProcess ID: 0Session ID: 0 Serial number: 0

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

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

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

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

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

mikesmitherson April 9, 2012 at 6:15 pm said:

Stephen,

my best guess is that the config failed to create the database

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 28∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

controlfile.I suppose the first question would be, which user are you run‐ning the config as ?I was on as root when I ran this on my machine.

HTHMike

stephen bengeon April 9, 2012 at 8:22 pm said:

I was running as root…

mikesmitherson April 11, 2012 at 11:37 am said:

Stephen,Having checked into this a bit more, I think you mightfind the link that David posted helpful OTN Forum

HTHMike

Brianon April 12, 2012 at 10:59 pm said:

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

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

mikesmitherson April 19, 2012 at 8:37 pm said:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 29∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Brian,Good to know it worked for you. I’ll keep my fingers crossedfor you on the APEX upgrade.

Mike

DavidSBon May 14, 2012 at 9:22 am said:

Hi,everything was going great until I hit /etc/init.d/oracle-xe configureThen it says:Database Configuration failed. Look into/u01/app/oracle/product/11.2.0/xe/config/log for detailsI 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 availableProcess ID: 0Session ID: 0 Serial number: 0

BEGIN dbms_datapump_utl.replace_default_dir; END;

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

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 30∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

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

Can you help me?

naveenreddyon May 17, 2012 at 12:04 am said:

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 gettingerror message as “permission denide”.please anyone tell me proper installation guide for oracle………….

DavidSBon May 17, 2012 at 2:57 am said:

Are you the root user?

Douăzecişiunu de Grameon May 19, 2012 at 3:58 pm said:

When i’m trying to access http://localhost:8080 , authentification isneeded

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 31∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

“A username and password are being requested byhttp://localhost:8080. The site says: “XDB” ”

Which username should I use for authentification?

mikesmitherson June 3, 2012 at 9:32 pm said:

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

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

HTH

Mike

Thomason October 15, 2013 at 4:29 pm said:

thanks A LOT. after searching 2 days for the right solu‐tion I found finally this. At only that is necessary. thanksthanks thanks

kujirasanon May 26, 2012 at 10:22 am said:

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 32∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Ashuon July 2, 2012 at 9:15 pm said:

Hi, I tried installing oracle XE 11g on ubuntu following these steps. NowI 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 statusmessages below.***************************************************************************lsnrctl startLSNRCTL for Linux: Version 11.2.0.2.0 – Production on 02-JUL-201212: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 – ProductionNL-00280: error creating log stream/u01/app/oracle/product/11.2.0/xe/network/log/listener.logNL-00278: cannot open log fileSNL-00016: snlfohd: error opening fileLinux Error: 13: Permission denied

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

Now, while following your steps as mentionned in this blog, I may havedone 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 mentionnedlines-touch /var/lock/listenertouch /var/lock/oracle-xetouch /var/lock/listener

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 33∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

touch /var/lock/oracle-xeif [ $RETVAL -eq 0 ] && rm -f /var/lock/listenerrm -f /var/lock/oracle-xeAlso, this is my second try at installing this thing, I have un-installed itonce and re-installed it following the steps you have mentioned above.

PLEASE HELP ME!!!

mikesmitherson July 2, 2012 at 10:49 pm said:

Ashu,

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

Your issue could well be the same or similar to the one de‐scribed here – i.e. the dba group doesn’t have write permis‐sions on listener.log.

HTH

Mike

Ashuon July 11, 2012 at 7:18 pm said:

Thanks Mike, i tried to fix the previous error, but now Ihave the followingerror –

root@localhost:~# lsnrctl status

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

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 34∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

(KEY=EXTPROC_FOR_XE)))TNS-12541: TNS:no listenerTNS-12560: TNS:protocol adapter errorTNS-00511: No listenerLinux Error: 111: Connection refusedConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))TNS-12541: TNS:no listenerTNS-12560: TNS:protocol adapter errorTNS-00511: No listenerLinux Error: 111: Connection refused

I am lost

Ashuon July 11, 2012 at 7:19 pm said:

And this ->

root@localhost:~# lsnrctl start

LSNRCTL for Linux: Version 11.2.0.2.0 – Production on 11-JUL-201211: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 – ProductionSystem parameter file is/u01/app/oracle/product/11.2.0/xe/network/admin/listener.oraLog messages written to/u01/app/oracle/product/11.2.0/xe/network/log/listener.logError listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))TNS-12555: TNS:permission deniedTNS-12560: TNS:protocol adapter errorTNS-00525: Insufficient privilege for operationLinux Error: 1: Operation not permittedNL-08014: Failed to initialize Diagnosability framework, falling back to

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 35∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

old network tracing/loggingNo valid ADR Base to use

NL-08013: Invalid ADR Base directory

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

mikesmitherson July 15, 2012 at 5:21 pm said:

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 filecalled .oracle in /var/tmp. I think this is probably where youshould start.

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

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

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

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

123

sudo su - oracleecho $ORACLE_HOMElsnrctl start

123456789

1011

# listener.ora Network Configuration File: SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/11 (PROGRAM = extproc) ) )

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 36∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

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

HTH

Mike

121314151617181920

LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = mymachine)(PORT = 1521)) ) ) DEFAULT_SERVICE_LISTENER = (XE)

123456789

1011121314151617181920

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

Gaurangon July 16, 2012 at 5:14 pm said:

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 37∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Initially It gave me warning package architecture (amd64) does notmatch system (i386)as i was trying to install amd64 deb pkg. i run command with -forceand it got installed.After then when i tried to configure usingsudo /etc/init.d/oracle-xe configureit gave me error“Configuring database…grep:/u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file ordirectorygrep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such fileor 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 whatis error.

mikesmitherson July 16, 2012 at 6:16 pm said:

Gaurang,

I could be mistaken, but it sounds as if you are trying to installon 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-bitOS. If it returns i686, then you’re on a 32-bit version and willneed to install a 64-bit OS to be able to install 11gXE.

HTH

Mike

1 uname -i

Ashu

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 38∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

on July 16, 2012 at 10:08 pm said:

Hey Mike,

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

mikesmitherson July 19, 2012 at 6:40 pm said:

Ashu,

do you have the /var/tmp/.oracle file ? If so, what are the per‐missions on it ?

Mike

Marcoson July 22, 2012 at 3:50 am said:

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

mikesmitherson July 22, 2012 at 7:22 pm said:

Marcos,Yes, please do. Glad you found it useful.

Mike

Marcoson July 22, 2012 at 7:54 pm said:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 39∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Thanks! I’ll post a link to your great blog.

Best regards

Marcos (from Argentina)

Marcoson July 22, 2012 at 8:22 pm said:

There is! http://www.esdebian.org/wiki/instalar-oracle-11g-express-edition-debian-squeeze-64-bits

Venkat Kunchamon August 22, 2012 at 4:06 pm said:

my linux version is 2.6.18-8.el5 i686.any one tell me where can idownload asmlibrarys rpm

Steven Nobileon August 27, 2012 at 1:20 am said:

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

dpkg –install ./oracle-xe_11.2.0-2_amd64.debSelecting 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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 40∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

(standard_in) 2: syntax error/var/lib/dpkg/info/oracle-xe.postinst: line 79: [: -gt: unary operatorexpected(standard_in) 1: syntax errorAdding 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 toconfigure 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 -

Steven Nobileon August 27, 2012 at 3:15 pm said:

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 ExpressEdition. The following questions will determine whether the databaseshouldbe starting upon system boot, the ports it will use, and the passwordsthatwill be used for database accounts. Press to accept the defaults.

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 41∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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 thesamepassword will be used for SYS and SYSTEM. Oracle recommends theuse ofdifferent passwords for each database account. This can be done afterinitial configuration:Confirm the password:

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

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

Steven Nobileon August 27, 2012 at 3:16 pm said:

P.S. – nothing in the logs

mikesmitherson August 28, 2012 at 1:35 pm said:

Steven,

apologies if you’ve already gone down this route…the error seems to be coming from the file /var/lib/dpkg/info/or‐acle-xe.postinstI believe that this is a file generated and then executed by thedpkg installation process.If you have a look at this file ( line 79 ?) I think that’s where the

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 42∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

problem is.You could try correcting that script and then re-running it on it’sown and then run oracle-xe configureI haven’t come across this problem so I’m not sure what wouldcause it. What OS are you installing on ? Is it Mint or anotherDebian variant ?

HTH

Mike

Steven Nobileon August 30, 2012 at 10:09 pm said:

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 follow‐ing the steps listed here from the OTN Forum on MEM‐ORY_TARGET issues.Unfortunately, I am still failing on the config. My logsshow :ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryORA-00845: MEMORY_TARGET not supported on thissystemalong with a bunch of :ERROR at line 1:ORA-01034: ORACLE not availableProcess ID: 0Session ID: 0 Serial number: 0

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

Any help would be greatly appreciated –

Thanks

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 43∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Steven Nobileon August 31, 2012 at 7:19 pm said:

After reading many links I have found one issue through a link thatsuggests my ORACLE_SID and ORACLE_HOME are not set toanything.

# env | grep ORACLE results inORACLE_SID=ORACLE_HOME=

How and when should these have been set?

mikesmitherson August 31, 2012 at 9:48 pm said:

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 hadcompleted.Hope this is useful. Also, please let me know if it solves theproblem.

12

export ORACLE_HOME=/u01/app/oracle/product/11export ORACLE_SID=XE

[email protected] September 1, 2012 at 4:10 pm said:

Thanks for the help mikesmithers. I have followed theinstructions and also added the memory setup. I havea 6GB system. Everything goes well until I configureand it fails.

This is three days of attempts. I think I am going tothrow in the towel. With the ability to run oracle xe, I

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 44∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

can’t do my development and unfortunately I’ll have tostay with windows.

byornByornon September 19, 2012 at 5:27 am said:

Firstly I want to thank the person who wrote this article. I successfullymanaged to install Oracle XE 11g Release 2, on my laptop runningLinux Mint 12 Mate.

The final issue I faced was this:

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

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

SMon September 27, 2012 at 6:06 am said:

muchas gracias xD

bpron September 27, 2012 at 8:36 pm said:

thnaks for the nice tutorial. worked flawlessly for me.(mint 13)

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 45∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

Avinash G Aon October 27, 2012 at 12:10 pm said:

Best ever technical guide i have ever seen…… Thanks a lot mike……

Nick Kon October 31, 2012 at 7:28 am said:

Mike, you are a wonderful human being. Thank you so much for thegreat service you provided to humanity. And thank you for excellenthumour as well!

Arunon November 11, 2012 at 7:17 pm said:

Thanks a lot Mike. You saved my day installing XE on Mint. The pagewas truly easy to follow and really thankful to you

Jordi Bardajíon November 17, 2012 at 1:56 pm said:

Thanks you very much!!!After one month trying to install oracle at ubuntu 12.04 it’s done!!.

Pieter van Ham

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 46∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

on December 11, 2012 at 7:57 pm said:

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

mikesmitherson December 21, 2012 at 8:17 pm said:

Pieter,

glad you found it useful.Regards passed on and I now have a brownie point bonus !

Thanks,

Mike

udaya kumaron December 20, 2012 at 7:59 pm said:

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 47∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

/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 toconfigure 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 rebootProcessing triggers for libc-bin …ldconfig deferred processing now taking place

mikesmitherson December 21, 2012 at 8:15 pm said:

Udaya,

that all looks fairly normal. Does the install hang at that point ?If not, then what problem do you have ?

Mike.

udaya3373on December 21, 2012 at 8:38 pm said:

Thanks a lot Mike.After installation which step i need to follow please.I tried the” If you want to start over” step and unin‐stalled but after mentioned steps are not succeed like/etc/init.d/oracle-xe stop – not workingupdate-rc.d -f oracle-xe removegrep /var/lock/subsys /etc/init.d/oracle-xe – not work‐ing

Many thanks for your quick response and time.

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 48∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

mikesmitherson December 23, 2012 at 1:42 pm said:

Udaya,

You only need to follow the steps in the “If you wantto start over” section if you want to cancel the installa‐tion.

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

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

HTH,

Mike

udaya3373uon December 23, 2012 at 6:43 pm said:

Hi Mike,

Thanks a lot .I can able to install and configure the Xe .Thanks again.

Duberon February 25, 2013 at 12:22 pm said:

You sir are a hero of the internet ! Thanks for this amazing tutorial ! It

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 49∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Pingback: Oracle Express Edition 11gR2 in Ubuntu 13.04

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

worked like a charm

Mustafa Nami HASon March 4, 2013 at 9:42 pm said:

I have been working with Linux for 2 weeks. It is amazing even for me.You are great, many thanks.

Sunil Poddaron March 15, 2013 at 6:59 am said:

Getting error- ORA-12547: TNS:lost contact.so

Avion June 30, 2013 at 2:34 am said:

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

Hats off !!

Kujirasanon July 7, 2013 at 1:32 am said:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 50∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Hi there, any one had tried to install this on Debian Wheezy?

Tyler Styleon July 23, 2013 at 10:24 pm said:

Worked like a charm on Linux Mint 15 + MATE with Oracle Express11g – thanks very much indeed!

Iori Yagamion August 9, 2013 at 2:48 pm said:

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

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

Iori Yagamion August 9, 2013 at 3:01 pm said:

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

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

mikesmitherson August 10, 2013 at 3:16 pm said:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 51∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Iori,

assuming your username on your machine is iori, thenthe output of

looks fine.

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

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

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

Looking at my installation on Mint the permissions are :

If you cannot start the database using the menu ( orsimply running the script as your user), then you maywant to take a look atthis post about troubleshooting.

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

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

Thanks,

Mike

1 sudo grep dba /etc/groups

12

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

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 52∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Iori Yagamion August 11, 2013 at 10:05 am said:

I think I’ve missed the shared memory part. Anyway, Irepeated everything from the beginning, I followedevery single step. the oracle-env.sh didn’t show any er‐ror, but it didn’t create any env variable, so I did themmanually.The result is total success. I should say that, your tutois kinda reference. Congrats! and thank you very much!

Linux Mint 15 (Olivia)

mikesmitherson August 11, 2013 at 12:30 pm said:

Iroi,

great to know you got it working.

Thanks,

Mike

Robon August 31, 2013 at 4:49 am said:

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

Unable to connect

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 53∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

mikesmitherson August 31, 2013 at 12:13 pm said:

Rob,

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

HTH

Mike

Robon September 1, 2013 at 3:23 am said:

I’m sorry to say this, but I’m a noob at Oracle Expressin Ubuntu. Where is Oracle Database 11g Express Edi‐tion Menu? I went to the dash home and typed in ora‐cle, but all I’m seeing is ‘Get Started With Oracle Data‐base 11g Express Edition’. Thanks.

Rob

Robon September 1, 2013 at 4:48 am said:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 54∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Pingback: Versioning your database using Liquibase | Craig on softwaredevelopment

Pingback: Instalacion Oracle11gXE | Blogs personal

Whoops, never mind. I found out that I had to installclassic Menu indicator from the terminal in Ubuntu. Af‐ter that, I rebooted it and clicked on it but still got anerror (8080). So I stopped the database, waited, andstarted the database, waited, and it finally worked! It’sannoying, but it’s the only way that it works. I won’tshut down Ubuntu and leave it saved in VirtualBox.Thanks for your help Mike!

Rob

craigewenwilliamson September 8, 2013 at 8:03 am said:

Fantastic post, this was a great help.

Richard Banneron November 19, 2013 at 8:01 am said:

Excellent post, worked perfectly for me, thank you very much

Riinavon November 27, 2013 at 9:22 am said:

Thanks, your post is very helpful and I successfully Installed on Mint15-Cinn

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 55∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Pingback: Installation and Getting Up and Running with Oracle 11gExpress (in 30 minutes or less!) | I, T:eeeJay: Hacking My Way Into TheFuture

Vineeton February 16, 2014 at 8:57 pm said:

Hello Mike,

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

Starting Oracle Net Listener…DoneConfiguring database…grep:/u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file ordirectorygrep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such fileor directoryDone/bin/chmod: cannot access `/u01/app/oracle/diag': No such file ordirectoryStarting Oracle Database 11g Express Edition instance…DoneInstallation 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 13Maya.

Regards,

Vineet

Clemens Leitneron September 6, 2014 at 11:16 am said:

So intalled everthing, but when I try to startup the database i dont get areply from the command line and when I click on the get started icon

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 56∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

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

RegardsClemens

123456789

101112131415161718192021222324252627282930

clemens-school clemens # service oracle-xe startStarting Oracle Net Listener.Starting Oracle Database 11g Express Edition instance. clemens-school clemens # service oracle-xe status LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 06-SEP-2014 12:11:35 Copyright (c) 1991, 2011, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.2.0 - ProductionStart Date 06-SEP-2014 12:07:37Uptime 0 days 0 hr. 4 min. 1 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFDefault Service XEListener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/clemens-school/listener/alert/log.xmlListening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=clemens-school)(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

Clemens Leitneron September 6, 2014 at 11:32 am said:

and this is the error message when i try to start sqlplusclemens-school clemens # sqlplus

SQL*Plus: Release 11.2.0.2.0 Production on Sat Sep 612:26:24 2014

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

Enter user-name: sysEnter password:

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 57∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

ERROR:ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryProcess ID: 0Session ID: 0 Serial number: 0

mikesmitherson September 6, 2014 at 11:44 am said:

Clemens,

Apologies, I replied to your last comment as you posted thisone !

It looks like the database is not up.Therefore, I’d suggest you try starting it as I described in mycomment just now – i.e.either from the menu or using the script.

To run the script – make sure that the user you are connectedas is a member of the dba group. To check which users are inthe dba group :

The other thing you need to check is that the appropriate envi‐ronment variables are set for the user you are going to run thestartup command as.You can check this on the command line by :

Once you’re happy that everything is in order, you can run thescript :

Note that this script starts the TNS Listener as well as the data‐base. The listener is what facilitates connections to APEX (which is what the Getting Started Web Page is running in).

1 sudo grep dba /etc/group

1 echo $ORACLE_HOME

1 /u01/app/oracle/product/11.2.0/xe/config/scripts/startdb

2014/9/21 上午2:42Installing Oracle 11gXE on Mint and Ubuntu | The Anti-Kyte

⾴頁⾯面 58∕58http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/

Please let me know how you get on, or if you need any furtherdetails.

Mike