Thursday, October 2, 2008

Oracle 10g on Ubuntu 8.40

  1. Login to ubuntu from your usual administrative account which has sudo access

  2. Make sure you have enough ram, swap space and disk space as per oracle requirements.

  3. Install the required packages (first make sure ‘universe’ is enabled in your sources.list):

    • sudo apt-get install build-essential libaio rpm lesstif2-dev alien

    • apt-get install gcc libaio1 libc6 libstdc++5 make lesstif2 lesstif2-dev rpm

  4. Create the users and groups oracle needs:

    • sudo groupadd oinstall

    • sudo groupadd dba

    • sudo groupadd nobody

    • sudo useradd -g oinstall -G dba,nobody -d /opt/oracle -s /bin/bash oracle

  5. Set oracle user’s password

    • sudo passwd oracle

  6. Create the directory for the software installation and assign ownership to oracle:oinstall

    • sudo mkdir /opt/oracle

    • sudo chown -R oracle:oinstall /opt/oracle

    • sudo chmod -R 775 /opt/oracle

  7. In another console, login as oracle to make sure it works fine, then logout.

  8. Append user oracle’s .bashrc with PATH and ORACLE:BASE,HOME and SID information

    • sudo vi /opt/oracle/.bashrc

    • export ORACLE_BASE=/opt/oracle

    • export ORACLE_HOME=$ORACLE_BASE/product/10gR2

    • export ORACLE_SID=orcl

    • export PATH=$PATH:$ORACLE_HOME/bin

  9. Make sure the correct kernel parmeters are appended to /etc/sysctl.conf

    • kernel.shmall = 2097152

    • kernel.shmmax = 2147483648

    • kernel.shmmni = 4096

    • kernel.sem = 250 32000 100 128

    • net.core.rmem_default = 262144

    • net.core.rmem_max = 262144

    • net.core.wmem_default = 262144

    • net.core.wmem_max = 262144

    • fs.file-max = 65536

    • net.ipv4.ip_local_port_range = 1024 65000

  10. Set the kernel parameters or reboot

    • /sbin/sysctl -p

  11. Set /etc/security/limits.conf

    • * soft nproc 2047

    • * hard nproc 16384

    • * soft nofile 1024

    • * hard nofile 65536

  1. Create symbolic links and camoflage Kubuntu to look more like an enterprise rpm based distro because the oracle installer is expecting rhel, sles or asianux based distros.

    • sudo ln -s /usr/bin/awk /bin/awk

    • sudo ln -s /usr/bin/rpm /bin/rpm

    • sudo ln -s /lib/libgcc_s.so.1 /lib/libgcc_s.so

    • sudo ln -s /usr/bin/basename /bin/basename

  2. Mount the Oracle10g CD and run the installer

    • /runInstaller -ignoreSysPrereqs

  3. Installation will be uneventful provided above steps are followed

  4. Enable the oracle user to dbshut, dbstart and lsnrctl start

    • sudo vi /etc/oratab and change :N to :Y


No comments: