oracle (1)


Installing oracle 11i (12c) on debian sid (6.0)

Somehow it happened that I decided to try out oracle on latest linux kernel and debian system.

I horribly failed.

In order to make you not fail, here is a guide what to do in order to install it

1. Install necessary packages

apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm make gcc libsc-dev libxp-dev

This is probably not needed:
2. Update /dev/shm

Oracle requires shared pool to be present there, but latest linux is using /run/ to store it – this is dangerous and you should reboot your server once you finish (you only need to do that if /dev/shm points to /run/shm)


sudo rm /dev/shm
sudo mkdir /dev/shm
sudo chmod 1777 /dev/shm 

3. Change the system limits

Write the following options to the /etc/security/limits.confce file:

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

Add the following to /etc/pam.d/login to validate parameters /etc/security/limits.conf:

session required /lib/security/pam_limits.so        
session required pam_limits.so

Make sure you have this in your /etc/sysctl.conf file:

sysctl -p:         
# sysctl -p
kernel.printk = 4 4 1 7
kernel.maps_protect = 1
fs.inotify.max_user_watches = 524288
vm.mmap_min_addr = 65536
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

4. Change some more links

ln -s /usr/bin/awk /bin/awk        
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename
mkdir /etc/rc.d
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

5. Create user credentials

addgroup oinstall        
Adding group 'oinstall' (GID 1001) ...
Done.
# addgroup dba
Adding group 'dba' (GID 1002) ...
Done.
# addgroup nobody
Adding group 'nobody' (GID 1003) ...
Done.
# usermod -g nobody nobody
 
useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
# passwd oracle        
Password changed.
mkdir /home/oracle 
chown -R oracle:dba /home/oracle

6. Change dash to bash

# if you see this:
ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Mar  2 18:07 /bin/sh -> dash
# do this:
sudo su
cd /bin
rm sh
ln -s bash sh
 
# These links needs to be created as well to fix problems with makefiles
sudo su
mkdir /usr/lib64
ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libc_nonshared.a /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64/
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib64/

Now you can install oracle using their universal installer. If you don’t have GUI, you need to create a response file. Don’t forget to bypass system checks, because the version of libraries used by debian is too new for oracle