this is the first time I have submitted a Tutorial (intact somebody on on dev list suggested I should post it docs list)
as I am not aware procedure or approval cycle pl guide me in this case
Regards, Gaurav gaurav wrote:
Hi,
I have written a tutorial on installing Oracle 9i on FC3. Basically 9i installation on RAS 1,2,3 RH 9, fc1, fc 2 is documented fairly well but its hard to find anything worth while on FC3, some people even suggested installing Oracle 9i on FC3 is not possible !! .This How to attempts to condense all my experience /findings with any such info peculiar to FC3 which scattered all over web in to one concise but useful Doc.
Regards, Gaurav
------------------------------------------------------------------------
Oracle 9i under Fedora Core 3 - Installation How to
Gaurav gauravpd@xxxxxxxxx <mailto:gauravpd@xxxxxxxxx>
v1.0-pre1, April 1, 2005
------------------------------------------------------------------------
This tutorial describes how to install Oracle 9i on Fedora Core 3 (or greater)
------------------------------------------------------------------------
*Table of Contents*
Oracle 9i under Fedora Core 3 - Installation How to 1
1. Introduction 2
1.1 Acknowledgments 3
1.2 Revision History 3
1.3 New versions of this document 3
1.4 Feedback 3
1.5 Distribution Policy 3
2. Get Oracle 9i 5
2.1 CD Installation 5
2.2 Download 5
3. Create users and Directories 5
3.1 Create users and groups 5
3.2 Create the directories 5
4. Set Environmental variables 6
4.1 Edit .bash_profile 6
5. Set Kernel Parameters 7
5.1 Edit /etc/sysctl.conf 7
5.2 Edit /etc/security/limits.conf 7
6. Install GCC 2.9 Compat libraries 7
6.1 Install GCC 2.96 Compat packages 7
6.2 Create symbolic links 8
7. Run Installer 8
7.1 Apply libwait.c patch 8
7.2 Export Display variable 9
7.3 Finally Run the Installation 9
7.4 Fix nodeinfo 9
7. Startup script 10
Miscellaneous Errors 11
1. Introduction
This tutorial was written due to my frustration on installing Oracle 9i on FC3. Basically 9i installation on RAS 1,2,3 RH 9, fc1, fc 2 is documented fairly well but its hard to find anything worth while on FC3 , some people even suggested installing Oracle 9i on FC3 is not possible !! . This How to attempts to condense all my experience /findings with any such info peculiar to FC3 which scattered all over web in to one concise but useful Doc.
I hope you might find this short tutorial useful
If you need to install Oracle 9i on FC3 than you must know/ look at following fact
*
Fedora is not *Officially Supported* by Oracle Corp
*
Oracle 9i installation is difficult but *possible *in FC3
*
Oracle 9i CANNOT be linked with the libraries used by gcc 3.4 Under FC3, you need to use, (its only possible thru Fc2 compat library)
*
Oracle 10 G installation method does NOT WORKS with 9i
*
This How to deals with Red hat products >= f3 or higher or gcc version greater than 2.9 other wise if you are installing any other Redhat product you might want look at other exellent tutorials at (http://www.puschitz.com/OracleOnLinux.shtml , http://oracle-base.com/ )
also
*
This howto is aim to assist you only ...there is NOTHING OFFICIAL about !! so i am not responsible if
*
I am not a DBA ..so do not mail me Help pl!! types mail (a better place would be Oracle forums ) , but any suggestion or improvement in How to is appreciated
*
Next probable step for me is to write some bash or Perl scripts to fully automate this tideous and boring , frustrating, manual process but that depends on spare time I get , your inputs are welcome :-)
1.1 Acknowledgments
I would like to thank Jean Francois for helping me out on most tricky part
1.2 Revision History
Version 1.0-pre1 – March 25, 2005.
Version 1.1 -April 1,2005 added miscellaneous errors section
1.3 New versions of this document
The latest version can be found at http://www.pagux.com/oracle9ionfedora3.html <http://www.alsa-project.org/%7Evalentyn>
1.4 Feedback
I rely on you, the reader, to make this HOWTO useful. If you have any suggestions, corrections or comments, please send them to me ( gauravpd@xxxxxxxxx <mailto:alsa-howto@xxxxxxxxxxxxxxxx>), and I will try to incorporate them in the next revision.
1.5 Distribution Policy
Copyright 2005/2006 Gaurav Prasad
This HOWTO is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This document is distributed in the hope that it will be useful, but *without any warranty*; without even the implied warranty of *merchantability* or *fitness for a particular purpose*. See the GNU General Public License for more details.
You can obtain a copy of the GNU General Public License by writing to the Free Software Foundation <http://www.fsf.org/>, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2. Get Oracle 9i
2.1 CD Installation
*
If you got Oracle 9i CD then mount it
*
mkisofs -r -o ora9id1.iso Disk1/,loop=/dev/loop0 cd_image mount_dir
2.2 Download
*
Otherwise download it from
*
otn.*oracle*.com/software/products/ *oracle9i*/htdocs/*linux*soft.html ( You will need to following)
*
Extract all three files as
*
gunzip ship_9204_linux_disk1.cpio
*
cpio -idmv -I ship_9204_linux_disk1.cpio (Dont forget -I option other wise it give error during extraction )
*
This will expand to folder Disk1 (Repeat the process other two files)
3. Create users and Directories
3.1 Create users and groups
groupadd oinstall groupadd dba groupadd oper groupadd apache
useradd -g oinstall -G dba oracle passwd oracle
3.2 Create the directories
in which the Oracle software will be installed:
|*mkdir /u01 /u02*| |*chown oracle.dba /u01 /u02*| |*chmod 755 /u01 /u02*|
4. Set Environmental variables
4.1 Edit .bash_profile
*
Log as oracle user
*
su – oracle
*
Edit .bash_profile
*
vim .bash_profile add following
############################################################################ ############################ Oracle Variables###################################### echo " Wel come to oracle"; ORACLE_BASE=/u01/app/oracle ORACLE_OWNER=oracle; export ORACLE_OWNER ORACLE_TERM=xterm; export ORACLE_TERM ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.0 ORACLE_SID=ORTD LD_PRELOAD=$HOME/libcwait.so export DISPLAY=172.28.66.39:0.0 PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL THREADS_FLAG=native; export THREADS_FLAG TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR
export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_PRELOAD ###############################Oracle##################################
5. Set Kernel Parameters
5.1 Edit /etc/sysctl.conf
*
Add following lines can be added to the /etc/sysctl.conf file:
kernel.shmmax = 2147483648 kernel.shmmni = 128 kernel.shmall = 2097152 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000
5.2 Edit /etc/security/limits.conf
*
In addition the following lines can be added to the /etc/security/limits.conf file:
oracle soft nofile 65536 oracle hard nofile 65536 oracle soft nproc 16384 oracle hard nproc 16384
*
Adding lines into these files requires a reboot before they take effect.
6. Install GCC 2.9 Compat libraries
6.1 Install GCC 2.96 Compat packages
*
From Fedora Core TWO (note if newer FC3 packages are installed use rpm -i –force )
compat-libstdc++-7.3-2.96 compat-libstdc++-devel-7.3-2.96 compat-gcc-7.3-2.96.118.i386.rpm compat-gcc-c++-7.3-2.96
*
From Fedora Core THREE
compat-db
*
If don't install GCC compat libraries as above you get zillion linking error
6.2 Create symbolic links
*
Put gcc296 and g++296 first in $PATH variable by creating the following symbolic links:
mv /usr/bin/gcc /usr/bin/gcc323 mv /usr/bin/g++ /usr/bin/g++323 ln -s /usr/bin/gcc296 /usr/bin/gcc ln -s /usr/bin/g++296 /usr/bin/g++
7. Run Installer
7.1 Apply libwait.c patch
*
Before you run installer you do following to over come some weird errors
*
Complie libwait.c (in /home/oracle)
*
Save this as libcwait.c and do as explained in the comment:
/* Compile with
gcc -shared -o libcwait.so libcwait.c -fpic -O
and use it by adding
LD_PRELOAD=/path/to/libcwait.so
in the environment of the application with the bug.
*/ #include <errno.h> #include <sys/syscall.h> #include <sys/types.h> #include <sys/wait.h> pid_t __libc_wait (int *status) { int res; asm volatile ("pushl %%ebx\n\t" "movl %2, %%ebx\n\t" "movl %1, %%eax\n\t" "int $0x80\n\t" "popl %%ebx" : "=a" (res) : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0), "S" (0)); return res; }
*
Compile gcc -shared -o libcwait.so libcwait.c -fpic -O
*
Then do export LD_PRELOAD=/home/oracle/libcwait.so
7.2 Export Display variable
*
|xhost +localhost export DISPLAY=localhost:0.0|
*
|if above doest work take vnc connection to server and run installation (su – oracle and the vncserver to start vncserver)|
|*7.3 Finally Run the Installation*|
*
/path/to/oracle/Disk1/runInstaller
*
Now carry with Graphical setup (if you are not sure choose Standard database )...from here its really easy
7.4 Fix nodeinfo
*
Now installation should proceed without any linking errors but you will get one error in end
Parameter "nodeinfo" = NO_VALUE Agent Service Failed
*
For do this after setup
*
netca & (this run wizard)
*
cd $ORACLE_HOME and run ./lsnrctl start
*
check if its running $ ps afx | grep LISTEN | grep -v grep
7. Startup script
*
You have to write startup a script so that oracle can automatically be started as reboot and easily control service using service command
*
create a start up a start script as following
*
vim /etc/init.d/oracle
*
add following to it
#!/bin/bash # # Run-level Startup script for the Oracle Instance and Listener # # chkconfig: 345 91 19 # description: Startup/Shutdown Oracle listener and instance
ORA_HOME="/u01/app/oracle/product/9.2.0.1.0" ORA_OWNR="oracle"
# if the executables do not exist -- display error
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ] then echo "Oracle startup: cannot start" exit 1 fi
# depending on parameter -- startup, shutdown, restart # of the instance and listener or usage display
case "$1" in
start)
# Setting up kernel parameters #echo 100 32000 100 100 > /proc/sys/kernel/sem
#echo 2147483648 > /proc/sys/kernel/shmmax
#echo 4096 > /proc/sys/kernel/shmmni
#echo 2097152 > /proc/sys/kernel/shmall
#echo 65536 > /proc/sys/fs/file-max
#ulimit -n 65536
#echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
#ulimit -u 16384
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
touch /var/lock/subsys/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 start|stop|restart|reload"
exit 1
esac
exit 0
*
Now run command chkconfig oracle (this will create init scripts)
*
now service oracle start|stop|restart should work
Miscellaneous Errors
*ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist Linux Error: 2: No such file or directory *
This error happens when you reboot and try to login ... you will get lot of errors as database instance is not mounted/started automatically
*Step 1*
In /etc/oratab If you have:
*:/opt/oracle/OraHome1:N
ordb:/opt/oracle/OraHome1:N
edit it to *:/opt/oracle/OraHome1:Y ordb:/opt/oracle/OraHome1:Y
here N means No and Y means Yes ....so you basically asking database to start automatically when you reboot or stop service
*Step 2 *
after that try to initialize database
$ORACLE_HOME/bin/dbstart
if you get error
*No start entry for SID * at /opt/oracle/OraHome1 in /etc/oratab*
this might be due a bug in dbstart script looking at sid file wrong place then -> cp $ORACLE_BASE/admin/$ORACLE_SID/pfile/init_*.ora $ORACLE_HOME/dbs/init$ORACLE_SID.ora
and $ sqlplus '/ as sysdba' SQL> create pfile from spfile; SQL> exit run the db start script $ORACLE_HOME/bin/dbstart
|*if you reached this state with any errors the Congrats !! Relax :-) ...Go have a cup of coffee or call your girl friend *|