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 http://nl.archive.ubuntu.com hardy Release.gpg
Ign http://nl.archive.ubuntu.com hardy/main Translation-en_US
Get:1 http://security.ubuntu.com hardy-security Release.gpg [189B]
Ign http://security.ubuntu.com hardy-security/main Translation-en_US
[...]
[...snipped output...]
[...]
Get:14 http://nl.archive.ubuntu.com hardy-updates/restricted Packages [6636B]
Get:15 http://nl.archive.ubuntu.com hardy-updates/main Sources [87.9kB]
Get:16 http://nl.archive.ubuntu.com hardy-updates/restricted Sources [908B]
Get:17 http://nl.archive.ubuntu.com hardy-updates/universe Packages [90.6kB]
Get:18 http://nl.archive.ubuntu.com hardy-updates/universe Sources [22.7kB]
Get:19 http://nl.archive.ubuntu.com hardy-updates/multiverse Packages [20.1kB]
Get:20 http://nl.archive.ubuntu.com 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 http://nl.archive.ubuntu.com hardy-updates/main language-pack-en 1:8.04+20080805 [236kB]
Get:2 http://security.ubuntu.com hardy-security/main libxml2 2.6.31.dfsg-2ubuntu1.1 [785kB]
Get:3 http://nl.archive.ubuntu.com hardy-updates/main language-pack-gnome-en 1:8.04+20080805 [96.7kB]
Get:4 http://nl.archive.ubuntu.com hardy-updates/main smbclient 3.0.28a-1ubuntu4.5 [4863kB]
Get:5 http://security.ubuntu.com hardy-security/main libxml2-utils 2.6.31.dfsg-2ubuntu1.1 [34.0kB]
Get:6 http://security.ubuntu.com hardy-security/main python-libxml2 2.6.31.dfsg-2ubuntu1.1 [263kB]
Get:7 http://nl.archive.ubuntu.com hardy-updates/main samba-common 3.0.28a-1ubuntu4.5 [2840kB]
Get:8 http://nl.archive.ubuntu.com 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
root@IA-laptop:~#


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/10201_database_linux32.zip
oracle@IA-laptop:~$ cd /oracle/install/database/install
oracle@IA-laptop:~$ export DISPLAY=:0
oracle@IA-laptop:~$ ./runInstaller

Run /oracle/prd/oraInventory/orainstRoot.sh and /oracle/prd/db/10.1.2/root.sh and about 10 minutes later, I was done (admit, I needed to rerun root.sh, 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 PATH=$ORACLE_HOME/bin:$PATH
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.

No comments: