Oracle 11g on Centos 5

Download oracle from here:
http://download.oracle.com/otn/linux/oracle11g/linux_11gR1_database_1013.zip

Post Installation Task
vi /etc/oratab
demo1:/u01/app/oracle/product/11.1.0/db_1:Y

oraenv /* use the database username during the install or SID */
ORACLE_SID = [root] ? demo1
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 is /u01/app/oracle

Init for Database and Listenere
vi /etc/init.d/oracle
#!/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=”/u01/app/oracle/product/11.1.0/db_1″

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

chmod +x /etc/init.d/oracle
chkconfig oracle on
service oracle start

Init for Enterprise Manager Database Control

vi /etc/init.d/oraemctl
#!/bin/bash
#
# oraemctl Starting and stopping Oracle Enterprise Manager Database Control.
# Script is valid for 10g and 11g versions.
#
# chkconfig: 35 80 30
# description: Enterprise Manager DB Control startup script

# Source function library.

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

ORACLE_OWNER=”oracle”
ORACLE_HOME=”/u01/app/oracle/product/11.1.0/db_1″

case “$1″ in
start)
echo -n $”Starting Oracle EM DB Console:”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/emctl start dbconsole”
echo “OK”
;;
stop)
echo -n $”Stopping Oracle EM DB Console:”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/emctl stop dbconsole”
echo “OK”
;;
*)
echo $”Usage: $0 {start|stop}”
esac

chmod +x /etc/init.d/oraemctl
chkconfig oraemctl on
service oraemctl start
Environment variable ORACLE_SID not defined. Please define it.

vi /home/oracle/.bash_profile
ORACLE_HOME=”/u01/app/oracle/product/11.1.0/db_1″; export ORACLE_HOME
ORACLE_SID=”demo1″; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
alias sqlplus=’rlwrap sqlplus’
alias adrci=’rlwrap adrci’

service oraemctl start

rwlrap
yum install compat-readline43
wget -c http://ivan.kartik.sk/oracle/download_from.php?site_id=5
rpm -ivh rlwrap-0.24-rh.i386.rpm

Oracle Enterprise Manager
https://hostname:1158/em
username: system
password is the db user password during the db creation

References:
http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html
http://mdinh.wordpress.com/2007/09/06/oracle-10gr1-install-on-centos-5-notes/
http://ivan.kartik.sk/oracle/install_ora11gR1_elinux.html#st3

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.