How to install Oracle 10g (Full 64 bits version, not XE) and Tora on GNU Linux Ubuntu Karmic 9.10 (64 bits version)

Why installing Oracle 64 bits

Ubuntu provides a nice and easy tutorial for installing Oracle 10 XE on 32 bits systems, thats works also on 64bits sytems, but:

  • This is for Oracle XE, non standard or enterprise edition
  • Database is limited to 5 simultaneous connections
  • Default Tora 64 bits won't work on 64 bits systems with the Oralce XE 32 bits editions
  • Oracle XE is limited in functionalities, url_quote, for example, is not provided with this distribution

Downloading Oracle 10g 64 bits for Linux

First, download Oracle 10g Enterprise/Standard Edition for Linux x86-64 from Oracle website.

Then extract the downloaded file:
 

cpio -idmv < 10201_database_linux_x86_64.cpio

 

A new folder named database will be extracted.

Preparing the system

Second, read the HTML documentation of the quick install guide you can found in the extracted folder at this place: database/doc/install.102/b15668/toc.htm

For the rest of this howto, we suppose Oracle will be installed at /opt/oracle Root directory.

We will have to:

  • Create required users and groups accounts
  • Set required system parameters in /etc/sysctl.conf
  • Installing complementary packages

Creating system accounts

Creating Oracle Inventory group:

	sudo groupadd oinstall

Creating Oracle DBA group:

	sudo groupadd dba

Creating Oracle user home and account:

	sudo mkdir -p /opt/oracle
	sudo useradd -g oinstall -G dba  -d /opt/oracle -s /bin/bash oracle
	sudo passwd oracle
	sudo chown -R oracle:oinstall /opt/oracle

Adding nobody group to nobody user:

	sudo addgroup nobody
	sudo usermod -g nobody nobody

Updating kernel parameters

This is one of the longest task of this installation. Because you will have to check your current config.
Check commands in Oracle documentation for this, section 6 Configuring Kernel Parameters.
Then, edit the file /etc/sysctl.conf as described below:

	sudo gedit /etc/sysctl.conf

Add the following lines:

# Oracle 10g
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 32768 65000
# Replace kernel.shmmax with the half of your memory in bytes
# 1073741824 is 1 GigaBytes
kernel.shmmax=1073741824
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
# To allow dba to allocate hugetlbfs pages
# 1002 is your DBA group, id. grep dba /etc/group will give this value
vm.hugetlb_shm_group = 1002

About HUGE TLB.
This is needed on Ubuntu Karmic and was not required on Ubuntu Jaunty (kernel parameters were apparently different).
Without this parameters your Oracle instance won't start.
You have to replace the value of 1002 with the group ID of the DBA group.
Read this great howto install Oracle on debian to know more about huge tlb parameter.

Now, update /etc/security/limits.conf:

	sudo gedit /etc/security/limits.conf

And add the following parameters:

# Oracle
oracle           soft    nproc   2047
oracle           hard    nproc   16384
oracle           soft    nofile  1024
oracle           hard    nofile  65536

Check that /etc/pam.d/login contains a line like this one:

	session    required   pam_limits.so

Installing additional packages

If not already done, update your distribution with the latest packages:

	sudo apt-get update
	sudo apt-get dist-upgrade

Install the following additional packages:

	sudo apt-get install gcc make binutils gawk x11-utils rpm alien ksh lsb-rpm
	sudo apt-get install autotools-dev libltdl-dev
	sudo apt-get install --yes autoconf automake binutils bzip2 doxygen gcc less libc6-dev make perl-doc unzip zlibc
	sudo apt-get install libaio1 lesstif2 libmotif3 libaio-dev
	# Some of the ones below may not be needed, but as of many failures before getting it doing right, all these have been installed.
	sudo apt-get install libpthread-stubs0 libpthread-stubs0-dev libpth-dev libc6-i386  libc6-dev-i386
	sudo apt-get install g++-multilib gcc-multilib

And also these below to try to get ride of link errors.

	sudo aptitude install lesstif2-dev lib32stdc++6 lib32z1 sysstat rlwrap unixodbc unixodbc-dev elfutils
	sudo apt-get install gsfonts-x11 java-common sun-java6-bin sun-java6-jre

And to prevent from runInstaller terrific ./runInstaller: line 54: ./install/.oui: No such file or directory error message:

	sudo apt-get install ia32-libs

Oracle 10g also needs libstdc++5 that is not provided with Ubuntu Karmic.
There are many ways to install it, I have followed this howto to install libstdc++5 on Ubuntu Karmic
Below is the summary of this HOWTO:

mkdir /tmp/libstdc++5
cd /tmp/libstdc++5
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3....
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3....

sudo dpkg --force-architecture -i libstdc++5_3.3.6-17ubuntu1_i386.deb
sudo mv /usr/lib/libstdc++.so.5* /usr/lib32/

sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb

Now reboot your system to be sure these parameters will be taken in account for the next part of the installation.

Others configurations

Now, change default sh script by bash:

 

	sudo ln -sf /bin/bash /bin/sh

Then some others commands used by Oracle installer:

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

Connect as Oracle user and set some default startup file

	sudo su - oracle
	cd
	touch .bashrc
	ln -s .bashrc .bash_profile

Edit .bashrc file:

	vi .bashrc

And add the following line:

	umask 022

Execute the .bashrc file or restart a bash shell

	source .bashrc

Installing Oracle

Now we can start the installation of the Oracle 10g archive.

Allow others users to connect to your X session, by entering in a bash shell:

	xhost +

Then, login as oracle user:

	su - oracle

Go in the extracted database folder and run the following commands:

	export DISPLAY=:0
	unset ORACLE_HOME
	unset TNS_ADMIN
	
	./runInstaller -ignoreSysPrereqs

Then, Oracle installer should start in graphic mode

You will encounter this issue while linking:

INFO: /usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib/snmccolm.o' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib/libnmccol.a(nmccole.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib/libnmcbuf.a(nmcbuft.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architectur
INFO: e of input file `/product/10.2.0/db_1/sysman/lib/libnmcbuf.a(nmcbufw.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib/libnmcbuf.a(nmcbufu.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib/libnmcbuf.a(snmcbufm.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file 
INFO: `/product/10.2.0/db_1/sysman/lib/libnmcbuf.a(nmcbuff.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib//libnmadbg.a(nmadbg.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/product/10.2.0/db_1/sysman/lib//libnmadbg.a(snmadbg.o)' is incompatible with i386:x86-64 output

Just ignore this error for the moment:

Finishing the installation

The install process will finally ask you to execute scripts as root user, just do so:

	sudo /opt/oracle/oracle10gse/product/10.2.0/db_1/root.sh

Starting and stopping Oracle

We should now be able to start Oracle database if you had choosed to create one during installation. Yes go to next section Creating an Oracle database and come back.

First, add the following variable declaration in your oracle user .profile, .bashrc or .bash_profile scripts:

export ORACLE_HOME=/opt/oracle/oracle10gse/product/10.2.0/db_1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin

Then start a new shell or execute one of the updated files:

	source .bashrc

Starting up the database

Finally, to manually start Oracle, run these commands as oracle user

	lsnrctl start
	dbstart

You may encounter this error Failed to auto-start Oracle Net Listene using /ade/vikrkuma_new/oracle/bin/tnslsnr.
Also your database may not start. Then, first check in /etc/oratab that it has the 'Y' flag, if not, set it.

	sudo gedit /etc/oratab

And replace N by Y

orcl:/opt/oracle/oracle10gse/product/10.2.0/db_1:Y

To get ride of this the Failed to auto-start Oracle Net Listene using /ade/vikrkuma_new/oracle/bin/tnslsnr message, edit dbstart script and replace the hardcoded path with $ORACLE_HOME

	which dbstart
	#/opt/oracle/oracle10gse/product/10.2.0/db_1/bin/dbstart
	gedit /opt/oracle/oracle10gse/product/10.2.0/db_1/bin/dbstart

And edit this part of script

# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME

Connecting to the database

Now, just try to connect to the freshly started database:

oracle@ubuntu-laptop:~/oracle10gse/product/10.2.0/db_1/log$ sqlplus system@orcl
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 11 12:01:24 2010
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Enter password: 
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
SQL> select 'Oracle 10g is working on Ubuntu 9.10 Karmic' as SUCCESS from dual;
SUCCESS
-------------------------------------------
Oracle 10g is working on Ubuntu 9.10 Karmic
SQL> 

Shutting down the database

Just entry the following commands with Oracle user:

	dbshut
	lsnrctl stop

Others nice HowTo

You can find other helpful howtos and tutorials to install Oracle (32 or 64 bits) on Ubuntu on the links below:

Votre notation : Aucun Moyenne : 5 (7 votes)
Étiquettes:

For those that are SSH'ing into a server...

See the below article for how to ssh into a box, and get the installer running through X11 Forwarding:

http://www.debian-administration.org/articles/494

Thanks, this a great guide

Thank you very much for this guide. It worked perfectly for an install on Ubuntu 10.04 (Lucid Lynx) 64-bit Server.

Note: If you install from an Ubuntu 10.04 Desktop, check this link out for enabling remote X access.

https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/498434

Thanks Gaël !

For installing Tora, see this tiny post "How to install Oracle 10g and Tora on GNU Linux Ubuntu Karmic 9.10": http://www.asilax.fr/technoblog/blog/2010/how-to-install-oracle-10g-and-...

Thanks, this was great

I would have quit long before I had Oracle installed had I not found this tutorial. Thanks so much.

BTW, I used this to get Oracle onto Ubuntu 9.10 server 32 bit, and for the most part it all worked the same.

Thank you ...

... very much after googling a lot, I've found this tutorial: working perfectly for my needs (ubuntu 10.04 oracle 10.2.0)
:)

Thank you

Thank you, this is exactly what I needed.

I tried a few times to get Oracle 10gR2 installed on my Ubuntu machine and I already started to feel stupid ;-)

Thx again.

your doc helps a lot in

your doc helps a lot in guiding people to finish the installation of oracle 10g ent versio on ubuntu 9.10

Reply

I read your post and totally agree with you.Its nice sharing.web sites are source of information and this is one of them I book mark it and mail all of my friends to must check it.