oracle 11g rac install for linux

selectshen發表於2014-10-30
rhel11g02  --a
pub 123.0.0.103  vip 123.0.0.203 scan 123.0.0.205 priv 124.0.0.103 storage 125.0.0.103
rhel11g03  --b
pub 123.0.0.104  vip 123.0.0.204 priv 124.0.0.104 storage 125.0.0.104

1.--a,b
vi /etc/hosts
123.0.0.103     rhel11g02
123.0.0.104     rhel11g03
123.0.0.203     rhel11g02-vip
123.0.0.204     rhel11g03-vip
123.0.0.205     rhel11g-scan
124.0.0.103     rhel11g02-priv
124.0.0.104     rhel11g03-priv
2.--a,b
[root@rhel11g02 ~]# vi /etc/redhat-release
[root@rhel11g02 ~]# groupadd oinstall
[root@rhel11g02 ~]# groupadd dba
[root@rhel11g02 ~]# useradd -d /home/oracle -g oinstall -G dba oracle
[root@rhel11g02 ~]# passwd oracle
[root@rhel11g02 ~]# id oracle
3.--a,b
vi /home/oracle/.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export GRID_HOME=/u01/app/grid/product/11.2.0/home_1
export ORACLE_SID=rh11g1
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022

[root@rhel11g02 ~]# .  /home/oracle/.bash_profile
4.--a,b
[root@rhel11g02 ~]# mkdir -p /u01/app/oracle /u01/app/grid
[root@rhel11g02 ~]# chown -R oracle.oinstall  /u01/app
[root@rhel11g02 ~]# chmod -R 775 /u01/app


[root@rhel10g03 ~]#vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[root@rhel10g03 ~]# sysctl -p

[root@rhel11g02 ~]# vi /etc/security/limits.conf  
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


[root@rhel10g03 ~]# vi /etc/pam.d/login
session required /lib/security/pam_limits.so

[root@rhel10g03 ~]# vi /etc/rc.local
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180

4.--a,b 267
service iscsi start
chkconfig iscsi on
chkconfig iscsi --list
iscsiadm -m discovery -t sendtargets -p 125.0.0.200:3260
iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.4866fae01dc7 -p 125.0.0.200:3260 -l
iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.4866fae01dc7 -p 125.0.0.200:3260 --op update -n node.startup -v automatic
5.--a
fdisk -l
分割槽ocr,voting,data
--b
partprobe

--a,b
root@rhel11g02 ~]# vi /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="/dev/sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="17",RUN+="/bin/raw /dev/raw/raw1 %M %m"
ACTION=="add", KERNEL=="/dev/sdb2",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="18",RUN+="/bin/raw /dev/raw/raw2 %M %m"
ACTION=="add", KERNEL=="/dev/sdb3",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="19",RUN+="/bin/raw /dev/raw/raw3 %M %m"
ACTION=="add", KERNEL=="/dev/sdb4",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="20",RUN+="/bin/raw /dev/raw/raw4 %M %m"
KERNEL=="raw[1-4]", OWNER="oracle", GROUP="oinstall", MODE="640"

start_udev
ls /dev/raw/ -l

6.--a,b
[root@rhel11g02 ~]# crontab -l
*/15 * * * * /usr/sbin/ntpdate 123.0.0.50 > /home/oracle/ntp.log 2>&1
[root@rhel11g03 ~]# service ntpd stop
[root@rhel11g03 ~]# chkconfig ntpd off
[root@rhel11g03 ~]# mv /etc/ntp.conf /etc/ntp.conf.bak
--[root@rhel11g03 ~]# mv /var/run/ntpd.pid /var/run/ntpd.pid.bak
7.--a
安裝clusterware

[root@rhel11g02 ~]# crsctl check cluster -all
8.--a
安裝資料庫
crsctl check crs
crs_stat -t

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

相關文章