oracle.rac

yum install make binutils libaio libaio-devel libaio-devel elfutils-libelf-devel compat-libstdc++-33 compat libgcc gcc gcc_c++ glibc systat libstdc++ libstdc++-devel unixODBC-devel unixODBC

vi ./vip.sh

#!/bin/bash
 # Written by NetSeek
 # description: Config realserver lo and apply noarp
 WEB_VIP=192.168.88.100
 . /etc/rc.d/init.d/functions
 case "$1" in
start)
        ifconfig lo:0 $WEB_VIP netmask 255.255.255.255 broadcast $WEB_VIP
        /sbin/route add -host $WEB_VIP dev lo:0
        echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore
        echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce
        echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore
        echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce
        sysctl -p >/dev/null 2>&1
        echo "RealServer Start OK"
        ;;
 stop)
        ifconfig lo:0 down
        route del $WEB_VIP >/dev/null 2>&1
        echo "0" >/proc/sys/net/ipv4/conf/lo/arp_ignore
        echo "0" >/proc/sys/net/ipv4/conf/lo/arp_announce
        echo "0" >/proc/sys/net/ipv4/conf/all/arp_ignore
        echo "0" >/proc/sys/net/ipv4/conf/all/arp_announce
        echo "RealServer Stoped"
        ;;
 status)
         # Status of LVS-DR real server.
         islothere=`/sbin/ifconfig lo:0 | grep $WEB_VIP`
         isrothere=`netstat -rn | grep "lo:0" | grep $web_VIP`
         if [ ! "$islothere" -o ! "isrothere" ];then
             # Either the route or the lo:0 device
             # not found.
             echo "LVS-DR real server Stopped."
         else
             echo "LVS-DR Running."
         fi
 ;;
 *)
         # Invalid entry.
         echo "$0: Usage: $0 {start|status|stop}"
         exit 1
 ;;
 esac
 exit 0


chmod a+x ./vip.sh

vi /etc/sysctl.conf

kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4_local_port_range = 1024 65000
net.core.wmen_max = 262144
net.core.wman_default = 262144
net.core.rman_max = 4194304
net.core.rman_default = 4194304


ipcs -ls

vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 2047
oracle hard nofile 65536

vi /etc/profile

if [ $USER = "oracle" ] ; then
     if [ $SHELL = "/bin/ksh" ] ; then
               ulimit -p 16384
               ulimit -n 65536
     else
     ulimit -u 16384 -n 65536
     fi
fi

vi /etc/pam.d/login
session    required     /lib/security/pam_limits.so

vi ./.bash_profile
export PATH
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.0.6/crs_db
export ORA_CRS_HOME=/app/oracle/product/11.0.6/crs
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export ORACLE_SID=racdb1
export NLS_LANG=AMERICAN_AMERIA.zhs16gbk
export NLS_DATA_FORMAT="YYYY-MM-DD HH24:MI:SS"
export PATH=.:${$PATH}:$HOME/bin:$ORCALE_HOME/bin:$ORA_CRS_HOME/bin
export PATH=.:${$PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=.:${$PATH}:$ORACLE_BASE/common/oracle/bin
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


mkdir -p /u01/oracle/product/11.0.6/rac_db
mkdir -p /app/oracrs/product/11.0.6/crs
chown -R  oracle:oinstall /app
chown -R  oracle:oinstall /u01/oracle


建立node1 node2使用oracle用户互相信任
ssh_keygen -t rsa -b 1024

配置iscsi—target
 vi ietd.conf
 vi initiators.allow
/etc/init.d/iscsi-target restart

配置iscsi-client
iscsiadm -m discovery --type sendtargets --portal 192.168.88.130
iscsiadm -m node --loginall=all
iscsiadm -m session
service iscsi restart
fdisk -l


 

你可能感兴趣的:(oracle)