I recently needed to install a Oracle 11g Database on Debian, and wrote down the notes here. Please send me a message
if i missed a step or something is easier to achieve than I did.
install mandatory packages
some packages are probably not necessary, I put them together from old notes from me and several weblinks if you know which are not necessary send me a list and i will correct it
apt-get install binutils autoconf automake bzip2 gcc less libc6-dev make libstdc++5 unzip zlibc build-essentials libaio1
!!!doxygen reported as not needed by Tobia, tx for this! Also watch his comment if you use OpenVZ!
x-terminal
I chose fluxbox but you can also take anything else like xterm, gnome, kde….
apt-get install fluxbox
prepare user and groups
groupadd oinstall
groupadd dba
useradd oracle -m -d /home/oracle -g oinstall -G dba -s /bin/bash
passwd oracle
check environment
there are several kernel parametersw that have to be changed to succesfully install the database, here is a script that helps you to determine them
echo "sem: ";echo "min 250 32000 100 128"; echo "is " `cat /proc/sys/kernel/sem`; echo; \
echo "shmall: ";echo "min 2097152"; echo "is " `cat /proc/sys/kernel/shmall`; echo; \
echo "shmmax - should be able to hold the SGA - max 4G-1byte: ";echo "is " `cat /proc/sys/kernel/shmmax`; echo; \
echo "shmmni: ";echo "min 4096"; echo "is " `cat /proc/sys/kernel/shmmni`; echo; \
echo "file-max: ";echo "min 6815744"; echo "is " `cat /proc/sys/fs/file-max`; echo; \
echo "ip_local_port_range: ";echo "min/max 9000 65500"; echo "is " `cat /proc/sys/net/ipv4/ip_local_port_range`; echo; \
echo "rmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/rmem_default`; echo; \
echo "rmem_max: ";echo "min 4194304"; echo "is " `cat /proc/sys/net/core/rmem_max`; echo; \
echo "wmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/wmem_default`; echo; \
echo "wmem_max: ";echo "min 1048576"; echo "is " `cat /proc/sys/net/core/wmem_max`; echo; \
echo "aio-max-nr: ";echo "max 1048576"; echo "is " `cat /proc/sys/fs/aio-max-nr`; echo;
change necessary parameters
you have just to change the parameters that don't fit, but feel free to set them all to the minimum with this script
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
# !!!! needs to fit YOUR SGA (=main memory for database, be sure to have enough ram for PGA etc.)!!!!
echo "kernel.shmmax = 1200000000" >> /etc/sysctl.conf
#echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
#echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 1048576" >> /etc/sysctl.conf
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
change some limits
also some limits have to be set
echo "oracle soft nproc 2047" >> /etc/security/limits.conf
echo "oracle hard nproc 16384" >> /etc/security/limits.conf
echo "oracle soft nofile 1024" >> /etc/security/limits.conf
echo "oracle hard nofile 65536" >> /etc/security/limits.conf
create directories
I prefer to separate software, database files and recovery files so i put them in /u01 /u02 /u03
mkdir -p /u01/app/oracle
mkdir -p /u02/oradata
mkdir -p /u03/flash_recovery_area
chown -R oracle:oinstall /u01 /u02 /u03
chmod -R 775 /u01 /u02 /u03
NOTE: seems they just say “recovery_area” or even “fast_recovery_area” now to the “flash_recovery_area”
additional steps
These steps prevent errors when the installer links some libraries
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/basename /bin/basename
finish preparations
reboot
== call the installer But before calling the installer check with above script if the kernel parameters are fine now
su oracle
/pathtoinstallfileshere/database/runInstaller -ignoreSysPrereqs
installer
The installer should guide you through each step in simple and advanced mode. When the requirements are checked you can savely bypass the warnings, because not everything can be checked on an unsupported ;-) environment.
!!!I really want to keep this up-to-date so please send me a note if i missed something or something is easier to handle than i did it!!!
Errors that can happen and how to bypass them
Added at 30.12.2010 including some more install packages some of the errors below did not happen when i wrote this article, it seems some new library versions etc. changed recentlyjava exception when calling the installer
happened at my side because I installed it over vnc This should help:
xhost localhost
Error in invoking target 'install' of makefile ins_ctx.mk
seems to be a problem with a newer? glibc version in the make.log file you should find something like
warning: libstdc++.so.5, needed by /u01/app/oracle/product/11.2.0/dbhome_1/ctx/lib//libsc_fa.so, not found
simply install libstdc++5
apt-get install libstdc++5