Oracle speaks on Kubuntu: Installing Oracle 10g on Kubuntu Linux

July 30, 2008

Arguably Oracle 10g Enterprise Edition is the most commonly used database for enterprise applications. Financial institutions, government organizations, manufacturing companies, etc. all use this database for their enterprise needs. This blog talks about installing Oracle 10g Enterprise Edition on Kubuntu 8.0.4. Ever since its launch, Kubuntu and its GNOME cousin Ubuntu, have become a very popular flavor of GNU Linux for the desktop. I have been using the Ubuntu versions for quite some time now, and needless to say I have not felt the need to switch back to any other OS ever since.

During my attempts at installing Oracle, I was hugely helped by Tomasz Węgrzanowski blog. He deserves a big thanks. Its available at:
http://t-a-w.blogspot.com/2007/11/installing-oracle-10g-enterprise.html

I followed most of the steps described in Tomasz’s blog, but some I found were not required. So here’s my attempt at a slightly simpler instruction set.

It is assumed that Oracle 10g database software is already downloaded and there is a working version of Kubuntu 8.0.4. These software can be downloaded from:

  • Oracle: http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201linuxsoft.html
  • Kubuntu 8.0.4: http://www.kubuntu.org/getkubuntu
Also, the steps are for the 32-bit version of the database.

My installation target directory was /opt/oracle10g. Make sure that the target installation directory is writable by the user under which you want to install Oracle.

Oracle installation expects a few binaries in certain directories, namely basename and awk. The installer expects both these binaries to be available under /bin. So we need to create a couple of links to these directories:

prosenjit@vito:~$ sudo ln -s /usr/bin/basename /bin/basenameprosenjit@vito:~$ sudo ln -s /usr/bin/awk /bin/awk

You can test these by invoking /bin/awk and /bin/basename from a console window.

Once this is done, its time to run the installer. To do so change into the directory where you have unzipped the Oracle distribution and invoke the following command:

prosenjit@vito:~$ ./runInstaller -ignoresysprereqs

The -ignoresysprereqs flag instructs the installer to ignore the supported Linux distribution check. Since Kubuntu is still not supported by Oracle as an official release platform, this flag is necessary.

Running the installer should show up a GUI. Follow the instructions till the installer asks you to run one or more scripts. For me there was only one script:

/opt/oracle10g/root.sh

The location of the script depends on the target directory you have chosen and also on the operating system. Once this is done, come back to the GUI and perform the next steps. This should install Oracle properly in your system.

To start Oracle certain environment settings have to be done. Usually I prefer to put these entries into my .bashrc file. That way I do not have to do so everytime I want to start or stop Oracle. Here are my settings:

export ORACLE_HOME=/opt/oracle10gexport LD_LIBRARY_PATH=$ORACLE_HOME/libexport ORACLE_OWNR=prosenjitexport PATH=$PATH:$ORACLE_HOME/binexport ORACLE_SID=oradab10 (During installation I had created a databasewith the SID oradab10)

Thats about it. Other than this you might need to do some work on the listener.ora and tnsnames.ora file.

My tnsname.ora file has the following:

oradab10 =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED) (SID = oradab10) ))

My listenr.ora has the following entry:

SID_LIST_LISTENER =(SID_LIST =(SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /opt/oracle10g) (PROGRAM = extproc))(SID_DESC = (SID_NAME = oradab10) (ORACLE_HOME = /opt/oracle10g)))

To start Oracle first you need to start the listener. Open a console window and type in the following command:

prosenjit@vito:~$ lsnrctl startLSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-JUL-2008 22:59:26

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

Starting /opt/oracle10g/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionSystem parameter file is /opt/oracle10g/network/admin/listener.oraLog messages written to /opt/oracle10g/network/log/listener.logListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))STATUS of the LISTENER------------------------Alias                     LISTENERVersion                   TNSLSNR for Linux: Version 10.2.0.1.0 - ProductionStart Date                30-JUL-2008 22:59:26Uptime                    0 days 0 hr. 0 min. 0 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      OFFListener Parameter File   /opt/oracle10g/network/admin/listener.oraListener Log File         /opt/oracle10g/network/log/listener.logListening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))Services Summary...Service "PLSExtProc" has 1 instance(s).Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...Service "oradab10" has 1 instance(s).Instance "oradab10", status UNKNOWN, has 1 handler(s) for this service...The command completed successfully

Now start the Oracle database with the following command:

prosenjit@vito:~$ dbstartProcessing Database instance "oradab10": log file /opt/oracle10g/startup.log

To verify that the Oracle process was started invoke the following command at the console:

prosenjit@vito:~$ ps -ef|grep ora

You should get an output similar to:

root      5602  5497  0 21:15 ?        00:00:00 hald-addon-storage: polling /dev/scd0 (every 2 sec)1000      6277     1  0 22:59 ?        00:00:00 /opt/oracle10g/bin/tnslsnr LISTENER -inherit1000      6351     1  0 23:00 ?        00:00:00 ora_pmon_oradab101000      6353     1  0 23:00 ?        00:00:00 ora_psp0_oradab101000      6355     1  0 23:00 ?        00:00:00 ora_mman_oradab101000      6357     1  0 23:00 ?        00:00:00 ora_dbw0_oradab101000      6359     1  0 23:00 ?        00:00:00 ora_lgwr_oradab101000      6361     1  0 23:00 ?        00:00:00 ora_ckpt_oradab101000      6363     1  0 23:00 ?        00:00:00 ora_smon_oradab101000      6365     1  0 23:00 ?        00:00:00 ora_reco_oradab101000      6367     1  0 23:00 ?        00:00:00 ora_cjq0_oradab101000      6369     1  0 23:00 ?        00:00:00 ora_mmon_oradab101000      6371     1  0 23:00 ?        00:00:00 ora_mmnl_oradab101000      6373     1  0 23:00 ?        00:00:00 ora_d000_oradab101000      6375     1  0 23:00 ?        00:00:00 ora_s000_oradab101000      6379     1  0 23:00 ?        00:00:00 ora_qmnc_oradab101000      6383     1  1 23:00 ?        00:00:00 ora_j000_oradab101000      6385     1  0 23:00 ?        00:00:00 ora_j001_oradab101000      6387     1  0 23:00 ?        00:00:00 ora_j002_oradab101000      6389     1  0 23:00 ?        00:00:00 ora_j003_oradab101000      6391     1  0 23:00 ?        00:00:00 ora_j004_oradab101000      6395     1  0 23:00 ?        00:00:00 ora_q000_oradab101000      6397     1  0 23:01 ?        00:00:00 ora_q001_oradab101000      6400  6249  0 23:01 pts/1    00:00:00 grep ora

To stop a running instance issue the following command:

prosenjit@vito:~$ dbshut

This will shutdown your database, but the listener is still running. To stop the listener:

prosenjit@vito:~$ lsnrctl stop

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-JUL-2008 23:03:15

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))The command completed successfully

Thats pretty much it. Oh, I had faced a problem while starting the Oracle instance when I rebooted the machine. It turned out to be a problem with the /etc/oratab file. The entry in my /etc/oratab file is:

oradab10:/opt/oracle10g:Y

The ending Y seemed to make all the difference.

Hope this helps.

Entry Filed under: Kubuntu, Linux, installing oracle on kubuntu, installing oracle on linux, oracle. .

1 Comment Add your own

  • 1. Websites tagged "10g" on Postsaver  |  May 14, 2009 at 10:47 pm

    [...] – Oracle speaks on Kubuntu: Installing Oracle 10g on Kubuntu Linux saved by mtk1002009-04-30 – Oracle and OpenSuse 11 Part 2 (32-bit) saved by xllora2009-04-29 – [...]

    Reply

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Express your opinion

I am on LinkedIn

View Prosenjit Bhattacharyya's profile on LinkedIn

Blogroll

Recent Posts

Top Posts

My Posts

Blog Stats

My Categories

apple app store future technology google google chrome google phone iphone iphone 3g ipod Kubuntu laptop Linux mac book macbook air mac book pro macbook touch mac os mbp microsoft mozilla new laptop notebook open source operating system palm smart phone Ubuntu Uncategorized web browser windows

My Tags

adobe android android market apple apple iphone apple iphone 3g app store call drop chrome firefox flex g1 google google android google chrome google phone iphone iphone 3g iphone 3g problem ipod javascript kde Kubuntu laptop lawsuit Linux mac macbook macbook pro mac os microsoft mozilla new apple laptops new macbook new macbook pro notebook open source palm psystar silverlight smart phone t-mobile g1 Ubuntu web browser windows