Sunday, September 07, 2008

10G database on Ubuntu 8.04 (Hardy Heron)

I will describe what I did to get 10G Rel2 working on Ubuntu 8.04, codename Hardy Heron. Lot of the research was already done, of course, and comes from here.

Update and upgrade.
I made sure I got the latest version by switching to root, and upgrading/updating:

frank@IA-laptop:~$ sudo su -
[sudo] password for frank:
root@IA-laptop:~# apt-get update
Hit hardy Release.gpg
Ign hardy/main Translation-en_US
Get:1 hardy-security Release.gpg [189B]
Ign hardy-security/main Translation-en_US
[...snipped output...]
Get:14 hardy-updates/restricted Packages [6636B]
Get:15 hardy-updates/main Sources [87.9kB]
Get:16 hardy-updates/restricted Sources [908B]
Get:17 hardy-updates/universe Packages [90.6kB]
Get:18 hardy-updates/universe Sources [22.7kB]
Get:19 hardy-updates/multiverse Packages [20.1kB]
Get:20 hardy-updates/multiverse Sources [2795B]
Fetched 776kB in 1s (467kB/s)
Reading package lists... Done
root@IA-laptop:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
language-pack-en language-pack-gnome-en libsmbclient libxml2 libxml2-utils
python-libxml2 samba-common smbclient
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.0MB of archives.
After this operation, 500kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 hardy-updates/main language-pack-en 1:8.04+20080805 [236kB]
Get:2 hardy-security/main libxml2 2.6.31.dfsg-2ubuntu1.1 [785kB]
Get:3 hardy-updates/main language-pack-gnome-en 1:8.04+20080805 [96.7kB]
Get:4 hardy-updates/main smbclient 3.0.28a-1ubuntu4.5 [4863kB]
Get:5 hardy-security/main libxml2-utils 2.6.31.dfsg-2ubuntu1.1 [34.0kB]
Get:6 hardy-security/main python-libxml2 2.6.31.dfsg-2ubuntu1.1 [263kB]
Get:7 hardy-updates/main samba-common 3.0.28a-1ubuntu4.5 [2840kB]
Get:8 hardy-updates/main libsmbclient 3.0.28a-1ubuntu4.5 [887kB]
Fetched 10.0MB in 19s (523kB/s)
Preconfiguring packages ...
(Reading database ... 138248 files and directories currently installed.)
Preparing to replace language-pack-en 1:8.04+20080708 (using .../language-
[...snipped output...]
Setting up samba-common (3.0.28a-1ubuntu4.5) ...

Setting up smbclient (3.0.28a-1ubuntu4.5) ...
Setting up libsmbclient (3.0.28a-1ubuntu4.5) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

Then I continued by getting these packages:

apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm libstdc++5

After that, I created the oinstall and dba groups and the oracle account, much like in step 7, and as done in previous installs:

groupadd oinstall
groupadd dba
groupadd nobody
useradd -g oinstall -G dba -d /home/oracle -s /bin/bash oracle
passwd oracle

I changed the limits and system-wide settings, and reloaded these using sysctl -p (well, actually, I rebooted into a new kernel)
In the mean time, downloading the database and companion disks has completed; time to get serious:

root@IA-laptop:~# mkdir -p /oracle/prd/db/10.1.2
root@IA-laptop:~# chown -R oracle:oinstall /oracle
root@IA-laptop:~# echo 4 >> /etc/redhat-release
root@IA-laptop:~# ln -s /usr/bin/rpm /bin/rpm
root@IA-laptop:~# ln -s /usr/bin/basename /bin/basename
root@IA-laptop:~# ln -s /usr/bin/rpm /bin/rpm
root@IA-laptop:~# ln -s /usr/bin/awk /bin/awk
root@IA-laptop:~# su - oracle
oracle@IA-laptop:~$ mkdir /oracle/install
oracle@IA-laptop:~$ cd /oracle/install
oracle@IA-laptop:~$ unzip /home/frank/
oracle@IA-laptop:~$ cd /oracle/install/database/install
oracle@IA-laptop:~$ export DISPLAY=:0
oracle@IA-laptop:~$ ./runInstaller

Run /oracle/prd/oraInventory/ and /oracle/prd/db/10.1.2/ and about 10 minutes later, I was done (admit, I needed to rerun, after adding the group nobody).
Final thing to do, is to alter the login scrpt for the oracle user:

oracle@IA-laptop:~$ cd
oracle@IA-laptop:~$ vi .profile
export ORACLE_BASE=/oracle/prd
export ORACLE_HOME=$ORACLE_BASE/db/10.1.2
export ORACLE_SID=orcl
export DISPLAY=:0.0
echo "Oracle settings done"

The instance
Time to create an instance... which will have to be discarded, as I forgot to install the companion disk...
Enough for now; the formula 1 circus has landed in Spa.

Monday, September 01, 2008

Oracle on Ubuntu

The company I work for has supplied me with a very decent laptop, in December 2007, equipped with an Intel Core Duo T7500 processor, 4GB of RAM, and an 160GB Harddisk. The only downside (and reason I hardly ever use the thing) is Vista Enterpise. Apart from the fact Oracle only recently certified versions for Vista, it takes forever to get it into a state I can actually do some work. I timed it once, and it took 5 minutes for Vista to get into a working state (showing off a picture is not what I regard "working state"), including getting an IP-address from my local NAS, setting up an VPN session to the internal network and firing up my email application.
As a comparison, Ubuntu does the same (without the VPN), in about a minute.

Why all this?
Well, it basically explains why I installed Ubuntu next to Vista (dual boot configuration); I really got fed up with the abysmal performance of Vista. And no, it will probably not be all Vista's fault (our IT department uses images with a lot of stuff starting up), but an OS reporting 3GB where there's really 4GB installed - well, that's 33% gain by installing an OS that actually uses that last GB!

Installing Ubuntu (Desktop) was easy; CentOS, the platform of choice for me as Oracle gets onto Linux, failed miserably in recognizing the graphics driver - even the text based install got stuck.
Did not spent much time on the issue, don't think much of it. It's a laptop, not server hardware!

RDBMS: 10G Rel2
I think 11G can be installed on Ubuntu without too much of an effort, but this side of the ocean, not many clients have 11G, or plans for that matter. So, for now, I'll stick to 10G Rel 2 - Enterprise, of course...

iAS: 10G Rel 3, patch 4
Or Version, for that matter. The SOA Suite Edition - get that running, and you can get anything to run.