yum -y install binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel
############第一台服务器#################
xx.xx.xx.xx kczwda #eth2
xx.xx.xx.xx kczwda-priv #eth1
xx.xx.xx.xx kczwda-vip
############第二台服务器#################
xx.xx.xx.xx kczwdb #eth2
xx.xx.xx.xx kczwdb-priv #eth1
xx.xx.xx.xx kczwdb-vip
############SCAN IP####################
xx.xx.xx.xx scan
groupadd oinstall
groupadd asmadmin
groupadd asmdba
groupadd asmoper
groupadd dba
groupadd oper
useradd -g oinstall -G asmadmin,asmdba,asmoper,dba grid
useradd -g oinstall -G dba,asmdba,oper oracle
a protocol error occurred.change of username or service not allowed:
GRID:
export PS1=['$LOGNAME@'`hostname`:'$PWD'"#>"]
umask 022
export ORACLE_BASE=/app/base #需手工创建
export ORACLE_HOME=/app/grid #需手工创建
export ORACLE_SID=+ASM1 #节点2是+ASM2
export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
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_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
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
ORACLE:
export PS1=['$LOGNAME@'`hostname`:'$PWD'"#>"
umask 022
export ORACLE_BASE=/app/oracle #需手工创建
export ORACLE_HOME=/app/oracle/db
export ORACLE_SID=wdzswdb1
export ORACLE_UNQNAME=wdzswdb
#export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:/app/grid/bin
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export ORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
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:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:/app/grid/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 LIBPATH=$LD_LIBRARY_PATH
#export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
export ORA_GRID_HOME=/oracle/grid
export ORACLE_OWNER=oracle
mkdir -p /app/grid
mkdir -p /app/base
chown -R grid:dba /app
mkdir -p /app/oracle
chown -R oracle:dba /app/oracle
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
session required pam_limits.so
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536
kernel.shmmax = 4294967295
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
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
fs.aio-max-nr = 1048576
ssh-keygen -t rsa
ssh-keygen -t dsa
cat id_rsa.pub >> authorized_keys
cat id_dsa.pub >> authorized_keys
scp authorized_keys kczwda:~/.ssh/authorized_keys
scp authorized_keys kczwdb:~/.ssh/authorized_keys
runcluvfy.sh stage -pre crsinst -n kczwda,kczwdb -fixup -verbose