|
Create
"oracle"
User
and
Directories
(both
nodes)
Perform
the
following
tasks
on
all
nodes
in
the
cluster!
You
will
be
using
OCFS2
to
store
the
files
required
to
be
shared
for
the
Oracle
Clusterware
software.
When
using
OCFS2,
the
UID
of
the
UNIX
user
oracle
and
GID
of
the
UNIX
group
dba
should
be
identical
on
all
machines
in
the
cluster.
If
either
the
UID
or
GID
are
different,
the
files
on
the
OCFS
file
system
may
show
up
as "unowned"
or
may
even
be
owned
by a
different
user.
For
this
article,
I
will
use
175
for
the
oracle
UID
and
115
for
the
dba
GID.
Create
Group
and
User
for
Oracle
Let's
continue
our
example
by
creating
the
Unix
dba
group
and
oracle
user
account
along
with
all
appropriate
directories.
# mkdir -p /u01/app
# groupadd -g 115 dba
# useradd -u 175 -g 115 -d /u01/app/oracle -s /bin/bash -c "Oracle Software Owner" -p oracle oracle
# chown -R oracle:dba /u01
# passwd oracle
# su - oracle
Note:
When
you
are
setting
the
Oracle
environment
variables
for
each
RAC
node,
ensure
to
assign
each
RAC
node
a
unique
Oracle
SID!
For
this
example,
I
used:
- linux1 : ORACLE_SID=orcl1
- linux2 : ORACLE_SID=orcl2
After
creating
the
"oracle"
UNIX
userid
on
both
nodes,
ensure
that
the
environment
is
setup
correctly
by
using
the
following
.bash_profile:
....................................
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
alias ls="ls -FA"
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/crs
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
# Each RAC node must have a unique ORACLE_SID. (i.e. orcl1, orcl2,...)
export ORACLE_SID=orcl1
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
....................................
Create
Mount
Point
for
OCFS2
/
Clusterware
Finally,
create
the
mount
point
for
the
OCFS2
filesystem
that
will
be
used
to
store
the
two
Oracle
Clusterware
shared
files.
These
commands
will
need
to
be
run
as
the
"root"
user
account:
$ su -
# mkdir -p /u02/oradata/orcl
# chown -R oracle:dba /u02
Ensure
Adequate
temp
Space
for
OUI
Note:
The
Oracle
Universal
Installer
(OUI)
requires
at
most
400MB
of
free
space
in
the
/tmp
directory.
You
can
check
the
available
space
in
/tmp
by
running
the
following
command:
# cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 2031608 0 -1
-OR-
# cat /proc/meminfo | grep SwapTotal
SwapTotal: 2031608 kB
If
for
some
reason
you
do
not
have
enough
space
in
/tmp,
you
can
temporarily
create
space
in
another
file
system
and
point
your
TEMP
and
TMPDIR
to
it
for
the
duration
of
the
install.
Here
are
the
steps
to
do
this:
# su -
# mkdir /<AnotherFilesystem>/tmp
# chown root.root /<AnotherFilesystem>/tmp
# chmod 1777 /<AnotherFilesystem>/tmp
# export TEMP=/<AnotherFilesystem>/tmp # used by Oracle
# export TMPDIR=/<AnotherFilesystem>/tmp # used by Linux programs
# like the linker "ld"
When
the
installation
of
Oracle
is
complete,
you
can
remove
the
temporary
directory
using
the
following:
# su -
# rmdir /<AnotherFilesystem>/tmp
# unset TEMP
# unset TMPDIR
|