rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" binutils \
compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc \
glibc-common glibc-devel-2.5 libaio libaio-devel libgcc libstdc++ libstdc++-devel \
make sysstat unixODBC glibc-headers unixODBC-devel oracleasm oracleasmlib oracleasm-support |grep not
其中oracleasm oracleasmlib oracleasm-support可以从官网下载:
http://www.oracle.com/technetwork/topics/linux/downloads/rhel5-084877.html
当然如果不用asm存储管理的话,就不必下载asm包!!
2.1向/etc/sysctl.conf 添加或修改如下参数: kernel.shmmax = 48719476736
kernel.sem = 250 32000 200 200
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
net.core.rmem_max = 4194304
2.2 向/etc/security/limits.conf 添加如下参数:
2.3 向/etc/pam.d/login 添加如下参数: session required pam_limits.so
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -u 601 -g oinstall -G dba,asmdba,asmadmin oracle
mkdir -p /opt/rac/11.2.0/grid
chown -R grid:oinstall /opt/rac
chown -R oracle:oinstall /opt/rac/oracle
PATH=$PATH:$HOME/bin:/opt/rac/grid/opatch/OPatch
export PS1=$LOGNAME@`hostname`:'$PWD>'
export ORACLE_BASE=/opt/rac/grid
export ORACLE_HOME=/opt/rac/11.2.0/grid
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export SQLPATH=/home/oracle/admin/sql:$ORACLE_HOME/sqlplus/ADMIN:~/admin/sql
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export ORA_CRS_HOME=/opt/rac/11.2.0/grid
alias sql='sqlplus "/ as sysasm"'
alias sqln="sqlplus /nolog"
alias tf="tail -f /opt/rac/grid/diag/asm/+asm/+ASM2/trace/alert_+ASM2.log"
alias crsdl="tail -f /opt/rac/11.2.0/grid/log/dbname/crsd/crsd.log"
alias cssdl="tail -f /opt/rac/11.2.0/grid/log/dbname/cssd/ocssd.log"
alias gridl="tail -f /opt/rac/11.2.0/grid/log/dbname/alert_dbname.log"
echo -e "${esc}31;1m******************************************************************${esc}0m"
echo -e "${esc}31;1m**This is RAC TEST ASM, Please be careful of your operation!***${esc}0m"
echo -e "${esc}31;1m******************************************************************${esc}0m"
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
# User specific environment and startup programs
PATH=$PATH:$HOME/bin:/opt/rac/oracle/opatch/OPatch
export PS1=$LOGNAME@`hostname`:'$PWD>'
export ORACLE_BASE=/opt/rac/oracle
export ORACLE_HOME=$ORACLE_BASE/11.2.0/db
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export PS1=$LOGNAME@`hostname`:'$PWD>'
export SQLPATH=$ORACLE_HOME/sqlplus/admin:/home/oracle/admin/sql
alias bdump="cd /opt/rac/oracle/diag/rdbms/orcl/rac1/trace/"
alias udump="cd /opt/rac/oracle/diag/rdbms/orcl/rac1/trace/"
alias home="cd $ORACLE_HOME"
alias tf="tail -f /opt/rac/oracle/diag/rdbms/orcl/rac1/trace/alert_rac1.log"
alias sqln="sqlplus /nolog"
ulimit -u 16384 -n 63536 #linux
tty -s && stty erase '^H'
echo -e "${esc}31;1m******************************************************************${esc}0m"
echo -e "${esc}31;1m***This is a TEST ENV , Please be careful of your operation!***${esc}0m"
echo -e "${esc}31;1m******************************************************************${esc}0m"
--同步ntpd,模板里已有,不需要修改,根据自己的情况调整
修改文件/etc/ntp.conf,添加如下信息,ntp1 为时间同步服务器
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid" --加入 -x
6 修改 /etc/rc.local文件:添加如下语句: modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180
7.配置asm configure,如果选择使用asm做存储的话需要此步骤!
--注意oracleasm的版本,必须和uname -r的版本一致
/etc/init.d/oracleasm configure -i
做完以上工作基本上可以进行oracle rac 或者database的安装了!