11 g rac 安裝 4步

tom_xieym發表於2011-08-05
四. 核心引數及環境變更設定
4.1 cat /etc/sysctl.conf
加入以下內容,兩個node執行
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 34359738368
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
4.2 cat /etc/security/limit.conf
加入以下內容,兩個node執行
grid soft nproc 2047
grid hard nproc 32768
grid soft nofile 1024
grid hard nofile 250000
oracle soft nproc 2047
oracle hard nproc 32768
oracle soft nofile 1024
oracle hard nofile 250000
4.3 cat /etc/pam.d/login
加入以下內容,兩個node執行
session    required     pam_limits.so
4.4 cat /etc/profile
加入以下內容,兩個node執行
if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then
   if [ \$SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
   else
        ulimit -u 16384 -n 65536
   fi
   umask 022
fi
4.5 cat /home/grid/.bash_profile
切換到grid使用者,並修改/home/grid/.bash_profile(兩個node執行)
[grid@wmrac01 ~]$ cat /home/grid/.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:/bin:/sbin:/usr/bin:/usr/sbin
BASH_ENV=$HOME/.BASHRC
export BASH_ENV PATH
unset USERNAME
export TEMP=/tmp
export TMPDIR=/tmp
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=+ASM[1|2] (注:node1->+ASM1,node2->+ASM2)
ORACLE_BASE=/u01/product/grid/crs; export ORACLE_BASE
ORACLE_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH
set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';
4.6 cat /home/oracle/.bash_profile
切換到oracle使用者,並修改/home/oracle/.bash_profile(兩個node執行)
[oracle@wmrac01 ~]$ cat /home/oracle/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
BASH_ENV=$HOME/.BASHRC
export BASH_ENV
export TEMP=/tmp
export TMPDIR=/tmp
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin
PATH=${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/product/common/oracle/bin
export PATH
export ORACLE_SID=Poland[1|2] (注:node1->poland1,node2->poland2)
ORACLE_BASE=/u01/product/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1; export ORACLE_HOME
ORACLE_TERM=vt100;export ORACLE_TERM
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATH
#GRID_BASE=/u01/product/grid/crs; export ORACLE_BASE
#GRID_HOME=/u01/product/grid/11.2.0; export ORACLE_HOME
#export PATH=$GRID_HOME/bin:$PATH
JAVA_HOME=/usr/local/java;export JAVA_HOME
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
set -u
#PS1=`hostname`'$';export PS1
PS1=`hostname`'$';export PS1
EDITOR=/bin/vi; export EDITOR
alias ll='ls -l';
alias ls='ls --color';
alias his='history';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-704179/,如需轉載,請註明出處,否則將追究法律責任。

相關文章