tomclegg.net


Diary
Examples
    256-router
    adzap
    apache-double-reverse
    cacti-adodb-php4
    debian-quota
    diskonmodule
    dollarsperbyte
    dynip
    ezmlm-linux
    fbsdhabits
    freebsdclone
    macbook-quantal-sound
    maildirpop3d-awfulhak
    mandy
    md
    mrtg
    net-snmp
    nodefaultroute
  >oracle9i<
    oracle9i-bsd5
    oracle9i-client
    oracle9i-nat
    php-cgi
    php-commandline
    php-image
    php-kics
    php-mini_httpd
    pinouts
    pizzaperdollar
    plesk-symlink-php
    pxe
    qmail-linux
    qmail-qfilter
    racoon-sonicwall
    redundant-vpn
    rewriterule
    seahorse-workaround
    setting-locale-failed
    smalldog
    snmpv3-cacti
    spamassassin
    squid-tproxy
    supfile
    suse73
    svc-nmbd
    svc-smbd
    svc-smtpd
    toyotastereo
    vm
    vn-file
    wmp-invalid
    xcode-remote-install
    xen-eth0-renamed
    xen-monowall
    xen3-ubuntu-dapper
    zz-update-grub-fail
Hire Tom
Mostly Mozart
Patches
School
Scrapbook
Software
Telephones




colocation
comments
davidireland
edsgranola
faq
funsites
goodlooking
goodmovies
google-earth-saucy-amd64
houserules
liberating
resume
resume2
scratch
shopping
snacks
todo
university
warisbogus

Installing Oracle 9i on Linux
Posted August 6, 2003

Install Red Hat 7.3 on planb (10.10.2.9). Choose "server" profile.

Make a symlink to fool the Oracle installer into thinking you have libc6.1. Otherwise, when you run the installer, you will get an error message like ".../native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory".

planb# cd /usr/lib
planb# ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-1.so.2

Copy the Oracle 9i Release 2 CD images to bsd5 (10.10.2.5) and mount them using mdconfig (FreeBSD 5) or vnconfig (FreeBSD 4).

Add two lines to /etc/hosts on both machines.

10.10.2.5 bsd5
10.10.2.9 planb

Log in to bsd5 as a regular user and start X-windows.

bsd5$ startx -listen_tcp

Allow clients to connect to bsd5 from planb.

bsd5$ xhost +planb

Log in to planb as root.

Add this to /etc/rc.conf to tune kernel parameters at boot time.

if cd /proc/sys/kernel
then
  echo >sem 100 32000 100 100
  echo >shmmax 2147483648
  echo >shmmni 4096
  echo >shmall 2097152
fi

echo >/proc/sys/fs/file-max 65536
echo >/proc/sys/net/ipv4/ip_local_port_change 1024 65000

Create oper, dba, and oinstall groups on both machines.

planb# groupadd -g 920 dba
planb# groupadd -g 921 oper
planb# groupadd -g 922 oinstall
bsd5# pw groupadd dba -g 920
bsd5# pw groupadd oper -g 921
bsd5# pw groupadd oinstall -g 922

Create the oracle user on both machines.

planb# useradd -u 920 -g dba -G oinstall oracle
bsd5# pw useradd oracle -u 920 -g dba -G oinstall -m

Create an apache user on planb.

planb# useradd -u 980 apache

NFS-mount the Oracle CDs from bsd5.

planb# mount bsd5:/usr/oracle/cd/oracle-1 /oracle1
planb# mount bsd5:/usr/oracle/cd/oracle-2 /oracle2
planb# mount bsd5:/usr/oracle/cd/oracle-3 /oracle3

Make another NFS mount point with lots of free space.

planb# mount bsd5:/usr/oracle /usr/oracle
planb# mkdir -p /usr/oracle/tmp
planb# chown oracle:dba /usr/oracle/tmp

Create directories for the installed Oracle software and the database.

planb# cd /usr/oracle
planb# mkdir base planb oradata bin
planb# chown oracle:dba base planb oradata

Log in as the oracle user.

planb# su -l oracle

Add environment variables to .bash_profile in oracle's home directory.

export ORACLE_BASE=/usr/oracle/base
export TMP=/usr/oracle/tmp
export TMPDIR=/usr/oracle/tmp

Make a symlink to /usr/oracle/planb. This should not be necessary, but under some circumstances the installer refuses to call home "planb" if it's anywhere but /home/oracle/planb. If you find that glitch, this should let you work around it.

oracle@planb$ ln -s /usr/oracle/planb ~

Log out and log back in. Type env to verify that ORACLE_BASE is set.

Start the Oracle installer.

oracle@planb$ export DISPLAY=bsd5:0
oracle@planb$ /oracle1/runInstaller

Leave the "allowed to install Oracle products" group blank.

Oracle home: name planb, path /usr/oracle/planb.

Install the Oracle database, Enterprise edition. Create a general purpose database.

Global database name planb.cis2.selkirk.bc.ca SID planb.

Directory for database files: /usr/oracle/oradata

Don't go too far away; the installer will ask you to insert the second and third CDs. (It would be handy if it could ask you for the locations of all three CDs ahead of time!)

While installing from the third CD:

Error invoking target install of makefile /usr/oracle/planb/ctx/lib/ins_ctx.mk
Click the Ignore button. ctxsrv will be broken. This is probably caused by the glibc-6.1 vs glibc-6.2 hack.

When you run /usr/oracle/planb/root.sh as root (as prompted by the installer), it will ask for the local bin directory. Enter /usr/oracle/bin.

There is a long pause during root.sh after it says "Entries will be added to the /etc/oratab file as needed..."

Change the SYS, SYSTEM, and SCOTT account passwords as prompted.

"The installation of Oracle9i Database was successful."

Exit the installer.

Run pstree to verify that Oracle is running:

planb# pstree
...
     |-dbsnmpwd---dbsnmp---dbsnmp---15*[dbsnmp]
     |-httpd-+-httpd-+-echo
     |       |       `-isqlplus---isqlplus---21*[isqlplus]
     |       |-httpd-+-java---java---8*[java]
     |       |       `-java---java---9*[java]
     |       |-5*[httpd---httpd---httpd]
     |       `-httpd
...
     |-10*[oracle]
...
     |-tnslsnr

Log in as a regular user (not oracle) and connect to the database:

tom@planb$ export ORACLE_HOME=/usr/oracle/planb
tom@planb$ export ORACLE_BASE=/usr/oracle/base
tom@planb$ export ORACLE_SID=planb
tom@planb$ PATH="$PATH:/usr/oracle/planb/bin"
tom@planb$ sqlplus scott/tiger

Back up /etc/rc.local and the files which the Oracle Installer installed in /etc.

planb# mkdir /usr/oracle/etc
planb# cd /etc
planb# cp -p -i rc.local oratab oraInst.loc /usr/oracle/etc/

Shut down planb.

Now, /usr/oracle on bsd5 contains your entire Oracle installation. Make a copy of that directory for posterity.


Oracle documentation (requires login):