Pythian has openings for MySQL and MS SQL Server DBAs in each of our offices in Ottawa, Canada; Boston, USA; Dubai, UAE; and Hyderabad, India. If you are a MySQL and/or SQL Server DBA and would like to evaluate this opportunity, please send us your résumé with an introductory paragraph to hr@pythian.com.

Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)

By Augusto Bott May 6th, 2008 at 4:07 pm
Posted in Oracle
Tags:

After our last post about installing Oracle 11g on Ubuntu 7.10 (November, 6th), and considering Ubuntu 8.04 LTS was released on April 21st, I spent some time reviewing and putting together this new HOWTO for the installation.

Please note: I’ve used the x86 server version of Ubuntu 8.04, but the same steps should work without any problems for the Desktop version. Also notice that this whole procedure can easily take over six hours to complete, so don’t complain I didn’t warn you!

So, let’s get started, shall we?

Step One

Get the Ubuntu Linux 8.04 Hardy Heron (x86, 32-bit) image here, burn it, and install on any box you like. The only remark on the installation is that you should ask the installer to install an OpenSSH server at the end of the installation, since we’ll perform all the steps on this procedure remotely.

I’m not sure about the minimum requirements for the server, as, the last time I checked, running Oracle on Ubuntu is not officially supported by Oracle. In case you’re wondering, however, I’m using an x86 Pentium-like machine with 512M of RAM.

Step Two

Download Oracle 11g for Linux (x86, 32-bit).

It’s a good idea to verify the checksum hashes of the downloaded images before burning them (especially the ISO file to install Ubuntu). You can do that with one or more of md5sum filename, sha1sum filename , or cksum filename on almost any Unix-like box. Here are the pages showing the hashes:

(Wikipedia has pages on both these hash functions: MD5 and cksum.)

Step Three

We’ll need an X server for this howto, so on your desktop computer, allow X connections from your (soon-to-be) database server to your desktop. If you happen to be using Ubuntu on the Desktop as well, go to System -> Administration -> Login Window, select the Security tab and uncheck the box next to “Deny TCP connections to the Xserver”. You will have to restart your Xserver for this change to take effect.

I’m running Ubuntu on the desktop (I call this host “note“), so I have already an X server up and running. You can probably skip this step if you’re running the X server on the same machine you’re installing the database onto. Change 192.168.x.y to the IP address of your soon-to-be Oracle 11g database server:

bott@note:~$ hostname
note
user@note:~$ xhost +192.168.x.y
192.168.x.y being added to access control list

Step Four

Log in to your machine via SSH and upgrade all packages.

bott@note:~$ ssh user@192.168.x.y
user@192.168.x.y's password:
Linux hardy 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Thu May  1 21:45:05 2008 from 192.168.w.z
user@hardy:~$

Once you have made sure you have network connectivity, update all packages to the latest version (after all, we’re using a newly released version and updates can be expected at some point in the future). Here’s the output as of Thursday, May 4th 2008:

user@hardy:~$ hostname
hardy
user@hardy:~$ sudo su -
[sudo] password for pythian:
root@hardy:~# apt-get update
Hit http://security.ubuntu.com hardy-security Release.gpg
Ign http://security.ubuntu.com hardy-security/main Translation-en_US
Hit http://us.archive.ubuntu.com hardy Release.gpg
Ign http://us.archive.ubuntu.com hardy/main Translation-en_US
(...)
Fetched 7455kB in 2min36s (47.6kB/s)
Reading package lists... Done
root@hardy:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libldap-2.4-2 lshw
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 498kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com hardy-updates/main libldap-2.4-2 2.4.7-6ubuntu4.1 [181kB]
Get:2 http://us.archive.ubuntu.com hardy-updates/main lshw 02.12.01-2ubuntu1.1 [317kB]
Fetched 498kB in 2s (211kB/s)
(Reading database ... 18768 files and directories currently installed.)
Preparing to replace libldap-2.4-2 2.4.7-6ubuntu3 (using .../libldap-2.4-2_2.4.7-6ubuntu4.1_i386.deb) ...
Unpacking replacement libldap-2.4-2 ...
Preparing to replace lshw 02.12.01-2ubuntu1 (using .../lshw_02.12.01-2ubuntu1.1_i386.deb) ...
Unpacking replacement lshw ...
Setting up libldap-2.4-2 (2.4.7-6ubuntu4.1) ...
Setting up lshw (02.12.01-2ubuntu1.1) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
root@hardy:~#

In case you’re wondering why we used sudo su - instead of sudo -s (as on the last version of this HOWTO ): sudo su - effectively makes us root with a new/empty session, while sudo -s makes us root while preserving some of our session variables from our “user” session. I chose this path in an attempt to make this whole process a bit more deterministic and less vulnerable to problems.

If apt-get dist-upgrade installs a new kernel version, it’s a good idea to reboot the box before proceeding.

root@hardy:~# reboot

Broadcast message from user@hardy
        (/dev/pts/0) at 0:04 ...

The system is going down for reboot NOW!
root@hardy:~# Connection to 192.168.x.y closed by remote host.
Connection to 192.168.x.y closed.
bott@note:~$

Step Five

Once our machine is back up, we log in again and install a few extra packages needed for the installation: build-essential, libaio1, gawk, ksh, libmotif3, alien, libtool, and lsb-rpm. Please also note that our kernel has been upgraded to a newer build:

bott@note:~$ ssh user@192.168.x.y
user@192.168.x.y's password:
Linux hardy 2.6.24-16-server #1 SMP Thu Apr 10 13:58:00 UTC 2008 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Thu May  1 21:45:05 2008 from 192.168.w.z

user@hardy:~$ sudo su -
[sudo] password for pythian:
root@hardy:~# apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  autotools-dev binutils debhelper dpkg-dev g++ g++-4.2 gcc gcc-4.2 gettext html2text intltool-debian libbeecrypt6 libc6-dev libgomp1 libice6 libneon27
  librpm4.4 libsm6 libstdc++6-4.2-dev libtimedate-perl libx11-6 libx11-data libxau6 libxcb-xlib0 libxcb1 libxdmcp6 libxext6 libxml2 libxmu6 libxp6 libxt6
  linux-libc-dev make patch po-debconf rpm x11-common
Suggested packages:
  lintian binutils-doc dh-make debian-keyring g++-multilib g++-4.2-multilib gcc-4.2-doc libstdc++6-4.2-dbg autoconf automake1.9 bison flex gcc-doc
  gcc-multilib gdb manpages-dev gcc-4.2-locales gcc-4.2-multilib libgcc1-dbg libgomp1-dbg libmudflap0-4.2-dbg libmudflap0-4.2-dev cvs gettext-doc glibc-doc
  libstdc++6-4.2-doc automaken gcj gfortran fortran95-compiler libtool-doc make-doc diff-doc
Recommended packages:
  libltdl3-dev xml-core libmail-sendmail-perl libcompress-zlib-perl libmail-box-perl
The following NEW packages will be installed:
  alien autotools-dev binutils build-essential debhelper dpkg-dev g++ g++-4.2 gawk gcc gcc-4.2 gettext html2text intltool-debian ksh libaio1 libbeecrypt6
  libc6-dev libgomp1 libice6 libmotif3 libneon27 librpm4.4 libsm6 libstdc++6-4.2-dev libtimedate-perl libtool libx11-6 libx11-data libxau6 libxcb-xlib0
  libxcb1 libxdmcp6 libxext6 libxml2 libxmu6 libxp6 libxt6 linux-libc-dev lsb-rpm make patch po-debconf rpm x11-common
0 upgraded, 45 newly installed, 0 to remove and 0 not upgraded.
Need to get 22.9MB of archives.
After this operation, 80.5MB of additional disk space will be used.
Do you want to continue [Y/n]?
(... again: downloads a bunch of packages ...)
(... again: installs a bunch of packages  ...)
Processing triggers for libc6 ...
ldconfig deferred processing now taking place

root@hardy:~#

Step Six

After all those packages and updates are installed, we make some adjustments on our system. First of all, we change the default replacement for sh from dash to bash. Do not forget skip this step, otherwise we might get all sorts of weird errors during our installation:

root@hardy:~# cd /bin
root@hardy:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-04-28 19:59 /bin/sh -> dash
root@hardy:/bin# ln -sf bash /bin/sh
root@hardy:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash

In case you’re wondering why Ubuntu uses dash as default, here is a detailed explanation of why dash is the default system shell and how if differs from bash.

Step Seven

Next we make some modifications to our base system (line numbers added for clarity, see below):

01 root@hardy:/bin# cd
02 root@hardy:~# pwd
   /root
04 root@hardy:~# addgroup oinstall
   Adding group `oinstall' (GID 1001) ...
   Done.
07 root@hardy:~# addgroup dba
   Adding group `dba' (GID 1002) ...
   Done.
10 root@hardy:~# addgroup nobody
   Adding group `nobody' (GID 1003) ...
   Done.
13 root@hardy:~# usermod -g nobody nobody
14 root@hardy:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
15 root@hardy:~# passwd -l oracle
   Password changed.
17 root@hardy:~# mkdir /home/oracle
18 root@hardy:~# chown -R oracle:dba /home/oracle
19 root@hardy:~# ln -s /usr/bin/awk /bin/awk
20 root@hardy:~# ln -s /usr/bin/rpm /bin/rpm
21 root@hardy:~# ln -s /usr/bin/basename /bin/basename
22 root@hardy:~# mkdir /etc/rc.d
23 root@hardy:~# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done
24 root@hardy:~# mkdir -p /u01/app/oracle
25 root@hardy:~# chown -R oracle:dba /u01
26 root@hardy:~#
  • Lines 01-03: change our path back to /root (HOME for the root user, not really needed)
  • Lines 04-12: add the groups we need.
  • Line 13: adapts Ubuntu’s nobody user so the Oracle installer doesn’t get confused.
  • Lines 14-18: we create the oracle user, lock that account so no one can log in with it, and create a HOME directory for the user (not the same as ORACLE_HOME).
  • Lines 19-23: we create some symlinks so the Oracle installer finds the paths where it expects them to be.
  • Finally, on lines 24-25 we create our ORACLE_BASE.

Step Eight

We change a few of the defaults on our system, adding the following to the end of /etc/sysctl.conf. This will extend the total number of file descriptors on a system, the size of shared memory, and will do some tweaking on the networking subsystem. About the networking tweaks: it may bring benefits or it may not — your mileage may vary.

fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Add this to the end of /etc/security/limits.conf:

oracle soft nproc 2047
oracle hard nproc 16383
oracle soft nofile 1023
oracle hard nofile 65535

And add this to the end of /etc/pam.d/login so we enforce what we just added to /etc/security/limits.conf:

session required /lib/security/pam_limits.so
session required pam_limits.so

There is some explanation for all these system modifications on the first post: Installing Oracle 11g on Ubuntu Linux 7.04.

Before continuing, you have two choices: you reboot the machine so the new values are loaded for sysctl.conf; or you ask the box to reload them with sysctl -p:

root@hardy:~# sysctl -p
kernel.printk = 4 4 1 7
kernel.maps_protect = 1
fs.inotify.max_user_watches = 524288
vm.mmap_min_addr = 65536
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
root@hardy:~#

Step Nine

For this HOWTO, I’ve unpacked the ZIP file we downloaded on Step 2 in /home/oracle, so we su to the oracle user, export our DISPLAY (change 192.168.w.z to the IP address of your X server), and start the installation. When we do su - oracle, Ubuntu will complain about the account being expired — this is harmless. When starting the installer, please note that we pass the -ignoreSysPrereqs command-line switch.

root@hardy:~# su - oracle
Your account has expired; please contact your system administrator
su: User account has expired
(Ignored)
oracle@hardy:~$ export DISPLAY=192.168.w.z:0.0
oracle@hardy:~$ pwd
/home/oracle
oracle@hardy:~$ ls -l
total 4
drwxr-xr-x 6 oracle dba 4096 2007-09-18 18:50 database
oracle@hardy:~$ cd database
oracle@hardy:~/database$ ls -l
total 28
drwxr-xr-x 11 oracle dba 4096 2007-08-06 16:02 doc
drwxr-xr-x  5 oracle dba 4096 2007-08-03 13:28 install
drwxr-xr-x  2 oracle dba 4096 2007-09-18 18:52 response
-rwxr-xr-x  1 oracle dba 2911 2007-08-03 13:28 runInstaller
drwxr-xr-x 14 oracle dba 4096 2007-08-03 13:27 stage
-rw-r--r--  1 oracle dba 4835 2007-08-06 18:19 welcome.html
oracle@hardy:~/database$ ./runInstaller -ignoreSysPrereqs

After a few moments, the Oracle Universal Installer (OUI) will show you a window similar to this one (as well as a bunch of garbled text on the SSH session, no need to bother with that now unless no window pops up):

screenshot-0.png

After you hit Next, it will ask you where you want the Oracle Inventory should be installed. I’ve changed the group to dba, but you don’t need to change it if you don’t want to

screenshot-2.png

Hitting Next will make the OUI review which products are included in the package:

screenshot-3.png

We’re choosing Enterprise Edition on this HOWTO, but you can choose whatever you want.

screenshot-4.png

It will ask you the paths for the installation:

screenshot-5.png

I chose the defaults and hit Next:

screenshot-6.png

The next step — some prerequisite checks. Some of them will fail: this is expected — after all we’re installing on an unsupported platform.

screenshot-7.png

All you have to to is click on each of the unmarked the checkboxes (those on which Status is not Succeeded). As you click on them, the Status will change to User Verified.

screenshot-8.png

After hitting Next, OUI will ask if we want to create a database. I chose “Install Software Only” as a new database can be created later with dbca.

screenshot-10.png

I’ve changed all groups to dba:

screenshot-12.png

It’ll show you a Summary before starting the installation. After hitting Install, go get yourself some coffee: this is going to take a while.

screenshot-13.png

After we get to 90% of the installation (linking stage) it might seem stuck, but it isn’t: let it run, and go get yourself more coffee.

screenshot-23.png

Once OUI is done with the linking, it will ask you to run two scripts as root:

screenshot-24.png

Here’s the output on my setup:

root@hardy:~# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete
root@hardy:~# /u01/app/oracle/product/11.1.0/db_1/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.1.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
root@hardy:~#

And… congratulations! You just finished installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)!

screenshot-26.png

However, we’re not completely done yet: a few actions need to be performed to make your life easier. First, we add these lines to /etc/profile:

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export PATH=$PATH:/u01/app/oracle/product/11.1.0/db_1/bin

Also, a startup script might be useful, right? Create a file called /etc/init.d/oracledb and put this into it:

#!/bin/bash
#
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
    echo "Oracle startup: cannot start"
    exit 1
fi

case "$1" in
    start)
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
        touch /var/lock/oracle
        echo "OK"
        ;;
    stop)
        # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
        rm -f /var/lock/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: `basename $0` start|stop|restart|reload"
        exit 1
esac

exit 0

After saving this file, make it executable:

root@hardy:~# chmod a+x /etc/init.d/oracledb

If you want this script to be run at every boot, execute this:

root@hardy:~# update-rc.d oracledb defaults 99
 Adding system startup for /etc/init.d/oracledb ...
   /etc/rc0.d/K99oracledb -> ../init.d/oracledb
   /etc/rc1.d/K99oracledb -> ../init.d/oracledb
   /etc/rc6.d/K99oracledb -> ../init.d/oracledb
   /etc/rc2.d/S99oracledb -> ../init.d/oracledb
   /etc/rc3.d/S99oracledb -> ../init.d/oracledb
   /etc/rc4.d/S99oracledb -> ../init.d/oracledb
   /etc/rc5.d/S99oracledb -> ../init.d/oracledb

Just remember: this script depends on the existence of a database on the machine, so don’t forget to run dbca as the oracle user, and configure it to start at boot time (edit /etc/oratab after creating the database, and set the last column to Y).

To make things easier, make your user part of the dba group. This way your user will be able to interact with the database server with the dba role. In the example below, user is the username:

root@hardy:~# usermod -G dba -a user

When creating a database with dbca, don’t forget to do so as the oracle user (and to export the DISPLAY environment variable). After creation, you should test if you can connect to it:

oracle@hardy:~$ export ORACLE_SID=heron
oracle@hardy:~$ sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 5 02:39:27 2008

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

After you get this output, we can finally say: it’s complete! Of course, I invite you to share your thoughts and your experiences with this HOWTO.

Augusto Bott.

Related Posts

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Slashdot
  • Google
  • del.icio.us
  • Facebook
  • bodytext
  • Technorati
  • TwitThis
  • Reddit
  • Spurl
  • De.lirio.us
  • Furl
  • blogmarks
  • Ma.gnolia
  • E-mail this story to a friend!

87 Responses to “Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)”

  1. Rune Says:

    As of now, im still running Ubuntu 7.10 on both my laptop and desktop.
    Desktop runs Oracle 11g while the laptop runs Oracle XE 10.

    Anyway, I will upgrade to 8.04 on both computers in two weeks time, and seeing that you have made a tutorial for this installation as well really made my day!

    Thank you for all your time and effort in this matter, it really helps a lot of people! Will check back in two weeks regarding problems and solutions ;)

  2. Log Buffer #96: a Carnival of the Vanities for DBAs Says:

    […] Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron) […]

  3. Lucas Aruda Says:

    Thanks for the how-to.

    It works just fine under Ubuntu 8.04. Did a lot of search and found your guide to be the best for Ubuntu or Debian based.

  4. Stephen Leary Says:

    Many thanks,

    Worked like a dream, even in a virtual machine!

    Stephen

  5. Adrian Roman Says:

    When trying to install on Ubuntu 8.04 x86-64, I ran into this error:

    INFO: Linking external procedure agent (/u02/app/oracle/oracle/rdbms/lib/extproc32)

    INFO: rm -f /u02/app/oracle/oracle/rdbms/lib/extproc32

    INFO: gcc -m32 -o /u02/app/oracle/oracle/rdbms/lib/extproc32 -L/u02/app/oracle/oracle/rdbms/lib32/ -L/u02/app/oracle/oracle/lib32/ -L/u02/app/oracle/oracle/lib32/stubs/ /u02/app/oracle/oracle/rdbms/lib32/hormc.o /u02/app/oracle/oracle/rdbms/lib32/homts.o -lagtsh -lpthread -lclntsh `cat /u02/app/oracle/oracle/lib32/sysliblist` -Wl,-rpath,/u02/app/oracle/oracle/lib32 -lm `cat /u02/app/oracle/oracle/lib32/sysliblist` -ldl -lm -L/u02/app/oracle/oracle/lib32

    INFO: /
    INFO: usr
    INFO: /
    INFO: bin
    INFO: /
    INFO: ld
    INFO: :
    INFO:
    INFO: cannot
    INFO:
    INFO: find
    INFO:
    INFO: -
    INFO: lagtsh
    INFO:

    INFO: collect2:
    INFO: ld returned 1 exit status
    INFO:

    INFO: make[1]: Leaving directory `/u02/app/oracle/oracle/rdbms/lib’

    INFO: make[1]: *** [/u02/app/oracle/oracle/rdbms/lib/extproc32] Error 1
    make: *** [extproc32] Error 2

    INFO: End output from spawned process.
    INFO: ———————————-
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target ‘all_no_orcl’ of makefile ‘/u02/app/oracle/oracle/rdbms/lib/ins_rdbms.mk’. See ‘/u01/app/oracle/oraInventory/logs/installActions2008-05-13_08-32-12PM.log’ for details.
    Exception Severity: 1

    Any idea how to get over this?

    Thanks.

  6. Bott Says:

    @Adrian

    Unfortunately, no idea - haven’t tried to install Oracle 64-bit so far. However, if we do try to do it, we’ll post here the suggestions. Are you trying to install de 32-bit version on a 64-bit OS? If you’re doing a 64/64 install, I’d suggest you investigate if there are some 32-bit libraries available to install on your 64-bit system…

  7. Adrian Roman Says:

    I’m doing a 64/64 install. I was actually trying to install 10g 64bit on Ubuntu 64 Hardy, but that failed miserably so I gave 11g 64bit a shot.

    As it turns out, even though I do get that error, if I just hit continue the database will throw another error and then everything will install and work as expected, with the exception of the EM Console, which does not work at all.

    I installed all the 32bit libraries available in Synaptic, that I could figure were related to this error. I can list the packages I have installed in the system if there’s anybody interested.

  8. Tech Man Says:

    Installation how to for 8.04:
    http://technicianspot.blogspot.com/2008/05/installing-linux-ubuntu.html

  9. Laurent Says:

    Need help, please.
    Install “oracle Applications Release 12″ on Hardy Server amd64.
    All system prerequis are installed. The install command is “rapidwiz”.
    appmgr@ubu:~$ /d01/Stage12/startCD/Disk1/rapidwiz/rapidwiz

    ———- troubles below ———
    appmgr@ubu:~$ Locking assertion failure. Backtrace:
    #0 /usr/lib32/libxcb-xlib.so.0 [0xf73cd767]
    #1 /usr/lib32/libxcb-xlib.so.0(xcb_xlib_unlock+0×31) [0xf73cd8b1]
    #2 /usr/lib32/libX11.so.6(_XReply+0xfd) [0xcddf31bd]
    #3 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so [0xce162a76]
    #4 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so [0xce14880a]
    #5 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so [0xce148a51]
    #6 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0×24) [0xce148c5c]
    #7 [0xf2437fa8]
    #8 [0xf2431aeb]
    #9 [0xf2431aeb]
    #10 [0xf242f1b4]
    #11 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf765734c]
    #12 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf77f7c08]
    #13 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf765717f]
    #14 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so(JVM_DoPrivileged+0×2dd) [0xf76a636d]
    #15 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0×3d) [0xf73762cd]
    #16 [0xf2437838]
    #17 [0xf2431a14]
    #18 [0xf242f1b4]
    #19 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf765734c]
    Locking assertion failure. Backtrace:
    #0 /usr/lib32/libxcb-xlib.so.0 [0xf73cd767]
    #1 /usr/lib32/libxcb-xlib.so.0(xcb_xlib_lock+0×2e) [0xf73cd81e]
    #2 /usr/lib32/libX11.so.6 [0xcddf2518]
    #3 /usr/lib32/libX11.so.6(XGetVisualInfo+0×26) [0xcdde90a6]
    #4 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so [0xce1476df]
    #5 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so [0xce147970]
    #6 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so [0xce148b98]
    #7 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0×24) [0xce148c5c]
    #8 [0xf2437fa8]
    #9 [0xf2431aeb]
    #10 [0xf2431aeb]
    #11 [0xf242f1b4]
    #12 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf765734c]
    #13 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf77f7c08]
    #14 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so [0xf765717f]
    #15 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/server/libjvm.so(JVM_DoPrivileged+0×2dd) [0xf76a636d]
    #16 /d01/Stage12/startCD/Disk1/rapidwiz/jre/Linux_x64/1.5.0/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0×3d) [0xf73762cd]
    #17 [0xf2437838]
    #18 [0xf2431a14]
    #19 [0xf242f1b4]

    appmgr@ubu:~$ exit
    logout
    ————–
    The “Install Oracle Applications - Welcome” window is displayed but empty, then halt.

  10. mqatrawi Says:

    I need to install oracle client only to connect to an outside database using odbc. does the steps listed here work also for installing the client?

  11. badwanpk Says:

    Hello

    in step 9, i get the error Cannot Open Display, plz suggest something… i m going nuts
    tried xterm, xhost etc..

    regards

  12. Bott Says:

    @mqatrawi,

    I haven’t tried it myself, but to install only the client you could skip step eight (no need to modify those system defaults, once you’re not running the database, only the client). Also, you might want to consider using the Oracle Instant Client. It can be found here.

  13. Bott Says:

    @badwanpk,

    I’d suggest you double-check the IP addresses your currently using on your network, since the ones provided on this HOWTO are not ‘real’ IP addresses.

    Cheers!

  14. badwanpk Says:

    Hello

    All the other steps are ok, but wile configuring the database, after the 13 steps in Database Configuration Assistant, the CONFIRMATION window opens but is empty, it shows no options, tried many times but in vain, plz suggest something.

    regards

  15. Bott Says:

    @badwanpk,

    I’m sorry, but I don’t have any clues on what might be wrong on you particular case… I did ran into problems on the first attempt to install, so I’ve repeated this installation 4 more times to make sure all the steps are correct, leading to a successful installation. Perhaps you missed a few steps or made some sort of typo while entering the commands?

    Good luck!

  16. Paul Says:

    Hi Bott,
    I installed the DB fine, and run the last script ( update-rc.d oracledb defaults 99 ) fine…
    But after that i was trying to use DBCA command as oracle user and is not letting me create the DB. Also the terminal i have used to do the installation is having this :

    rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
    error: cannot open Packages index using db3 - No such file or directory (2)
    error: cannot open Packages database in /var/lib/rpm

    I dont know exactly if this is the reason for wich I can not create the DB

    thx a lot

    Paul

  17. Bott Says:

    @Paul,

    Hi there. Thanks for pointing that out. I’ve tried reinstalling after the latest kernel upgrades and unfortunately you’re right: dbca dies in the middle. I’ll do some investigation myself and post the solution here (if I find one, afterall we’re talking about an unsupported platform anyways…).

    In the meanwhile, has anyone around found a solution?
    If you did, please let us know.

    Cheers!

  18. buragas Says:

    I’m on the step nine when i try to
    su - oracle
    i recieved this error

    Your account has expired; please contact your system administrator
    su: User account has expired
    (Ignored)
    Cannot execute /binbash: No such file or directory

    regards

  19. Bott Says:

    @buragas,

    I’d say you’ve probably made a typo, since /binbash is not a valid binary on a standard Ubuntu setup. However, /bin/bash is a valid shell. Please double check the paths you’ve typed on steps 6 and 7 (line 14, to be exact). If you did made a typo on step 7, use usermod to change the default shell for the oracle user.

    Cheers!

  20. Wil Says:

    Dude, you rule - you just saved me hours of trudge. BTW, your instructions work pretty much word for word for 10g.

  21. Ray O'Donnell Says:

    I had the same problem as badpwank with a blank confirmation window. Turning off visual effects (System -> Preferences -> Appearance -> Visual Effects tab) resolved the problem.

  22. saleem Says:

    hello,

    this has been of great help. i was able to create the DB, and start it and connect it from the oracle user. But I was unable to connect from default user(zalym).I have added zalym into the dba group.

    When I try to connect thru SQLPlus, it comes back with this message
    “Connected to an idle instance.”

    after that any query i type, I get the following error.
    ERROR at line 1:
    ORA-01034: ORACLE not available

    I am able to do everything from the oracle user. Connect, run queries against it etc. Why does this happen?

    I am stuck with this. Please help.

  23. saleem Says:

    I think my issue is related to the listener. Firstly the listener was not starting because of some hard coding in the dbstart script.
    Refer - http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php

    I am still unable to get it up.

  24. saleem Says:

    I reinstalled, did everything word by word, and now it works. Thanks a lot mate.

  25. Bott Says:

    @saleem,

    Have you started sqlplus '/as sysdba' with your user?
    Have you set the ORACLE_SID environment variable before that?

    Cheers!

  26. saleem Says:

    yes, all ur instructions work. i hv to export the ORACLE_SID everytime I access thru sqlplus which is fine…

    thanks a bunch

  27. mokkai Says:

    i am newbie

    i followed all of instructions
    at finnally
    when i type
    —————————————————————-
    oracle@backup:~$ sqlplus

    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Jun 9 18:13:58 2008

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

    Enter user-name: oracle
    Enter password: ******
    ERROR:
    ORA-12162: TNS:net service name is incorrectly specified

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    oracle@backup:~$
    —————————————————————-
    i thing i have not created DataBases

    can any one help ms..

  28. Asparria Says:

    For those with this error:

    error at “invoking target ‘all_no_orcl ihsodbc’ of makefile
    …/oracle/rdbms/lib/ins_rdbms.mk”

    It can be fixed installing:

    sudo apt-get install libstdc++5

    The rest goes smooth.

    Thanks for the tutorial. Excellent!


    Oracle 10r2 on Ubuntu Hardy

  29. Asparria Says:

    BTW

    I’ve been using “ssh -X user@machine” to run the Oracle installer; however, it is necessary to install XORG first if you are in Ubuntu Server (that comes with no X):

    sudo apt-get install xorg

    And runs very good.

    Thanks again.

  30. Roger Says:

    If anyone is having DISPLAY problems when performing the install on a local machine, try setting the DISPLAY to :0.0 instead of :0.0 (e.g. $ export DISPLAY=:0.0). It fixed for me.

  31. Roger Says:

    That should have been “… try setting the DISPLAY to :0.0 instead of your.ip.is.here:0.0 …”

  32. Pooya Pourvaghar Says:

    Do you have any experience in installing Oracle Enterprise Manager Grid Control 10g on ubuntu 8.04 ? or any doc, website that could help?
    thanX in advance

  33. Alina Says:

    Hello! I still have problems with the DISPLAY thing. I’m trying to install Oracle on my host, so I set DISPLAY=127.0.0.1:0.0 Even with DISPLAY=localhost:0.0
    The result is the same:

    Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<

    Then I try to rn xterm:

    oracle@dremix:~/database$ xterm
    xterm Xt error: Can’t open display: 127.0.0.1:0.0

    I’m logged in with the oracle user.

    Do you have any idea of what is happening?
    Thank you!

  34. Girish Says:

    Followed the above mentioned steps on Virtual PC 2007 running on Vista. Installation went like a charm. I did have some trouble setting up the xterm as I was running from the local computer so this is what I did:

    1. As root $xhost +localhost
    2. Login as oracle $su - oracle
    3. $xhost and you should be able to see your localhost as one of the authorized clients

    Everything else should be fine.

  35. Pooya Pourvaghar Says:

    on step Nine , if you are installing on local machine you do not need to export DISPLAY but if you are installing on a remote machine try :
    ssh username@remote-ip-address -Y
    OR
    ssh username@remote-ip-address -X

    these commands let ssh forward X session from remote machine to local one,without need to set any DISPLAY variable, and you can see OUI screens.
    (export DISPLAY never worked for me in ubuntu!)

  36. Michael Says:

    As user ‘oracle’ I used ‘unzip’ for the .zip file, but the group is ‘oinstall’ instead of ‘dba’ for all of the files after unzipping. Is there something I did wrong? I am attempting to install on my laptop.

    I followed the procedures except for the IP address portions. I performed steps 1, 2, 6, 7, 8, and 9.

    Thanks for procedures and help.

    Mike

  37. Bott Says:

    @Alina,

    If you’re installing on the same box you have an X server, you have to export DISPLAY=:0.0 (no IP,no host, nothing).

    Cheers!

  38. Bott Says:

    @Michael,

    As long as the oracle user can read the files, you’ll be fine!

    Cheers!

  39. ivan Says:

    @Adrian
    I was trying also to install 10g2 x64 at Ubuntu 8 x64 and finished with linking problems and not starting dbca. Please, try following:

    1. apply steps from post of Rmantingh on
    http://ubuntuforums.org/archive/index.php/t-592064.html

    2. to solve problem with genclntsh: Failed to link libclntsh.so.10.1
    because of incompatible libgcc.a I had to install
    apt-get install gcc-multilib

    3. once libclntsh.so.10.1 for lib32 was built dcba started without errors starting with ” UnsatisfiedLinkError exception loading native library: njni10 ”

    ps: thanks to pythian for very helpful inst. procedure

  40. zm508_china Says:

    i use the dbca command at step 13,the terminal show:
    rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
    error: cannot open Packages index using db3 - No such file or directory (2)
    error: cannot open Packages database in /var/lib/rpm

    but i installed rpm packegages.
    how to do?
    thanks

  41. Jude Says:

    Hi guys,

    I followed the steps and everything worked fine. But when I got to the part where you type su - oracle and asks you for the password, I type in the password “oracle” and still it won’t let me in. In turn I can’t create the ‘inventory directory’ [/u01/app/oraInventory]. It pops up a message that I can’t create inventory because I don’t have write permission. Somebody have any idea?

  42. Jude Says:

    Hi guys,

    I got the oracle password part working, I just had to go to terminal - login as root - then use ’su - oracle’ but then the problem now is that I can’t run the installation wizard anymore.. I typed in ./runInstaller -ignoreSysPrereqs and it gives me an error of like x server, can’t display and other stuff.. Just to give you guys a heads up I did not do the xhost in step 3 and ssh user@ipaddress in step 4 because I am installing it on the same machine (soon to be oracle server). Anyone can help me out? I would really appreciate it.

  43. bug Says:

    xterm can’t open display - looks like a bug:
    just google “ubuntu xterm can’t open display”

  44. Leonardo Says:

    Hello.

    I’m getting DBCA hanging after I press “finish”, which I guess it’s the same problem of everyone here. Any news on that front? Will I have to install 7.10 to get this working??

    Best regards,
    Leonardo.

  45. Leonardo Says:

    Well, it never rendered. I installed everything again in 7.10 and got the same blank/gray screen. I pressed enter, and it continued. I guess the same happens in 8.04.1, but I’m not reinstalling everything to test it. So, you might just give it a try.

  46. Bott Says:

    @zm508_china,

    We don’t use any RPM packages on this howto. Also, Ubuntu doesn’t have an index of all installed RPM packages on the machine - that message is supposed to be expected, but safely ignored.

    Cheers!

  47. Bott Says:

    @Jude,

    sudo is a command to execute something as another user. When you execute sudo su - as your user, sudo is expecting your password, not the password from the ‘target’ (in this case, root.

  48. Bott Says:

    @bug,

    If you’re using a Ubuntu machine and want to use the X server on it, you need to go to menu System, Administration, Login Window. When the Login Preferences Window opens, uncheck “Deny TCP connections to the Xserver” and restart your X server (usually, a logout/login pair works just fine).

    Cheers!

  49. Bart Kummel Says:

    @Leonardo
    I Had exactly the same problem: after pressing “Finish” in DBCA, I got stuck with an empty window, with no text and no buttons on it. It turns out this has to do something with the “Visual Effects” of the Ubuntu desktop. If you turn those off, you get the same window WITH the contents. See http://forums.oracle.com/forums/thread.jspa?messageID=2491552 for an explanation

  50. Bart Kummel Says:

    @all people having DISPLAY problems
    Here’s a forum posting that helped me out, it may be helpful to you as well: http://ubuntuforums.org/showpost.php?p=2457415&postcount=7

  51. Felix Says:

    Thanks a lot for your instructions!

    After having experienced some problems with Oracle 10g on Dapper Drake before, tonight I tried to install 11g (I downloaded linux.x64_11gR1_database.zip) on a Hardy Heron Desktop installation (64-bit).

    Following each Step thoroughly, there were only the warnings you mentioned during the checks of the installer, and two error messages during the linking stage (at 88% to 90% of the whole process). By ignoring these (press “Continue”), the installation completed successfully.

    Cheers,
    Felix

  52. Jude Says:

    Hi guys,

    I followed every single step in this tutorial but when I get to step 9, the tutorial shows this:

    drwxr-xr-x 6 oracle dba 4096 2007-09-18 18:50 database
    oracle@hardy:~$ cd database
    oracle@hardy:~/database$ ls -l
    total 28
    drwxr-xr-x 11 oracle dba 4096 2007-08-06 16:02 doc
    drwxr-xr-x 5 oracle dba 4096 2007-08-03 13:28 install
    drwxr-xr-x 2 oracle dba 4096 2007-09-18 18:52 response
    -rwxr-xr-x 1 oracle dba 2911 2007-08-03 13:28 runInstaller
    drwxr-xr-x 14 oracle dba 4096 2007-08-03 13:27 stage
    -rw-r–r– 1 oracle dba 4835 2007-08-06 18:19 welcome.html
    oracle@hardy:~/database$ ./runInstaller -ignoreSysPrereqs

    But mine shows the root root instead of oracle dba:

    drwxr-xr-x 6 root root 4096 2007-09-18 18:50 database
    oracle@hardy:~$ cd database
    oracle@hardy:~/database$ ls -l
    total 28
    drwxr-xr-x 11 root root 4096 2007-08-06 16:02 doc
    drwxr-xr-x 5 root root 4096 2007-08-03 13:28 install
    drwxr-xr-x 2 root root 4096 2007-09-18 18:52 response
    -rwxr-xr-x 1 root root 2911 2007-08-03 13:28 runInstaller
    drwxr-xr-x 14 root root 4096 2007-08-03 13:27 stage
    -rw-r–r– 1 root root 4835 2007-08-06 18:19 welcome.html
    oracle@hardy:~/database$ ./runInstaller -ignoreSysPrereqs

    And in turn, I can’t install oracle. Also, I get this error:

    Starting Oracle Universal Installer…

    Checking Temp space: must be greater than 80 MB. Actual 28599 MB Passed

    Checking swap space: must be greater than 150 MB. Actual 1466 MB Passed

    Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<>> Ignoring required pre-requisite failures. Continuing…

    After the above error I get:

    Can’t connect to X11 window server using ‘192.168.43.129:0.0′ as the value of the DISPLAY variable.

    Please help me out, I’ve been trying to solve this problem for weeks now. But I’m just not finding the solution. I am a newbie at ubuntu (LINUX) but I’ve learned quite a lot in the past few weeks of trying to solve this.

  53. Russell Says:

    @Jude
    It looks like you didn’t get line 18 from step 7:

    17 root@hardy:~# mkdir /home/oracle
    18 root@hardy:~# chown -R oracle:dba /home/oracle

    You need to CHange OWNership of the directory. Try this, it might take care of your other problems.

  54. gmora Says:

    Thanks Pythian, installation went fine. I created the database using dbca (it took forever but it did finish).

    My major issue was not being able to access it from another machine, but I finally found the problem;

    listener.ora was missing the SID_LIST_LISTENER section!

    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.124.105)(PORT = 1521))
        )
      )
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
          (SID_NAME = heron)
        )
      )
    

    Thank you for such a nice tutorial.

  55. Bob Says:

    I’m installing Oracle 11g on my local machine following the instructions above, I got the following errors after runInstaller.Then I have to run xhost + under my original login, and export DISPLAY=:0 under Oracle login, then OUI started runing.

    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-07-30_09-00-38PM. Please wait …
    DISPLAY not set. Please set the DISPLAY and try again.
    Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
    - For csh: % setenv DISPLAY 192.168.1.128:0.0
    - For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
    Use the following command to see what shell is being used:
    echo $SHELL
    Use the following command to view the current DISPLAY environment variable setting:
    echo $DISPLAY
    - Make sure that client users are authorized to connect to the X Server.
    To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
    % xhost +
    To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as ‘xclock’:
    %
    If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
    Typical path for xclock: /usr/X11R6/bin/xclock

  56. Helen Says:

    This is a nice detailed tutorial. I am new to Ubuntu and Linux. Ubuntu came installed on my laptop.

    I would like to install 11g. I have questions on some of the steps.

    For Step 2:
    How do I go about verifying the hashes of the downloaded image?

    I was going to download the following 11g install file:
    Oracle Database 11g Release 1 (11.1.0.6.0) for Linux x86
    linux_x86_11gR1_database.zip (1,844,572,234 bytes) (cksum - 302838609).

    Is this the correct one?

    For Step 3:
    In Windows, to check the IP address I typed ipconfig.
    In Ubuntu, how do I check my IP address?
    In this step you also reference the host as “note”. Where do I find the host name for my machine?

    For Step 4:
    I’m confused as to how the connection is being made to “hardy”. I see the first set of commands which I believe is my username and password. Then, all of a sudden I see commands that are connected to “hardy”.
    Where are the commands for the actual connection to be made?

  57. Augusto Bott Says:

    @Helen,

    On your Ubuntu box you can use md5sum filename and cksum filename on step 2. On any Linux box, you find out how your network interfaces are set up by running ifconfig (step 3). The command for the “actual connection” to be made is actually the first line: ssh user@192.168.x.y, where 192.168.x.y is the IP address of your Ubuntu box. I guess you’re trying to install Oracle on your own notebook, right? Just skip the ssh part of this tutorial (but keep the export DISPLAY and other IP-related stuff).

    Cheers!

  58. Augusto Bott Says:

    @Bob,

    Please double-check your command-line for typos:
    bott@mybox:~$ echo $DISPLAY
    :0.0
    bott@mybox:~$

    Cheers!

  59. Helen Says:

    Thank you for the reply.

    For step 2; all I have to do is go to a terminal window - type md5sum <the name of the file I’m downloading from Oracle). Am I correct?

    I am installing Oracle 11g on my laptop. Which steps should I be doing to get Oracle installed? You mentioned to skip the ssh part. I guess I skip step 4 and step 5.

  60. Jude Says:

    I have the same problem as Bob, I did the echo $DISPLAY and it displays :0.0, also I tried using my IP address ‘DISPLAY=192.168.43.129:0.0; export DISPLAY’ and it displays ‘192.168.43.129:0.0′ when I type echo $DISPLAY but I still get the same error as he has. Also, when I’m logged in as another and run the Installer it works fine it shows the installer dialog and everything but then the user is not oracle so I could not do anything to the database. Any ideas out there?

  61. Jude Says:

    Also, when I run the Installer I get the ff error:

    Checking Temp space: must be greater than 80 MB. Actual 28724 MB Passed

    Checking swap space: must be greater than 150 MB. Actual 1466 MB Passed

    Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for diplay colors using command /usr/bin/xdpy info. Check if the DIPSLAY variable is set. Failed<<<<

    When I use a different account the third check Passes but then when I’m logged in as Oracle it Fails.

  62. saleem Says:

    @Bob,

    The xhost + helped a lot. Thanks mate.

  63. Ruben Says:

    instructions worked fine..however, after reboot I’m unable to connect. Any ideas why

  64. Augusto Bott Says:

    @Helen,

    What I meant exactly is: you can skip the SSH part. Do not skip steps 4 or 5, otherwise your setup will most likely fail. Regarding md5sum and cksum, I’d suggest reading the man page for those commands.

    Cheers!

  65. Augusto Bott Says:

    @Jude,

    Are you sure you’re using bash and not dash(step 6)?

    Cheers!

  66. Augusto Bott Says:

    @Ruben,

    Did the database started on boot? Try logging in as the oracle user, then running SQLplus as SYSDBA and typing startup.

    Cheers!

  67. Edgar Says:

    On step nine

    I used this to set up the display

    $ DISPLAY=:0.0 ; export DISPLAY

  68. Helen Says:

    I finally found a block of time where I can attempt this 11g install. In following your instructions, I have a few questions.

    I downloaded the 11g zip file and unzip it into a directory on my machine. Your instructions don’t mention unzipping. I am guessing that is what I should do.

    1.) I checked for my IP address and received the following: 192.168.1.103. Would this be valid? When I ran ifconfig; I had quite a few. So, I was trying to grab the address which appears similar to your instructions above.

    2.)In Step 3: you start off with bott@note and then you are at user@note. How do you get from bott to user? I know that bott is replaced with my username. I’m running an X terminal on the same PC so I don’t think I need to do the xhost piece.

    3.)In Step 4: when I type ssh @; the ssh is not recognized. How do I deal with this? When I get ssh to run; I believe the password I enter is my password not for “user”?

    4.)Also, in Step 4: once the connection is made after entering the password; I’m supposed to see user@hardy prompt. At this prompt, I type sudo su - and then get prompted for a password. What is the password for pythian:?

    5.)Still in Step 4: once I enter the password for pythian; the next prompt I see is root@hardy. How am I getting from “user@hardy” to “root@hardy”?

    Can you clear things up for me?

  69. Helen Bradshaw Says:

    I downloaded the 11g zip file and it downloaded onto my Desktop. I completed step 7 and created the /home/oracle directory.

    When I try to unzip the file into /home/oracle, I receive an error message. The details for the error message state that I do not have permission to this directory.

    I logged out and tried to login as the oracle user. When I enter the password; I get a message stating that the username and password are incorrect.

    I went to my terminal window and type ls to see my directories. The home/oracle does not appear.

    When I open File Manager in my GUI, the /home/oracle directory appears in my File System area. The zip file is in the Desktop area.

    At this point, I’m not sure:
    a.) why my username, oracle, and the password won’t work (they are both the same)
    b.) how I can unzip my file into the /home/oracle directory
    c.) how I can find my /home/oracle directory in the terminal window

    Thanks for the help.

  70. Jude Says:

    How do I verify that I’m using bash and NOT dash. But I know I did every step in step 6 and had EXACTLY the same output.

    Also, I was wondering in Step 7:
    I had typed line 14 and line 23 as one long line of code. I’m not sure if that is right.

    Line 14:
    useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle

    and

    Line 23:
    for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done

    Any Ubuntu Guru’s out there that can help me out. It’s been weeks that I’ve tried to install Oracle 11g. Should I just start fresh from downloading to installation again?

  71. Augusto Bott Says:

    @Helen,

    Regarding your latest questions:
    a) trying to log in as the oracle user will fail as we locked the account with passwd -l oracle. You should login as your user and then run sudo su - to become root, then su - oracle to become the oracle user (they you’ll have permission to write files on foldes belonging to that user.
    b) you can unzip a file by installing the unzip package (use apt-get install unzip). Then, use unzip filename.zip.
    c) if you’re logged in as the oracle user, typing cd will change your current directory to /home/oracle(or whatever you set as the oracle user home directory).

    Cheers!

  72. Augusto Bott Says:

    @Jude

    To verify if you’re usig bash or dash, you should check the ouput of ls -l /bin/sh. I didn’t execute myself your useradd/usermod transformation, but I believe the syntax is correct. Line 23 seems OK as well.

    Cheers!

  73. Long Nguyen Says:

    !!!!!!!!! THANK YOU !!!!
    I spent countless hours trying to install oracle10g / 11g on my Ubuntu desktop and I found your howto.
    Thank you so very much, i am ready to learn linux and oracle.
    If i every get my oracle dream job, I definitely have to mention to my employer that your howto is how I got started.
    Thanks again.

  74. Jude Says:

    when I type ls-l /bin/sh i get the output:

    lrwxrwxrwx 1 root root 4 2008-07-25 09:58 /bin/sh -> bash

    is that right?

    i’m losing hope here.. :(

    I might end up dropping ubuntu.

  75. Dominic Says:

    Hi Augusto,
    Thanks for your tutorial. I am installing the oracle 11g on Ubuntu 8.04. server which is on my Toshiba laptop. Am new to both oracle and Ubuntu. My problem is when the OUI gets to finish the terminal i used to do the installation locks on:

    rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
    error: cannot open Packages index using db3 - No such file or directory (2)
    error: cannot open Packages database in /var/lib/rpm

    After I rebooted my laptop i dont get Oracle among my main ubuntu menu.
    Can you please help me resovle it
    thx a lot
    Dominic

  76. Augusto Bott Says:

    @Jude,

    Yes, that’s the expected output: sh being a symlink to bash. I can only suggest that you retrace your steps closely. After all, ‘The devil is in the details’ is what the the popular proverb says…

    Cheers!

  77. Augusto Bott Says:

    @Dominic,

    Unfortunately, this howto doesn’t provide any means of having the Oracle software on the Ubuntu menu. I do suggest that you take a look at tools like TORA and SQL Developer.

    Cheers!

  78. chandu Says:

    Hi Bott,
    I installed the DB fine, and run the last script ( update-rc.d oracledb defaults 99 ) fine?
    But after that i was trying to use DBCA command as oracle user and is not letting me create the DB. Also the terminal i have used to do the installation is having this :

    rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
    error: cannot open Packages index using db3 - No such file or directory (2)
    error: cannot open Packages database in /var/lib/rpm

    I dont know exactly if this is the reason for wich I can not create the DB

    thx a lot

    CHANDU

  79. Dominic Says:

    Hi Augusto,
    Thanks for answering my question. I also have the same issues just as Chandu does.I installed the Oracle 11g fine, and run the last script ( update-rc.d oracledb defaults 99 )
    But the terminal i have used to do the installation is having this :

    rpm: To install rpm packages on Debian systems, use alien. See README.Debian.
    error: cannot open Packages index using db3 - No such file or directory (2)
    error: cannot open Packages database in /var/lib/rpm

    after which the terminal locks. This then those not make it possible for me to creat the DB using DBCA command.
    Can you help please.
    Thx a Lot
    Dominic

  80. Helen Says:

    Hi Augusto,

    Thank you for the info about logging as oracle. I will give it a try.

    I’m having another issue with Ubuntu. I’m not sure if you would be able to help me out.

    For some reason, I am unable to connect to the internet with my wireless card. Any thoughts as to how I can go about troubleshooting this?

    Thanks.

  81. Dominic Says:

    I have uninstalled Oracle 11g and installed oracle 1og. I went through that STEP by STEP and did not encounter any issues. I have been able to create the DB as well. Thanks
    Dominic

  82. Andrew Says:

    Excellent HOWTO.

    For those running into

    error: cannot open Packages database in /var/lib/rpm

    You might want to try (as root):

    # mkdir /var/lib/rpm
    # rpm –rebuilddb

  83. Echoes Says:

    I am still getting the DISPLAY issue. I did set the DIPSPLAY=:0.0 as i am installing on my own machine but still didn’t work. I even tried with my IP address but it still gives me error. xclock works if i sign in as another but when i use oracle user the display does not seem to work. Anyone, Please help me with this.

    I am installing oracle10gR2 on UBUNTU 8.04

    Here the error that i get-

    ~/database$ ./runInstaller -ignoreSysPrereqs
    Starting Oracle Universal Installer…

    Checking installer requirements…

    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
    Failed <<<>> Ignoring required pre-requisite failures. Continuing…

    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2008-09-03_09-27-32PM. Please wait …oracle@echoes:~/database$ Oracle Universal Installer, Version 10.2.0.1.0 Production
    Copyright (C) 1999, 2005, Oracle. All rights reserved.

    Can’t connect to X11 window server using ‘:O’ as the value of the DISPLAY variable.
    :O
    :O
    OUI-10025:Unable to start an interactive install session because of the following error:Can’t connect to X11 window server using ‘:O’ as the value of the DISPLAY variable. The DISPLAY environment variable should be set to :, where the is usually ‘0.0′.
    OUI-10026:Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
    - For csh: % setenv DISPLAY 192.168.1.128:0.0
    - For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
    Use the following command to see what shell is being used:
    echo $SHELL
    Use the following command to view the current DISPLAY environment variable setting:
    echo $DISPLAY
    - Make sure that client users are authorized to connect to the X Server.
    OUI-10027:To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
    % xhost +
    To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as ‘xclock’:
    %
    If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
    Typical path for ‘xclock’: ‘/usr/X11R6/bin/xclock’

  84. Leslie Says:

    I appreciate the time and effort that you put into this tutorial. I do have one suggestion. Could you detail the Database creation and what each feature should be enabled? Also during the Database creation, received error message that Enterprise Manager cant be installed due to ports not being available. Is this a problem that you have seen before or know of a solution? I am not at my computer at the moment and dont have the exact error message at hand.

  85. ChristopheF Says:

    Hi,

    If you get the error “Can’t connect to X11 window server” it is probably (correct me if I’m wrong) because you are trying to install the server on the same machine as you are trying to run the installer/get the 11g X installer. In his excellent howto, I suppose that Augusto uses 2 machines, both configured with Ubuntu 8.0.4: one as server and the other one as the client from which he is installing 11g
    In our case we are doing all from the same machine. Instead of performing step nine, we simply rebooted the machine and logged on as the user “oracle” in de gdm interface. Open a terminal window, navigate to the “database” directory and run the “./runInstaller -ignoreSysPrereqs” command.
    Hope this helps.

    C.

  86. B nair Says:

    hi,

    tutorial is excellent. I was trying to install in my pc running in ubuntu. (32 bit)
    But I’m struck coz after I executed step 8, and reboooooted, I’m no more able to login as anyuser (root, oracle)via terminal ctrt-alt-Fn. however, I’m able to logon via xserver terminal.
    I believe this is since the kernel has been upgraded with step 5.

    anyone got suggestions. It’s definetly a silly mistake as xserver-terminal logon works but the other doesn’t..

  87. TekDragon Says:

    Echoes you need to add the following file:

    cat > /etc/redhat-release << EOF
    Red Hat Enterprise Linux AS release 3 (Taroon)
    EOF

    That should fix your problem.

    As for mine, I can’t get X11 to work properly. I’ve tried to set the display but that doesn’t work. Is there anything else I should try?

    Thanks.

Leave a Reply

Filling out the following captcha not only allows us to cut down on automated blogspam but also helps digitize books. Please feel free to send comments on this approach directly to Paul at vallee@pythian.com.

NOTE: After submitting your comment, verify that it is added to the blog. New comments will be marked as "waiting for moderation" (we only moderate for spam). If the level of spam is as low as we hope, we will bypass this step.