Installing Oracle Database 11gRx on linux 5

Here are the majors steps to install an Oracle database on Redhat Linux release 5
duration: 3h depending on your internet connexion for yum updates, including database installation & configuration

Pre-requistes

The following steps are a pre-requisites to prepare the redhat platform by downloading all libraries dependencies and create the oracle user.

  1. cat /etc/redhat-release to get the redhat version
  2. cd /etc/yum.repos.d
  3. wget http://public-yum.oracle.com/public-yum-el5.repo if it matche the rehat release 5. Open the file and enable the correct version ()
  4. To install oracle database server
    1. yum install unixODBC-2.2.11
    2. yum install oracle-validated

Installing the oracle database

Install an X Server if necessary (for example if you run the installation from a ternet session)

Just follow the wizard, and do not forget to change the encoding according to your needs (ALE32UTF8 to store multiple language groups).

Do not forget top disable SE Linux security otherwise the listener won’t start

  • Disable SE-LINUX [http://www.crypt.gen.nz/selinux/disable_selinux.html]
  • /etc/selinux/config : SELINUX=enforcing [http://www.oracledistilled.com/oracle-database/troubleshooting/error-cannot-restore-segment-prot-after-reloc-permission-denied/]

URL is accessible at: https://soa11g.home.fr:1158/em

Desactivate firewall if connect from a remote machine: as a root user, launch

service iptables stop

Customize your bash_profile :

[oracle@soa11g database]$ cat /home/oracle/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_SID=orcl
export ORACLE_HOME=/data/products/app/oracle/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

Automatic restart after a linux reboot

!! Automatic DB Start/Stop
* create a file oracledb in /etc/init.d directory as user root
* Put your code in this file
* chmod 750 /etc/init.d/oracledb
* Set run levels to execute this file on startup
*   chkconfig –level 345 oracledb on
* Change the flag of /etc/oratab file to Y
* Restart your machine.
* example fichier /etc/init.d/oracledb
{{{
#!/bin/bash
#
# oracle Init file for starting and stopping
# Oracle Database. Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Oracle Database startup script

# Source function library.

. /etc/rc.d/init.d/functions

ORACLE_OWNER=”oracle”
ORACLE_HOME=”/home/oracle/app/oracle/product/11.2.0/dbhome_1″
ORACLE_HOME_LISTENER=$ORACLE_HOME

case “$1″ in
start)
echo -n $”Starting Oracle DB:”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/dbstart $ORACLE_HOME”
echo “OK”
;;
stop)
echo -n $”Stopping Oracle DB:”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/dbshut $ORACLE_HOME”
echo “OK”
;;
*)
echo $”Usage: $0 {start|stop}”
esac
}}}
{{{
[root@aia11g rc.d]# find . -name *ora* -ls
2623564    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc1.d/K30oracledb -> ../init.d/oracledb
2623568    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc5.d/S80oracledb -> ../init.d/oracledb
2623569    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc6.d/K30oracledb -> ../init.d/oracledb
2623566    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc3.d/S80oracledb -> ../init.d/oracledb
2623567    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc4.d/K30oracledb -> ../init.d/oracledb
2622611    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc0.d/K30oracledb -> ../init.d/oracledb
2622614    4 -rwxr–r–   1 root     root          721 Mar 21  2011 ./init.d/oracledb
2623565    0 lrwxrwxrwx   1 root     root           18 Mar 21  2011 ./rc2.d/K30oracledb -> ../init.d/oracledb

}}}

Advertisements

About Chenda Mok

19 years of hands on experience in software design and development with emphasis on Enterprise Application Integration (EAI), Services Oriented Architecture (SOA) and Identity Management (IDM) solutions. I’m a software engineer, member of the professional service delivery team working for Salesforce. Prior to this, I worked for Oracle as Solution Architect, through SeeBeyond(06/2005), then SUN’s acquisition (04/2009). After my master’s degree in computer science in 1997; I always delivered consulting on architecture, design, implementation on integration’s field. I’m interested in architecture using EAI/SOA/IDM/BPM/Cloud technologies, software development and Java’s related technologies. I may blog about my work/activities at Salesforce, but I do not speak for my employer, past, present or future.
This entry was posted in database, oracle. Bookmark the permalink.