Oracle 10g, Xen, and Squeeze

Debian Wiki entry is good starting point for installation: http://wiki.debian.org/DataBase/Oracle.

Another interesting tutorial is here: http://www.linuxinsight.com/oracle10g_on_debian.html.

Important points to take care of:

  • Create .profile file for oracle user
umask 0022
export ORACLE_BASE=/opt/oracle/
export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
export EMHOSTNAME=oracle
export DISABLE_HUGETLBFS=1
export ORACLE_TERM=xterm
if [ -z $LD_LIBRARY_PATH ]
then
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
else
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
fi
if [ -z $CLASSPATH ]
then
 CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
 CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
else
 CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib
 CLASSPATH=$CLASSPATH:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export CLASSPATH
fi
  • Don’t create database when installing Oracle.
  • Ignore “collector” error, just click continue.
  • After installation, create simple wrapper to disable HUGE TABLE FS. 
cd $ORACLE_HOME/bin
mv oracle oracle.bin 
cat >oracle <<"EOF"
 #!/bin/bash  
export DISABLE_HUGETLBFS=1 
exec $ORACLE_HOME/bin/oracle.bin $@ 
EOF  
chmod +x oracle
  • Execute dbca and create database.
  • Change ORACLE_HOME_LISTNER in $ORACLE_HOME/bin/dbstart to $ORACLE_HOME
  • Create /etc/init.d/oradb script to control Oracle start and stop
#!/bin/sh 
ORA_HOME=/opt/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
test -f $ORA_HOME/bin/dbstart || exit 0
case "$1" in
	'start')
	   su - oracle -c "$ORA_HOME/bin/dbstart $ORA_HOME" &
   	;;
	'stop')
	   su - oracle -c "$ORA_HOME/bin/dbshut $ORA_HOME" &
   	;;
esac
  • Don’t forget to execute if you create /etc/init.d/oradb
# update-rc.d oradb defaults
  • to start Database Manager Console
oracle@oracle:~$ emctl start dbconsole 
  • last but not least, trailing / in $ORACLE_HOME breaks installation.
Advertisements
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s