Abhängigkeiten:

# yum install binutils elfutils-libelf-0.* glibc-2.* glibc-common-2.* libgcc-4.* libstdc++* make* elfutils-libelf-devel-0.* glibc-devel-2.* gcc-4.* gcc-c++-4.* unixODBC-2.* libaio libaio-devel unixODBC-devel sysstat compat-libstdc++* pdksh

Gruppen und Benutzeraccount:

# groupadd oinstall
# groupadd dba
# groupadd oper
# groupadd asmadmin
# useradd -g oinstall -G dba,oper,asmadmin oracle
# passwd oracle

Xhost-Tool:

# yum install xorg-x11*utils

Kernel-Parameter:

# nano /etc/sysctl.conf
...
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 32768 61000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
...
# sysctl -p

PAM:

# echo "session    required     pam_limits.so" >> /etc/pam.d/login

SELinux muss zwingend deaktiviert sein, um 11g zu verwenden.

Entpacken:

# unzip linux_11gR2_database_1of2.zip
...
# unzip linux_11gR2_database_2of2.zip
...
# chmod 775 database
# chmod 775 database/* -Rf
# chmod 775 database/.* -Rf
# cd database/

Dateien und Profil:

# mkdir -p /u01/app/oracle/product/11.2.0/db_1
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01
# su oracle
$ nano ~/.bash_profile
...
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=<Hostname>.<Domäne>; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi
...
C:\Programme\Xming> xming -ac -multiwindow -clipboard
# export DISPLAY=IP:0.0
 ./runInstaller
Oracle Universal Installer wird gestartet...

Temporärer Speicherplatz wird geprüft: muss größer sein als 80 MB.   Tatsächlich 4089 MB    Erfolgreich
Swap-Speicher wird geprüft: muss größer sein als 150 MB.   Tatsächlich 3967 MB    Erfolgreich
Monitor wird geprüft: muss so konfiguriert sein, dass mindestens 256 Farben angezeigt werden.    Tatsächlich 16777216    Erfolgreich
Vorbereitung für das Starten von Oracle Universal Installer aus /tmp/OraInstall2011-03-14_03-10-40PM. Bitte haben Sie einen Moment Geduld...
#

Installation (Screenshots)

# /u01/app/oraInventory/orainstRoot.sh
Berechtigungen ändern von/u01/app/oraInventory.
Lese- und Schreibberechtigungen für Gruppe werden hinzugefügt.
Lese-, Schreib- und Ausführungsberechtigungen für World werden entfernt.

Ändern des Gruppennamen von /u01/app/oraInventory zu oinstall.
Die Ausführung des Skripts ist abgeschlossen.

# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

Oratab:

$ exit
# nano /etc/oratab
...
orcl:/u01/app/oracle/product/11.2.0/db_1:Y
...

Initskript:

# nano /etc/init.d/dbora
...
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.

ORA_HOME=/u01/app/oracle/product/11.2.0
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/db_1/bin/dbstart ]
then
    echo "Oracle startup: cannot start"
    exit
fi

case "$1" in
    'start')
        # Start the Oracle databases:
        # The following command assumes that the oracle login
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORA_HOME/db_1/bin/lsnrctl start"
        su - $ORA_OWNER -c "$ORA_HOME/db_1/bin/dbstart"
        su - $ORA_OWNER -c "$ORA_HOME/db_1/bin/emctl start dbconsole"
        touch /var/lock/subsys/dbora
        ;;
    'stop')
        # Stop the Oracle databases:
        # The following command assumes that the oracle login
        # will not prompt the user for any values
        su - $ORA_OWNER -c "$ORA_HOME/db_1/bin/emctl stop dbconsole"
        su - $ORA_OWNER -c "$ORA_HOME/db_1/bin/dbshut"
        su - $ORA_OWNER -c "$ORA_HOME/db_1/bin/lsnrctl stop"
        rm -f /var/lock/subsys/dbora
        ;;
esac

...
# chmod 750 /etc/init.d/dbora
# chkconfig --add dbora
# chkconfig --list dbora
dbora           0:off   1:off   2:off   3:on    4:on    5:on    6:off