Installing Oracle 11gR1 on Ubuntu 9.04 Jaunty Jackalope

Posted in: Technical Track

Welcome, readers! It’s time for another update to our series of posts on installing Oracle on Ubuntu Linux. In this edition, we’ll be installing Oracle 11g R1 on Ubuntu 9.04, both 32-bit.

This time, I’ve used VirtualBox to run a virtual machine (VM) to perform our work. (Virtualization has a number of advantages; in this case, I made several trial installs, trying different combinations and configurations. Having a pristine, basic set-up accelerated the whole process, since I didn’t had to reinstall from scratch on every new attempt.)

You might want to review the previous editions of this series, as there are technical references on this text fully detailed on previous posts. See these HOWTOs for Ubuntu:

Since we’re installing on a VM, we’ll be using Ubuntu 9.04 32-bit Server edition, , so let’s download it and check the MD5sum:

[email protected]:/media/trezentos/downloads$ md5sum ubuntu-9.04-server-i386.iso
20480057590ff8b80ad9094f40698030  ubuntu-9.04-server-i386.iso
user[email protected]:/media/trezentos/downloads$

Download Oracle Database 11g Release 1 (11.1.0.6.0), and verify the provided cksum:

[email protected]:/media/trezentos/downloads$ cksum linux_11gR1_database_1013.zip 
1044354138 1844527800 linux_11gR1_database_1013.zip
[email protected]:/media/trezentos/downloads$

Also, do not unzip this file on a Windows system or on a network share—unpack it on the target box or another Linux box, as there might issues with permissions on the filesystem (mostly related to the execution bit, relevant only on *NIX systems). After installing Ubuntu 9.04 Jaunty Jackalope from scratch, let’s update our software sources:

[email protected]:~$ sudo su -
[sudo] password for user: 
[email protected]:~# apt-get update
Hit https://us.archive.ubuntu.com jaunty Release.gpg
Ign https://us.archive.ubuntu.com jaunty/main Translation-en_US
Hit https://security.ubuntu.com jaunty-security Release.gpg
Ign https://security.ubuntu.com jaunty-security/main Translation-en_US
Ign https://security.ubuntu.com jaunty-security/restricted Translation-en_US
(...)
Hit https://us.archive.ubuntu.com jaunty-updates/universe Sources
Hit https://us.archive.ubuntu.com jaunty-updates/multiverse Packages
Hit https://us.archive.ubuntu.com jaunty-updates/multiverse Sources
Reading package lists... Done
[email protected]:~#

Then, upgrade everything:

[email protected]:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  acpid consolekit libck-connector0 libmpfr1ldbl libpam-ck-connector
  libvolume-id1 ntpdate screen-profiles ubuntu-serverguide udev
  update-manager-core
11 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1565kB of archives.
After this operation, 24.6kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 https://us.archive.ubuntu.com jaunty-updates/main ubuntu-serverguide 9.04.10 [284kB]
Get:2 https://us.archive.ubuntu.com jaunty-updates/main libvolume-id1 141-1.1 [102kB]
(...)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.28-11-generic
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
[email protected]:~#

It might be not necessary, but I do suggest you reboot now so that we’re on the same page. After logging in again, let’s install a few packages:

[email protected]:~$ sudo apt-get install unzip build-essential x11-utils \
> rpm ksh lsb-rpm libaio1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils defoma dpkg-dev fontconfig-config g++ g++-4.3 gcc gcc-4.3
  libbeecrypt6 libc6-dev libdrm2 libfontconfig1 libfontenc1 libfreetype6
  libgl1-mesa-glx libgomp1 libice6 libneon27 librpm4.4 libsm6
  libstdc++6-4.3-dev libxaw7 libxdamage1 libxfixes3 libxft2 libxi6
  libxinerama1 libxmu6 libxpm4 libxrender1 libxt6 libxtst6 libxv1 libxxf86dga1
  libxxf86vm1 linux-libc-dev make ttf-dejavu ttf-dejavu-core ttf-dejavu-extra
Suggested packages:
  binutils-doc defoma-doc psfontmgr x-ttcidfont-conf dfontmgr libft-perl
  debian-keyring g++-multilib g++-4.3-multilib gcc-4.3-doc libstdc++6-4.3-dbg
  gcc-multilib manpages-dev autoconf automake1.9 libtool flex bison gdb
  gcc-doc gcc-4.3-multilib libmudflap0-4.3-dev gcc-4.3-locales libgcc1-dbg
  libgomp1-dbg libmudflap0-dbg glibc-doc libstdc++6-4.3-doc make-doc alien zip
  mesa-utils
The following NEW packages will be installed:
  binutils build-essential defoma dpkg-dev fontconfig-config g++ g++-4.3 gcc
  gcc-4.3 ksh libaio1 libbeecrypt6 libc6-dev libdrm2 libfontconfig1
  libfontenc1 libfreetype6 libgl1-mesa-glx libgomp1 libice6 libneon27
  librpm4.4 libsm6 libstdc++6-4.3-dev libxaw7 libxdamage1 libxfixes3 libxft2
  libxi6 libxinerama1 libxmu6 libxpm4 libxrender1 libxt6 libxtst6 libxv1
  libxxf86dga1 libxxf86vm1 linux-libc-dev lsb-rpm make rpm ttf-dejavu
  ttf-dejavu-core ttf-dejavu-extra unzip x11-utils
0 upgraded, 47 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.6MB of archives.
After this operation, 81.9MB of additional disk space will be used.
Do you want to continue [Y/n]? 
Get:1 https://us.archive.ubuntu.com jaunty/main libdrm2 2.4.5-0ubuntu4 [377kB]
Get:2 https://us.archive.ubuntu.com jaunty/main libxfixes3 1:4.0.3-2 [9634B]
(...)
Setting up g++ (4:4.3.3-1ubuntu1) ...

Setting up build-essential (11.4) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
[email protected]:~$

Time to do a few changes on the OS. Since the Oracle Universal Installer prefers bash, let’s get rid of dash :

[email protected]:~$ sudo su -
[email protected]:~# cd /bin
[email protected]:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2009-05-26 12:58 /bin/sh -> dash
[email protected]:/bin# ln -sf /bin/bash /bin/sh
[email protected]:/bin# ls -l /bin/sh
lrwxrwxrwx 1 root root 9 2009-05-26 13:27 /bin/sh -> /bin/bash
[email protected]:/bin#

Let’s add a user and a couple of groups, as well as do some adjustments on our Ubuntu system so that it has a more Red Hat-ish layout:

[email protected]:/bin# cd 
[email protected]:~# addgroup oinstall
Adding group `oinstall' (GID 1001) ...
Done.
[email protected]:~# addgroup dba
Adding group `dba' (GID 1002) ...
Done.
[email protected]:~# addgroup nobody
Adding group `nobody' (GID 1003) ...
Done.
[email protected]:~# usermod -g nobody nobody
[email protected]:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
[email protected]:~# mkdir /home/oracle
[email protected]:~# chown -R oracle:dba /home/oracle
[email protected]:~# ln -s /usr/bin/awk /bin/awk
[email protected]:~# ln -s /usr/bin/rpm /bin/rpm
[email protected]:~# ln -s /usr/bin/basename /bin/basename
[email protected]:~# mkdir /etc/rc.d
[email protected]:~# 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
[email protected]:~# mkdir -p /u01/app/oracle
[email protected]:~# chown -R oracle:dba /u01
[email protected]:~#

Let’s change some system-wide configuration files, starting with /etc/sysctl.conf:

[email protected]:~# cd /etc
[email protected]:/etc# cp sysctl.conf sysctl.conf.original
[email protected]:/etc#

Edit it, adding the following lines to the bottom of the file:

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 = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Now let’s modify /etc/security/limits.conf:

[email protected]:/etc# cd /etc/security/
[email protected]:/etc/security# cp limits.conf limits.conf.original
[email protected]:/etc/security# vi limits.conf
[email protected]:/etc/security#

Add the following lines to the bottom of the file:

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

There is no need to change /etc/pam.d/login as on the previous versions of this HOWTO. You should reload all those sysctl changes, log out and log in again (I’m hitting ^d instead of typing exit):

[email protected]:/etc/pam.d# sysctl -p
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 = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[email protected]:/etc/pam.d# logout
[email protected]:~$ logout
Connection to 192.168.254.118 closed.
[email protected]:~$

Time to unpack our ZIP file containing the database software on our target machine:

[email protected]:~$ unzip linux_11gR1_database_1013.zip 
Archive:  linux_11gR1_database_1013.zip
   creating: database/
   creating: database/doc/
   creating: database/doc/dcommon/
   creating: database/doc/dcommon/css/
  inflating: database/doc/dcommon/css/blafdoc.css  
  inflating: database/doc/dcommon/css/bp_layout.css  
(...)
  inflating: database/stage/properties/oracle.server_Custom.properties  
  inflating: database/stage/properties/oracle.server_PE.properties  
  inflating: database/welcome.html   
[email protected]:~$

And now it’s time to install Oracle:

[email protected]:~$ whoami
user
[email protected]:~$ sudo su -
[email protected]:~# su - oracle
[email protected]:~$ export DISPLAY=192.168.254.12:0.0
[email protected]:~$ cd /home/user/database
[email protected]:/home/user/database$ ./runInstaller -ignoreSysPrereqs
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 10236 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 729 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-05-04_01-51-00PM. Please wait [email protected]:/home/user/database$ Oracle Universal Installer, Version 11.1.0.6.0 Production
Copyright (C) 1999, 2007, Oracle. All rights reserved.
(...)

And this screen should appear for you:

jaunty_oui_00

It might spit some errors like this during the installation—just ignore these, as we’re not supposed to have a package DB anyway:

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

We leave it as it is:

jaunty_oui_01

And we’re going with a full-blown Enterprise Edition:

jaunty_oui_02

Now, here’s the part where we choose our ORACLE_HOME

jaunty_oui_03

It will check a few system requirements:

jaunty_oui_04

I just clicked on all the pending issues so that the status would read “User Verified”, then hit “Next”:

jaunty_oui_05

We’re not creating a database now:

jaunty_oui_06

And we set all groups to be dba:

jaunty_oui_07

It will show you a summary. This time, we’ll hit “Install”:

jaunty_oui_08

Go get yourself a good cup of tea, as it might take a while, but eventually you’ll be presented with a request to run two scripts as root.

jaunty_oui_12

For your reference, here’s a sample output from my box:

[email protected]:~# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory to 770.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete
[email protected]:~# /u01/app/oracle/product/11.1.0/jaunty11/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/jaunty11

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.
[email protected]:~#

After hitting OK, we have nothing else to do but to exit the installer.

jaunty_oui_13

And this concludes the database software installation.

Now, let’s create a listener so we can accept incoming TCP connections from other boxes. Notice that /u01/app/oracle/product/11.1.0/jaunty11 is our ORACLE_HOME. This tool might spit out some errors (see below):

[email protected]:/home/user/database$ export ORACLE_HOME=/u01/app/oracle/product/11.1.0/jaunty11
[email protected]:/home/user/database$ export PATH=$PATH:$ORACLE_HOME/bin
[email protected]:/home/user/database$ netca

Oracle Net Services Configuration:
Xlib:  extension "Generic Event Extension" missing on display "192.168.254.12:0.0".
Xlib:  extension "Generic Event Extension" missing on display "192.168.254.12:0.0".
Xlib:  extension "Generic Event Extension" missing on display "192.168.254.12:0.0".

The messages above are safely ignorable, but the first screen may take a couple of minutes to show up. We’re setting up a listener:

jaunty-netca_00

That’s right, we’re adding a listener, as we have none configured so far:

jaunty-netca_01

Choose a name for your listener (it’s okay to leave the default if you’re configuring only one listener):

jaunty-netca_02

And we want to be able to accept connections via TCP:

jaunty-netca_03

On the standard port:

jaunty-netca_04

And we’re good with one listener:

jaunty-netca_05

Now we want to get back to the starting screen:

jaunty-netca_06

To then quit (by hittting Finish):

jaunty-netca_07

You’ll notice on the terminal window you fired up netca that it started the listener we just created (but the system ins’t ready yet—keep reading!)

Configuring Listener:LISTENER
Listener configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/11.1.0/jaunty11/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Oracle Net Services configuration successful. The exit code is 0

Time to create our database with dbca. On the same session, we call dbca. Just as with netca, the first screen will take some time to show:

jaunty-dbca_01

A general purpose database fits our needs for now:

jaunty-dbca_03

We’re calling ours ORA11DEV:

jaunty-dbca_04

We’re not configuring Enterprise Manager this time:

jaunty-dbca_05

Set a password (or different passwords, if you prefer):

jaunty-dbca_06

We’re using a classic filesystem for this setup (no ASM or RAW devices:

jaunty-dbca_07

We’ll be using the suggested template:

jaunty-dbca_08

And we’re not configuring the Flash Recovery Area or Archiving on this setup:

jaunty-dbca_09

We don’t want the sample schemas nor to run any custom scripts:

jaunty-dbca_10

I’ve specified 250MB of RAM be used:

jaunty-dbca_11

And on low-memory machines, it might be a good idea to limit the maximum number of running processes to a lower value:

jaunty-dbca_12

I’ve gone with UTF . . .

jaunty-dbca_13

. . . and running the database in dedicated server mode:

jaunty-dbca_14

We’re going with the default security settings for Oracle 11g:

jaunty-dbca_15

You may want to enable automatic maintenance tasks (I haven’t):

jaunty-dbca_16

It will show you a preview of the what is about to be created:

jaunty-dbca_17

If you want, you might want to ask the database creation assistant to save the scripts to review later. At this point, we hit “Finish”:

jaunty-dbca_18

After asking for a final review . . .

jaunty-dbca_191

. . . your database will be created and started in a few moments:

jaunty-dbca_21

When you see this, you’re database has been created and is running (but we’re not done yet).

jaunty-dbca_22

Cool! So far, we have:

  • the Oracle 11gR1 database software installed
  • a listener configured and started
  • an empty Oracle 11g database configured and started

It’s time to make all work we did so far start on every boot of this box, automatically. Before proceeding, what we want is to make sure everything works (you will notice I’m not using “exit” to exit SQLPLUS, but rather control+d):

[email protected]:~$ export ORACLE_SID=ORA11DEV
[email protected]:~$ . oraenv
ORACLE_SID = [ORA11DEV] ? 
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/jaunty11 is /u01/app/oracle
[email protected]:~$ sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 4 19:17:46 2009

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> SELECT INSTANCE_NAME, VERSION, STATUS FROM V$INSTANCE;

INSTANCE_NAME	 VERSION	   STATUS
---------------- ----------------- ------------
ORA11DEV	 11.1.0.6.0	   OPEN

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area  196681728 bytes
Fixed Size		    1298836 bytes
Variable Size		  130027116 bytes
Database Buffers	   62914560 bytes
Redo Buffers		    2441216 bytes
SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[email protected]:~$

Next, we make it start on boot by editing /etc/oratab:

[email protected]:~# cat /etc/oratab | tail -1
ORA11DEV:/u01/app/oracle/product/11.1.0/jaunty11:N
[email protected]:~#

See that N on the line starting with ORA11DEV? Change it to Y — that will make it start on boot with the script we’re about to deploy.

Create a file called /etc/init.d/oracledb (as root). Inside, put this:

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

# these are the paths for our base installation
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/jaunty11
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

Do not forget to make it executable:

[email protected]:~# chmod a+x /etc/init.d/oracledb
[email protected]:~#

That script will take care of startup for us, as soon as you run update-rc.d:

[email protected]:~# update-rc.d oracledb defaults
update-rc.d: warning: /etc/init.d/oracledb missing LSB information
update-rc.d: see https://wiki.debian.org/LSBInitScripts
 Adding system startup for /etc/init.d/oracledb ...
   /etc/rc0.d/K20oracledb -> ../init.d/oracledb
   /etc/rc1.d/K20oracledb -> ../init.d/oracledb
   /etc/rc6.d/K20oracledb -> ../init.d/oracledb
   /etc/rc2.d/S20oracledb -> ../init.d/oracledb
   /etc/rc3.d/S20oracledb -> ../init.d/oracledb
   /etc/rc4.d/S20oracledb -> ../init.d/oracledb
   /etc/rc5.d/S20oracledb -> ../init.d/oracledb
[email protected]:~#

Also, you might want to add yourself to the dba group and change ownership of the inventory (we chose group oinstall above, remember?):

[email protected]:~# usermod -G dba -a user
[email protected]:~# chgrp -R dba /u01/app/oracle/product/11.1.0/jaunty11/inventory
[email protected]:~#

There’s one last thing to do—reboot and make sure everything starts at boot time. So, on your next boot, you should try:

[email protected]:~$ export ORACLE_SID=ORA11DEV
[email protected]:~$ . oraenv
ORACLE_SID = [ORA11DEV] ? 
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/jaunty11 is /u01/app/oracle
[email protected]:~$ sqlplus '/as sysdba'

SQL*Plus: Release 11.1.0.6.0 - Production on Thu May 28 17:12:13 2009

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> SELECT INSTANCE_NAME, VERSION, STATUS FROM V$INSTANCE;

INSTANCE_NAME	 VERSION	   STATUS
---------------- ----------------- ------------
ORA11DEV	 11.1.0.6.0	   OPEN

SQL>

And we’re done.
Cheers!

email

Author

Want to talk with an expert? Schedule a call with our team to get the conversation started.

64 Comments. Leave new

Instalando Oracle 11gR1 no Ubuntu 9.04 » rstoever.com
June 25, 2009 11:21 pm

[…] ver na integra esta instalação entre no link abaixo: Link Tags: 11.1.0.6.0, 32bit, 9.04, instalação, install, installing, Oracle, Oracle 11g R1, […]

Reply

Presumably this will work fine if you run Ubuntu Server, and ssh with X11 forwarding from a non-headless server to run the Oracle Install GUI.. yeah?

Reply

I successfully installed Oracle 11gR1 on Ubuntu 9.04 Server.
Then I installed patch 11.1.0.7 to Oracle – no problems.
But after installation this patch I can’t create any database.
There were errors:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-01034: ORACLE not available

Reply
Iqbal Hossain
July 5, 2009 11:39 pm

for startup service.

[email protected]:~$ update-rc.d oracledb defaults 99

Reply

I am trying this on my laptop that has GNOME desktop. I am just not able to set the DISPLAY value. I can run xclock if logged in as root, but not as oracle. I tried all of the following:
1. export DISPLAY=:0.0
2. export DISPLAY=127.0.0.1:0.0
3. export DISPLAY=:0.0
where = value of “inet addr” for eth0 when the /sbin/ifconfig command is run (I have wired Ethernet connection)
4. export DISPLAY=:0.0
where = value returned by the following command –
wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//’

Unfortunately *nothing* works. All my prior steps were successful, but I am stuck in just this last step.

Any ideas please ?

isotope

Reply

Sorry, options 3 and 4 are: “export DISPLAY=IP:0.0, where IP = value …”
I sandwiched the text “ip” between “less than” and “greater than” characters, which makes the entire word disappear due to this forum’s software.

Reply

Ok, I was able to solve the display problem as follows:

1. Install “sux” package on Ubuntu.
2. Log in as the user, and then issue: “sux – oracle” to log in as oracle.
3. Run “export DISPLAY=:0.0” as oracle.

And after that, “netca” and “dbca” work fine.

isotope

Reply

But now I face yet another problem. I don’t see anything in the “Confirmation” page. After I fill in all the details and click “Finish” in dbca, I see a gray box with the title “Confirmation” and nothing in it. So, I can’t see or click “OK” button and hence can’t create a database ! Oh well.

Any ideas ?

isotope

Reply

I installed Oracle 11gR1 on Ubuntu 9.04 desktop.
When I run dbca and the database is being created i got the next error:

ORA-01092: ORACLE instance terminated. Disconnection forced

Reply
Augusto Bott
July 13, 2009 9:52 am

@Ben,

This howto should work just fine if the target machine is a VM or a separate server (it was built that way in purpose).

Cheers!

Reply
Augusto Bott
July 13, 2009 9:52 am

@Eduard,

Let me suggest to double-check if libaio was installed in the first place.

Cheers!

Reply
Augusto Bott
July 13, 2009 9:53 am

@Iqbal Hossain,

Thanks for the hint! I’ve ommitted the number “99” as I haven’t encountered any problems with the suggested startup order in my experiences so far.

Cheers!

Reply
Augusto Bott
July 13, 2009 9:54 am

@isotope,

Can you please double-check if your X server is accepting connections? On Ubuntu, you can check this out on menu System -> Administration -> Login Window -> Security -> Deny TCP connections to the Xserver (default: enabled). sux is also a good and valid attempt. On the last issue, I’d suggeset you to double-check if you’ve installed all libs required (see the top of this howto).

Cheers!

Reply
Augusto Bott
July 13, 2009 9:54 am

@Israel,

Please double-check if libaio1 is installed (this is a commong thing to forget).

Cheers!

Reply

Hi Augusto

I installed libaio1. I can create a database using dbca. Thanks. But …

I do the next:

[email protected]:~$ export ORACLE_SID=ORA11DEV
[email protected]:~$ . oraenv
ORACLE_SID = [ORA11DEV] ?
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.1.0/db_1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

When I try:

SQL> SELECT INSTANCE_NAME, VERSION, STATUS FROM V$INSTANCE;

I got:

ERROR at line 1:
ORA-01034: ORACLE not available

Reply
Augusto Bott
July 15, 2009 3:03 pm

@Israel,

Is the database started, mounted and open? :-)
Hint: type ‘startup;’ on the sqlplus prompt before running that SELECT INSTANCE_NAME(…) statement.

Cheers!

Reply

@Augusto,

I executed startup on the sqlplus prompt. Now all works fine.

Thanks to you and all comunity.

Reply
Jan Bekaert
July 16, 2009 7:59 am

Everything went fine until “[email protected]: . oraenv”
It just results in “bash: oraenv: No such file or directory”.
Any idea why?

Reply
Augusto Bott
July 16, 2009 10:35 am

@Jan Bekaert

Have you executed the scripts /u01/app/oraInventory/orainstRoot.sh and /u01/app/oracle/product/11.1.0/jaunty11/root.sh as root during the installation, when requested by the Oracle Universal Installer?

Cheers!

Reply
David Appeltans
July 27, 2009 6:56 pm

For the issue with the environment variable $DISPLAY, I solved it in the following way:
1. login as your normal user
2. xhost +
3. switch to oracle user: su – oracle

Things should work now.

Reply

hi,
I just want to share a time saving tip, incase one has enough ram .
While working with virtual machines, speeding up i/o can really help. Therefore, I got myself a system with 8gb Ram, loaded ubuntu and when I need to create a VM, I use “tmpfs” .
(that’s just a option of mount command to put a folder in RAM ), and one can use it for the VDI file, or the Oracle Installer or both.
This speeds up the work significantly.
Virtualbox has come a long way and is rapidly going through builds, I have built it from source many times and have seen it perform really nice, only thing which is not much is their dependency on python 2.5 still.

I would like to know why is Oracle in your opinion not certifying Ubuntu as a supported distro ?

Thanks
Pam…
ps : l love your work, keep it up.

Reply

I like to translate this article to spanish. Could you let me do that and publish the translated article on a forum or Wiki, or even on a little Linux free magazine?. Please tell me if I have your permission on my e-mail or this page. Of course you will appear as the original author.

Reply

A little addition for the people who want to install Oracle 11gR1 locally on Ubuntu 9.04 Desktop. For the Xorg display to be exported. you have to get your user ‘magic cookies’ by doing the following command from your user shell:

xauth list

and add them to the ‘oracle’ user by doing the following command from the oracle user shell:

xauth add magic_cookies_from_user

After that you export the display with the following command from the oracle user shell:

export DISPLAY=:0.0 (without the IP address)

Then run xclock to test everything.

Reply

I just notic that I didn’t post the code I did with my explanation …

[email protected]:~$ xauth list
ubuntu/unix:0 MIT-MAGIC-COOKIE-1 b3156253d082c7a32dcffbb28faf2e75
localhost.localdomain/unix:0 MIT-MAGIC-COOKIE-1 b3156253d082c7a32dcffbb28faf2e75
[email protected]:~$ sudo bash
[sudo] password for user:
[email protected]:~# su – oracle
[email protected]:~$ xauth add ubuntu/unix:0 MIT-MAGIC-COOKIE-1 b3156253d082c7a32dcffbb28faf2e75
[email protected]:~$ xauth add localhost.localdomain/unix:0 MIT-MAGIC-COOKIE-1 b3156253d082c7a32dcffbb28faf2e75
[email protected]:~$ xauth list
ubuntu/unix:0 MIT-MAGIC-COOKIE-1 b3156253d082c7a32dcffbb28faf2e75
localhost.localdomain/unix:0 MIT-MAGIC-COOKIE-1 b3156253d082c7a32dcffbb28faf2e75
[email protected]:~$ export DISPLAY=:0.0
[email protected]:~$ xclock
[email protected]:~$

Reply

Thanks for this nice procedure. It works and it saved me a LOT of time!

Reply
Sajith Rathnayake
August 8, 2009 3:11 am

Wonderful!

The only thing to BE resolveD is,
export DISPLAY=:0.0

I think it should be,
xhost :oracle
and
export DISPLAY=:0.0

Reply
Jaunty on T61 « ZenHat
August 11, 2009 6:11 am

[…] – 11gR1; Here’s the doc. If $DISPLAY environment variable not working, please run xhost local:oracle as privileged […]

Reply

The script works great until DBCA.

I configure everything as described and when I finish it, I get the message “not connected to ORACLE”.

The postDBCreation.log says:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
ORACLE instance started.
Total System Global Area 523108352 bytes
Fixed Size 1301024 bytes
Variable Size 301991392 bytes
Database Buffers 213909504 bytes
Redo Buffers 5906432 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
Process ID: 6263
Session ID: 27 Serial number: 5

ERROR:
ORA-03114: not connected to ORACLE

ERROR:
ORA-03114: not connected to ORACLE

ERROR:
ORA-03114: not connected to ORACLE

ERROR:
ORA-03114: not connected to ORACLE

ERROR:
ORA-03114: not connected to ORACLE

select username from dba_users
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

Can anyone help, please?

Reply

@ewing,

Did you remember to install libaio? This is by far the most common cause for DBCA failing to start and create a database.

Cheers!

Reply

Yes, I install libaio.

After I redid everything twice, I changed the SID to ora11dev and than it worked. Is it possible that the SID is limited to 8 characters? My previous one had 9?!?

Btw. I also tried to install the 64bit version on a 64bit system. No luck at all.

Reply

Hi,
I did everything you wrote including editing sysctl files etc.

I reach the line of:
Copyright (C) 1999, 2007, Oracle. All rights reserved.

But then I get those lines and more and more:
Can’t connect to X11 window server using ‘192.168.254.12:0.0’ as the value of the DISPLAY variable.
192.168.254.12:0.0
192.168.254.12:0.0

Then my installation does NOT continue and gets interrupted…

If you want, here is the screenshot:
https://img33.imageshack.us/i/scrixn.jpg/

Anybody can help me please??

Reply

thanks very much for this article

I have successfully installed this on a 2GB RAM windows xp pro laptop running virtualbox 3, with an ubuntu 9 guest

it is working very well, and I am very pleased

Reply

the script in this tutorial is linked to his own private static class C address of: 192.168.254.12

people need to use their own static address…..

Reply
Rene Figueroa
August 31, 2009 4:32 pm

64 Bits considerations.

I’ve installed Oracle 11g 64 Bits on Ubuntu 9.04 64Bits.

During installation process (linking..) Installation fails twice in this part. You continue and follow all documentation. And before you start database. You have to modify two scripts in order to fix and relink into bin directory.

Add 32Bits Library reference

SCRIPT ONE:

diff genagtsh genagtsh.original
65d64
< USRLIB32=
72d70
< USRLIB32=-L/usr/lib32
136c134
LD=”gcc ${NON64_LDOPT} -shared -L${ORACLE_HOME}/${LIB} -L${ORACLE_HOME}/${LIB}/stubs” # shared library link command

SCRIPT TWO:

diff genclntsh genclntsh.original
144c144
&& LOOP=”DONE” && CF=-m32
237c237
LD=”gcc ${CF} -shared -Wl,-relax ${STUBS} -L${OLIB}” # shared library link command

Finally execute

relink all

Enjoy it!

Reply

Thanks so much Augusto for your great article. It helped me install successfully Oracle 11gR1 on my Ubuntu 9.04 system on the first run!
For those who have problem with X11 DISPLAY, try export DISPLAY=:0.0
Good luck.

Reply

do i have to type all these command ?

[email protected]:~$ export ORACLE_SID=ORA11DEV
[email protected]:~$ . oraenv
ORACLE_SID = [ORA11DEV] ?
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/jaunty11 is /u01/app/oracle
[email protected]:~$ sqlplus ‘/as sysdba’

everytime ???

Reply

Augusto, thanks for an excellent guide.

I do have some problems trying to install the 64 bit Oracle on the 64 bit Ubuntu server. Just like Renee describes in comment 34. The rest of Renees workaround is too cryptic for me though. I was able to find the 2 scripts he refers to and modify them (although some changes seem no changes at all), but unable to execute them or to find out how to ‘relink all’.
Could someone try to explain more detailled howto install the 64 bit version? Or better, a new guide ;-)

Reply

And another Pythian bloke, Don Seiler, just confirmed that those instructions work one to one for 11g Release 2 (11gR2) — https://twitter.com/dtseiler/statuses/3865121778

“got Oracle 11gR2 (32-bit) installed on Ubuntu Jaunty, needed libstdc++5 installed in addition to Augusto’s instructions on the #Pythian blog”

Reply

I get the following error while running ./runInstaller

[email protected]:/media/database$ export DISPLAY=10.0.2.15:0.0
[email protected]:/media/database$ ./runInstaller -ignoreSysPrereqs
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 80 MB. Actual 20080 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1299 MB Passed
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 <<<>> Ignoring required pre-requisite failures. Continuing…

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-10-04_11-20-17AM. Please wait …[email protected]:/media/database$ Exception in thread “main” java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at java.awt.Toolkit$2.run(Toolkit.java:821)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
at com.jgoodies.looks.LookUtils.(Unknown Source)
at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:122)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
at oracle.install.commons.util.Application.startup(Application.java:758)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

Reply

Wait but don’t you need a product key for this product or is it just a trial?

Reply
Nelson Ramirez
November 1, 2009 5:52 pm

I am new to Linux & Ubuntu and I am stuck with the X Server Display setting, nothing seems to work. CAN SOMEONE HELP ME????

This is what I get:

[email protected]:/home/nelson/Downloads/database$ ./runInstaller -ignoreSysPrereqs
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 80 MB. Actual 44778 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2384 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…

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-11-01_04-43-09PM. 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
[email protected]:/home/nelson/Downloads/database$

Reply

After following the procedure and installing the 11g R1, when I wanted to create and set-up the services by calling “netca”, I got this error:

-su: netca: command not found

Reply

“-su: netca: command not found; it was my mistake, I forgot to export the oracle home and bin directory paths.

Reply

Dude! You’re a genius.

Reply

I got a core dump when I tried to do this with 11g R2 installer on Karmic (9.10). Have you tried and succeeded with that combination?

On a (perhaps) related note, I would be happy for any insight you may have:

My set up has an 8G ext3 file system mounted on / and another 8G nilfs2 file system mounted on /opt. I am running the installer from /opt and also installing to /opt. When I ran the installer, each time, I saw about 5% of the / filesystem space used up. I searched for core files, could not find any …

Let me know if you have any ideas! Thanks.

Reply

hi
thanks for the these instructions. as previously posted I have successfully installed oracle 11gr1 onto an ubuntu 9.04 system running under virtualbox3
but I have been trying to do the same with a real ibm thinkpad t23, with 1GB RAM, with exactly the same ubuntu and oracle levels, unfortunately this fails to install the database properly, with the init.ora not being created, hence the DB does not start, and who knows what else is missing
I ensured that it was not just sloppy typing on my part, by reinstalling everything on the thinkpad (OS and DB), and in parallel performing the same operations on a new virtualbox session, which I limited to 960MB RAM to be as close to the thinkpad resources as possible
I have a trace.log of the install, but can’t make head nor tail of why this fails
can anyone help ?

Reply

hahaha
I worked out the cause of my thinkpad install problem…

the instructions above has a small typo

[email protected]:~$ export ORACLE_SID=ORA11DEV

should of course read

[email protected]:~$ export ORACLE_SID=ORADEV11

Reply

Thank You ;
Every thing is OK

Reply

I don’t see anything in the “Confirmation” page. After I fill in all the details and click “Finish” in dbca, I see a gray box with the title “Confirmation” and nothing in it. So, I can’t see or click “OK” button and hence can’t create a database ! Oh well.

Any ideas ?

Reply

I successfully followed your instructions. What is the url for the Oracle server?

https://localhost:1521 doesn’t work.

Reply

I am trying to install 64-bit Oracle 11gR1 on Ubuntu 9.04 64-bit. I have set everything up and when I run ./runInstaller, I get the message: “You are attempting to install 64-bit Oracle on a 32-bit operating system. This is not supported and will not work.” My OS is 64-Bit, not 32-Bit…

According to “uname -a” the system tells me I have an SMP i686 processor (really a Phenom Quad Core 9500). Is there a way to force either Oracle to see the correct OS or some other way to get this to work??

Reply

Hi Gonza,

had the same problems while installing x86_64 ubuntu server on my 64 bits architec laptop. And was because my processor didnt support the emulation instructions set. Did it through vmware server 2.0 and virtual box and none of the worked out. Look forward this issue on vmware site!!

Reply

I have the same issue running Enterprise Linux 5.1 inside Virtual Box latest. Any Fixes yet for this..

As on my Ubuntu 10 I can run the installer. but in Virtual box running EL5.1 uname-a reprts i686

Reply

First of all, many thanks to the author for this howto.

Second of all, this is my experience of installing Oracle 11g R1 on Ubuntu 9.10 server 32 bit running in VMware Workstation 7.0.1 on a Ubuntu 9.10 desktop host:

– I had some troubles with the DISPLAY, then I looked at the previous HOWTO (the one for 8.10) and I followed it and it worked.

– I run dbca and on the last page I clicked Finish to create a database. Then I saw a gray Confirmation box (like ewing comment#28). I hit Enter anyway because according to this HOWTO, the OK has the focus at that time.

– I couldn’t start the oracledb with the command
su $ORACLE_OWNR -c “$ORACLE_HOME/bin/dbstart $ORACLE_HOME”
(of course I have all environment variables setup correctly). I have libaio1 install already. In the startup.log, I saw:
SQL> ORACLE instance started.

Total System Global Area …. bytes
Fixed Size …. bytes
….
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced.

I don’t know where my problem is. I even removed the libaio1 from ubuntu and installed the libaio from oss.oracle.com (https://www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html) but the error was still the same.

Reply

2 start installer U
need Java…

so before do ./runInstaller
check if Java is installed… :)

Reply
Installing Oracle 11gR2 Enterprise Edition on Ubuntu 10.04 (Lucid Lynx) | The Pythian Blog
June 11, 2010 4:08 pm

[…] than re-invent the wheel, I’m going to direct you to the previous Oracle-on-Ubuntu post by my colleague Augusto Bott. Many of the directions there hold true here (even with 32-bit vs […]

Reply

I just wanted to say THANKS FOR THIS!

You really made a difference to my work. It would be smashing if we could get this for future releases of Ubuntu/Oracle DB as well.

Reply

Thanks a ton Augusto… Installation was a breeze
Also thanks to Patrick for his tips on xauth to install Oracle 11gR1 locally on Ubuntu 9.04 Desktop …

Reply

Does anyone now also how to remove Oracle Enterprise after having installed it ? I’m following https://download.oracle.com/docs/cd/E11882_01/install.112/e16763/remove_oracle_sw.htm#CEGBAJIA but searching for the ./deinstall, it seams not be present under $ORACLE_HOME …

Reply

The enterprise manager did not start. It replied this error

[email protected]:~$ emctl start dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.1.0/All4God/oc4j/j2ee/OC4J_DBConsole_ubuntu.ubuntu-domain_project not found.
[email protected]:~$

pls i am using ubuntu 10.10
I have followed all the rules
can you show me some steps on how i can start the enterprise manaegr?

thanks

Reply

pls how do i start enterprise manager.
i hv tried for days now to no avail except for the error message below

[email protected]:/u01/app/oracle/product/11.1.0/jaunty11/bin$ emctl status dbconsole
OC4J Configuration issue. /u01/app/oracle/product/11.1.0/jaunty11/oc4j/j2ee/OC4J_DBConsole_ubuntu.ubuntu-domain_library not found.
[email protected]:/u01/app/oracle/product/11.1.0/jaunty11/bin$

Reply

Fantastic, worked like a charm. Thanks very much for the great tutorial!

Reply

hi
Im trying to install oracle 11gR1 32bit on ubuntu linux 11.04 32bit and it looks like i need glib version ATLEAST=2.3.4-2.19. so I downloaded version libstdc++5_3.3.6-21ubuntu1_i386.deb since it said Atleast. But the system doesn’t seem to be verifying that requirement. Can anybody please help me.
Reply

Reply
Installing Oracle 11gR2 Enterprise Edition on Ubuntu 10.04 (Lucid Lynx) | durga
January 12, 2012 3:58 am

[…] than re-invent the wheel, I’m going to direct you to the previous Oracle-on-Ubuntu post by my colleague Augusto Bott. Many of the directions there hold true here (even with 32-bit vs […]

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *