You are on page 1of 58

Oracle RAC

RACLinux + Oracle 11g R2 RAC


:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Linux + Oracle 11g R2 RAC

Version: <1.0>
mail:176140749@qq.com

(V2.0)

IT

PU

(w

ww
.i
t

pu
x.

co
m)

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

1 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

co
m)

1 Oracle11gR2 ..........................................................................................................4
1.1 ............................................................................................................................... 4
1.2 ................................................................................................................... 4
2 Oracle11gR2 ..........................................................................................................4
2.1 ....................................................................................................................... 4
2.2 ............................................................................................................................... 4
2.3 hosts ...............................................................................................................................6
2.4 ............................................................................................................................... 6
2.5 ............................................................................................................................... 7
2.6 ....................................................................................................................... 8
2.7 grid oracle ......................................................................................... 11
2.8 ..................................................................................................................... 14
2.9 ..................................................................................................................................... 15
2.10 Xmanager Linux.......................................................................................... 16
2.11 VNC Sever Linux........................................................................................ 18
2.11.1 VNC .................................................................................................... 18
2.11.2 VNC ............................................................................................................ 18
2.11.3 VNC ..................................................................19
2.11.4 VNC ............................................................................................................ 19
2.11.5 VNC KDE GNOME .......................................... 20
2.11.6 ...............................................................................................................21
2.11.7 VNC .................................................................................................21
2.11.8 VNC .................................................................................................21
3 11gR2 Grid Infrastructure ..................................................................................................... 23
3.1 ............................................................................................................................. 23
3.2 GRID.......................................................................................................................... 23
3.3 ................................................................................................. 25
3.4 SCAN..................................................................................................................................26
3.5 IP SSH .......................................................................................................... 27
3.6 ..................................................................................................................................... 27
3.7 asm..............................................................................................................28
3.8 asm .............................................................................................................................29
3.9 ......................................................................................................................... 30
3.10 ORACLE_BASE ORACLE_HOME.......................................................................... 30
3.11 ........................................................................................................................... 31
3.12 ................................................................................................................................... 32
3.13 orainstRoot.sh root.sh.................................................................. 32
3.14 ............................................................................................................... 38
4 ASM .................................................................................................................................. 39
5 ORACLE 11gR2 ....................................................................................................... 41
5.1 ............................................................................................................................. 41
5.2 , install database software only.................................................................... 42
5.3 ............................................................................................................................. 43
5.4 ............................................................................................................................. 44
5.5 ......................................................................................................................... 45

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

2 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

IT

PU

(w

ww
.i
t

pu
x.

co
m)

5.6 ..................................................................................................................................... 46
5.7 ..................................................................................................................................... 47
5.8 root.sh ....................................................................................... 48
6 Oracle 11gR2 .............................................................................................................49
6.1 dbca ........................................................................................................49
6.2 Create database............................................................................................................ 49
6.3 ..................................................................................................................... 50
6.4 Global Database NameSid Prefix.................................................................... 51
6.5 EM...................................................................................................................................... 51
6.6 Use the Same Password for all Accounts.....................................................................52
6.7 Automatic Storage Management (ASM)..................................................................... 52
6.8 ......................................................................................................................... 52
6.9 ......................................................................................................................... 53
6.10 ....................................................................................................................... 54
6.11 ....................................................................................................................... 55
6.12 ............................................................................................................... 56
6.13 ....................................................................................................................... 56
6.14 ....................................................................................................................... 56
6.15 ....................................................................................................................... 57

Version: <1.0>
mail:176140749@qq.com

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

3 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

1 Oracle11gR2

1.1

Oracle Enterprise Linux Server release 5.5 X86 4G

Oracle Database 11.2.0.1 or 11.2.0.2 or 11.2.0.3

ASM

1.2

Oracle

linux_11gR2_database_1of2

linux_11gR2_database_2of2

linux_11gR2_grid

co
m)

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

pu
x.

2 Oracle11gR2

ww
.i
t

2.1

(w

2.2

LINUX AS 5.5 32

PU

IT

Supported Oracle Linux 6 and Red Hat Enterprise Linux 6 Distributions for x86-64
Supported Oracle Linux 5 and Red Hat Enterprise Linux 5 Distributions for x86-64

Supported SUSE Distributions for x86-64

[root@rac1 /]# lsb_release -a


LSB Version:

:core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

4 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

Distributor ID: EnterpriseEnterpriseServer


Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)

Release:

5.5

Codename:

Carthage

Description:

/mnt yum

[root@rac1 /]# vi /etc/yum.conf

[EL]

name =Linux 5.5 DVD

baseurl=file:///mnt/Server/

gpgcheck=0

enabled=1

yum install binutils -y


yum install compat-libcap1 -y

yum install gcc -y

ww
.i
t

yum install gcc-c++ -y

pu
x.

yum install compat-libstdc++-33 -y

co
m)

# From Public Yum or ULN

yum install glibc -y

(w

yum install glibc-devel -y

yum install ksh -y

yum install libgcc -y

yum install libstdc++ -y

PU

yum install libstdc++-devel -y

IT

yum install libaio -y

yum install libaio-devel -y


yum install libXext -y
yum install libXtst -y
yum install libX11 -y
yum install libXau -y
yum install libxcb -y
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

5 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

yum install libXi -y


yum install make -y
yum install sysstat -y

yum install unixODBC -y

yum install unixODBC-devel -y

ASMLIB oracle

oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm

oracleasmlib-2.1.0.4-1.el5.i386.rpm

oracleasm-support-2.1.7-1.el5.i386.rpm

We've made a lot of changes, so it's worth doing a reboot of the VM at this point to make

sure all the changes have taken effect.


# shutdown -r now

ORACLE LINUX
yum install oracle-validated

LINUX

co
m)

sqlplus rman rlwrap-0.41.tar


rlwrap-0.41.tar

pu
x.

2.3 hosts

/etc/hosts

ww
.i
t

127.0.0.1 localhost.localdomain localhost

IT

PU

(w

#public ip
192.168.10.211 rac1
192.168.10.212rac2
#priv ip
10.10.10.211 rac1prv
10.10.10.212rac2prv
#vip ip
192.168.10.213 rac1vip
192.168.10.214rac2vip
#scan ip
192.168.10.215 racscan

2.4

/usr/sbin/groupadd -g 501 oinstall


/usr/sbin/groupadd -g 502 dba
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

6 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

[root@ora1 ~]# id oracle


uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),506(asmdba)

/usr/sbin/groupadd -g 503 oper


/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid

[root@ora1 ~]# id grid


uid=502(grid) gid=501(oinstall)
groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmoper),506(asmdba)

mkdir -p /oracle/app/grid

mkdir -p /oracle/app/11.2.0/grid

chown -R grid:oinstall /oracle/

mkdir -p /oracle/app/oraInventory

co
m)

chown -R grid:oinstall /oracle/app/oraInventory

mkdir -p /oracle/app/oracle

pu
x.

chown -R oracle:oinstall /oracle/app/oracle

ww
.i
t

chmod -R 775 /oracle

passwd grid

passwd oracle

(w

oracle,grid ssh

PU

2.5

IT

/oracle oracle grid


/soft
[grid@rac1:/home/grid]$df -h
Filesystem

Size

/dev/sda1

20G

4.1G

15G

1.9G

643M

1.3G

tmpfs

Used Avail Use% Mounted on


22% /
34% /dev/shm

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

7 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

/dev/sdc1

38G

9.5G

27G

27% /oracle

/dev/sdb1

40G

9.0G

29G

24% /soft

Version: <1.0>
mail:176140749@qq.com

uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),506(asmdba)

[root@ora1 ~]# id grid

gid=501(oinstall)

uid=502(grid)

groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmoper),506(asmdba)

pu
x.

2.6

co
m)

mkdir -p /oracle/app/oracle
chown -R oracle:oinstall /oracle/app/oracle
chmod -R 775 /oracle

mkdir -p /oracle/app/oraInventory
chown -R grid:oinstall /oracle/app/oraInventory

mkdir -p /oracle/app/grid
mkdir -p /oracle/app/12.1.0.1/grid
chown -R grid:oinstall /oracle

ww
.i
t

1/etc/security/limits.conf

soft

nproc

2047

hard

nproc

16384

grid

soft

nofile

1024

PU

grid

grid

hard

nofile

65536

oracle

soft

nproc

2047

oracle

hard

nproc

16384

oracle

soft

nofile

1024

oracle

hard

nofile

65536

IT

grid

(w

vi /etc/security/limits.conf

#ORACLE SETTING

[root@ora1 ~]# id oracle

2 SELINUX
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

8 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

Change the setting of SELinux to permissive by editing the "/etc/selinux/config" file,


making sure the SELINUX flag is set as follows.

SELINUX=permissive

SELINUX

setenforce 0

3 iptables

If you have the Linux firewall enabled, you will need to disable or configure it, as shown

here or here. The following is an example of disabling the firewall.

# service iptables stop

# chkconfig iptables off

co
m)

4/etc/pam.d/login

#ORACLE SETTING
required

pam_limits.so

(w

session

ww
.i
t

pu
x.

vi /etc/pam.d/login

5 sysctl.conf

# vi /etc/sysctl.conf

PU

#ORACLE SETTING

IT

fs.aio-max-nr = 1048576

fs.file-max = 6815744
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

9 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144

net.core.wmem_max = 1048586

sysctl -p

6shm

/dev/shm

none

/dev/shm

tmpfs

defaults

/dev/shm

tmpfs

defaults,size=2048m

0 0

co
m)

none

/dev/shm 1GB/etc/fstab

0 0

size G size2G

# umount /dev/shm

(w

# mount -a

ww
.i
t

# mount -o remount /dev/shm

pu
x.

mount /dev/shm

"df -h"

PU

7 ntp

IT

gird (11gR2 )

#Network Time Protocol Setting


/sbin/service ntpd stop
chkconfig ntpd off
rm /etc/ntp.conf
mv /etc/ntp.conf to /etc/ntp.conf.org

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

10 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

2.7 grid oracle


home .profile

su - grid

grid

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE

ORACLE_HOME=/oracle/app/11.2.0/grid; export ORACLE_HOME

ORACLE_SID=+ASM1; export ORACLE_SID

NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT

co
m)

THREADS_FLAG=native; export THREADS_FLAG

PATH=$ORACLE_HOME/bin:$PATH; export PATH

THREADS_FLAG=native; export THREADS_FLAG

ww
.i
t

pu
x.

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG

PATH=$ORACLE_HOME/bin:$PATH; export PATH

(w

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384
ulimit -n 65536

PU

else

IT

ulimit -u 16384 -n 65536


fi
umask 022

Fi

su - oracle
oracle
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

11 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

# Oracle Settings oracle


TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME

ORACLE_SID=racdb1; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

co
m)

CLASSPATH

export

NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT

pu
x.

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG

ww
.i
t

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then


if [ $SHELL = "/bin/ksh" ]; then

(w

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

umask 022

IT

PU

fi

fi

su - grid
grid
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

12 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_SID=+ASM2; export ORACLE_SID

ORACLE_BASE=/oracle/app/grid; export ORACLE_BASE

ORACLE_HOME=/oracle/app/11.2.0/grid; export ORACLE_HOME

NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT

THREADS_FLAG=native; export THREADS_FLAG

PATH=$ORACLE_HOME/bin:$PATH; export PATH

co
m)

PATH=$ORACLE_HOME/bin:$PATH; export PATH

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG

THREADS_FLAG=native; export THREADS_FLAG

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

ulimit -p 16384

pu
x.

if [ $SHELL = "/bin/ksh" ]; then

ww
.i
t

ulimit -n 65536
else

(w

ulimit -u 16384 -n 65536

fi

PU

fi

umask 022

IT

su - oracle

# Oracle Settings oracle


TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/oracle/app/oracle; export ORACLE_BASE


),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

13 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

ORACLE_HOME=$ORACLE_BASE/product/11.2.0; export ORACLE_HOME


ORACLE_SID=racdb2; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=/usr/sbin:$PATH; export PATH

CLASSPATH

NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT

export

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH

PATH=$ORACLE_HOME/bin:$PATH; export PATH

NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG

ulimit -p 16384
ulimit -n 65536

pu
x.

else

co
m)

if [ $SHELL = "/bin/ksh" ]; then

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then

fi
umask 022

(w

Fi

ww
.i
t

ulimit -u 16384 -n 65536

2.8

PU

IT

2GB 8GB 2GB

8GB
100%

2.9
1
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

14 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

DGDATA

/dev/sde

20GB

DGRECOVER /dev/sdf

10GB

spfile,

2 fdisk

configure

3 ASM
[root@rac1 rpmpage]# /etc/init.d/oracleasm

co
m)

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
The current values

pu
x.

loaded on boot and what permissions it will have.


will be shown in brackets ('[]').

Hitting <ENTER> without typing an

ww
.i
t

answer will keep that current value.

Ctrl-C will abort.

(w

Default user to own the driver interface []: grid

Default group to own the driver interface []: asmadmin


Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

PU

Writing Oracle ASM library driver configuration: done

IT

Initializing the Oracle ASMLib driver: [

OK

Scanning the system for Oracle ASMLib disks: [

3G

/dev/sdd

grid

size

ASM

Version: <1.0>
mail:176140749@qq.com

]
OK

[root@rac1 soft]# /etc/init.d/oracleasm createdisk CRS1 /dev/sdd1


[root@rac1 soft]# /etc/init.d/oracleasm createdisk DATA1 /dev/sde1
[root@rac1 soft]# /etc/init.d/oracleasm createdisk ARCH1 /dev/sdf1

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

15 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

[root@rac1 ~]# /etc/init.d/oracleasm scandisks


Scanning the system for Oracle ASMLib disks: [

OK

[root@rac1 soft]# /etc/init.d/oracleasm listdisks

ARCH1

CRS1

DATA1

OK

Scanning the system for Oracle ASMLib disks: [

[root@rac2 ~]# /etc/init.d/oracleasm scandisks

[root@rac2 ~]# /etc/init.d/oracleasm listdisks

ARCH1
CRS1

co
m)

DATA1

pu
x.

2.10
2.10 Xmanager Linux
Xstart Xbrowser

ww
.i
t

Linux /etc/X11/xdm/Xaccess
#*

#any host can get a login window

(w

#
*

#any host can get a login window

: linux /etc/X11/xdm xdm X11 xdm


Redhat linux

IT

PU

yum -y install xdm

vi /etc/inittab
id:5:initdefault: // 5 5
id:5:respawn:/usr/sbin/gdm //

1/etc/gdm/custom.conf,
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

16 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

[daemon]
[security]

AllowRemoteRoot=true

[xdmcp]

Port=177

Enable=1

[gui]

[greeter]

[chooser]

[debug]

[servers]

custom.conf gdm.conf

co
m)

cp custom.conf gdm.conf gdm.conf


gdm-restart

pu
x.

init 3
init 5

ww
.i
t

(w

netstat -an|grep 177 177 xmanager

Linux Oracle

PU

/etc/sysconfig/iptables ()

IT

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 6000:6010 -j ACCEPT

service iptables restart

-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT

2.11 VNC Sever Linux

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

17 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

VNC Server windows

VNC

2.11.1

Red Hat Enterprise Linux VNC

VNC VNC

[root@rac1 ~]# # rpm -q vnc-server

vnc-server-4.1.2-9.el5

[root@rac1 ~]#

, Server VNC RPM

VNC

2.11.2

rpm -ivh /mnt/Server/vnc-server-4.1.2-9.el5.x86_64.rpm

vnc-server-4.1.2-9.el5.x86_64.rpm

co
m)

vncserver VNC vncserver :


1

[root@rac1 ~]# vncserver :1

pu
x.

ww
.i
t

You will require a password to access your desktops.

creating new authority file /root/.Xauthority

xauth:

Verify:

(w

Password:

IT

PU

New 'em12c:1 (root)' desktop is em12c:1

Creating default startup script. /root/.vnc/xstartup


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/em12c:1.log

.vnc /root/.vnc/passwd.vnc
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

18 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

xstartup /root/.vnc/xstartup VND

BTW/root/.vnc/em12c:1.pid VNC

VNC

2.11.3

VNC

---- 5902

---- 5903

---- 5901

VNC VNC TCP 5900

---- 5803

---- 5802

---- 5801

co
m)

Java VNC Web TCP 5800

Linux

pu
x.

[root@rac1 ~]# iptables -I INPUT -p tcp --dport 5901 -j ACCEPT

ww
.i
t

[root@rac1 ~]# iptables -I INPUT -p tcp --dport 5801 -j ACCEPT

2.11.4

VNC

(w

VNC Viewer

VNC Viewer --> Server 144.194.192.183:1 --> OK --> Password

--> OK X-Window -->


Web Firefox,IE,Safari

PU

http://144.194.192.183:5801/ --> VNC viewer for Java Java

IT

VNC
VNC viewer Server 144.194.192.183:1

OK --> Password --> OK X-Window -->

VNC viewer for Java JRE JRE


http://java.sun.com/javase/downloads/index_jdk5.jsp JRE

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

19 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

2.11.5

Version: <1.0>
mail:176140749@qq.com

VNC KDE GNOME

Shell

xstartup

[root@rac1 ~]# vi /root/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:

unset SESSION_MANAGER

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup

exec /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

co
m)

xsetroot -solid grey


vncconfig -iconic &

xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &

pu
x.

twm &

ww
.i
t

xstartup startkde & vncserver


KDE

(w

xstartup gnome-session & vncserver

GNOME

vncserver

PU

[root@rac1 ~]# vncserver -kill :1

IT

[root@rac1 ~]# vncserver :1

2.11.6

VNC twm VNC

KDE GNOME

VNC
vncserver :1
vncserver :2
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

20 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

vncserver :3

1 root 2 oracle

VNCSERVERS=": :"

[root@rac1 ~]# vi /etc/sysconfig/vncservers

VNCSERVERS="1:root 2:oracle"

VNCSERVERARGS[1]="-geometry 1024x768"

VNCSERVERARGS[2]="-geometry 1024x768"

VNC

2.11.7

vncpasswd VNC VNC

root oracle

co
m)

[root@rac1 ~]# vncpasswd


Password:

pu
x.

Verify:

ww
.i
t

[root@rac1 ~]#

VNC

(w

2.11.8

1 VNC

[root@rac1 ~]# /etc/init.d/vncserver start

Starting VNC server: 1:root

IT

PU

New 'em12c:1 (root)' desktop is em12c:1

Starting applications specified in /root/.vnc/xstartup

VNC/etc/sysconfig/vncservers

Log file is /root/.vnc/em12c:1.log

2:oracle
New 'em12c:2 (oracle)' desktop is em12c:2

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

21 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

Starting applications specified in /home/oracle/.vnc/xstartup

OK

OK

OK

Log file is /home/oracle/.vnc/em12c:2.log

2 VNC

Shutting down VNC server: 1:root 2:oracle

[root@rac1 ~]# /etc/init.d/vncserver stop

Shutting down VNC server: 1:root 2:oracle

[root@rac1 ~]# /etc/init.d/vncserver restart

3 VNC

Starting VNC server: 1:root

New 'em12c:1 (root)' desktop is em12c:1

pu
x.

2:oracle

co
m)

Log file is /root/.vnc/em12c:1.log

Starting applications specified in /root/.vnc/xstartup

ww
.i
t

New 'em12c:2 (oracle)' desktop is em12c:2

Starting applications specified in /home/oracle/.vnc/xstartup

(w

Log file is /home/oracle/.vnc/em12c:2.log

OK

PU

4 VNC

IT

ntsysv vncserver

chkconfig chkconfig
man
[root@rac1 ~]# chkconfig vncserver on
[root@rac1 ~]# chkconfig --list vncserver
vncserver

0:off

1:off

2:on

3:on

4:on

5:on

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

6:off
22 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

3 11gR2 Grid Infrastructure

3.1

gird,database

3.2 GRID

root xhost+

su grid

IT

PU

(w

ww
.i
t

pu
x.

co
m)

cd /soft/grid/./runInstaller

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

23 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

IT

PU

(w

ww
.i
t

pu
x.

co
m)

Version: <1.0>
mail:176140749@qq.com

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

24 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

3.3

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

25 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

3.4 SCAN

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

26 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

co
m)

3.5 IP SSH

IT

PU

(w

ww
.i
t

pu
x.

3.6

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

27 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

co
m)

3.7 asm

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

28 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

3.8 asm

IT

PU

(w

ww
.i
t

pu
x.

co
m)

dbca ORACLE

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

29 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

co
m)

3.9

IT

PU

(w

ww
.i
t

pu
x.

3.10
3.10 ORACLE_BASE ORACLE_HOME

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

30 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

3.11

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

31 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

co
m)

3.12
3.12

IT

PU

(w

ww
.i
t

pu
x.

3.13
3.13 orainstRoot.sh root.sh

OK
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

32 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

co
m)

The following environment variables are set as:


ORACLE_OWNER= grid
ORACLE_HOME= /oracle/app/11.2.0/grid

[root@rac1 ~]# /oracle/app/11.2.0/grid/root.sh


Running Oracle 11g root.sh script...

ww
.i
t

pu
x.

Enter the full pathname of the local bin directory: [/usr/local/bin]:


Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

IT

PU

(w

Creating /etc/oratab file...


Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2012-02-27 13:59:33: Parsing the host name
2012-02-27 13:59:33: Checking for super user privileges
2012-02-27 13:59:33: User has super user privileges
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
root wallet
root wallet cert
root cert export
peer wallet
profile reader wallet
pa wallet
peer wallet keys
pa wallet keys
peer cert request
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

33 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

pu
x.

co
m)

pa cert request
peer cert
pa cert
peer root cert TP
profile reader root cert TP
pa root cert TP
peer pa cert TP
pa peer cert TP
profile reader pa cert TP
profile reader peer cert TP
peer user cert
pa user cert
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1' succeeded

Version: <1.0>
mail:176140749@qq.com

ASM created and started successfully.

ww
.i
t

DiskGroup CRS created successfully.

IT

PU

(w

clscfg: -install mode specified


Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1' succeeded
CRS-4256: Updating the profile
Successful addition of voting disk 0994b1b4050d4f93bf40f72d96ba9709.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE
File Universal Id
File Name Disk group
-- ----------------------------- --------1. ONLINE
0994b1b4050d4f93bf40f72d96ba9709 (ORCL:CRS1) [CRS]
Located 1 voting disk(s).
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac1'
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

34 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

ww
.i
t

pu
x.

co
m)

CRS-2677: Stop of 'ora.cssdmonitor' on 'rac1' succeeded


CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'rac1'
CRS-2676: Start of 'ora.evmd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.CRS.dg' on 'rac1'
CRS-2676: Start of 'ora.CRS.dg' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.registry.acfs' on 'rac1'
CRS-2676: Start of 'ora.registry.acfs' on 'rac1' succeeded

Version: <1.0>
mail:176140749@qq.com

(w

rac1
2012/02/27 14:06:28
/oracle/app/11.2.0/grid/cdata/rac1/backup_20120227_140628.olr
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Actual 2047 MB

Passed

IT

PU

Checking swap space: must be greater than 500 MB.


The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/app/oraInventory
'UpdateNodeList' was successful.

[root@rac2 rac2]# /oracle/app/11.2.0/grid/root.sh


Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /oracle/app/11.2.0/grid
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

35 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

Enter the full pathname of the local bin directory: [/usr/local/bin]:


The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...

IT

PU

(w

ww
.i
t

pu
x.

co
m)

Entries will be added to the /etc/oratab file as needed by


Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2012-02-27 14:31:54: Parsing the host name
2012-02-27 14:31:54: Checking for super user privileges
2012-02-27 14:31:54: User has super user privileges
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node
rac1, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac2'
CRS-2676: Start of 'ora.mdnsd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'rac2'
CRS-2676: Start of 'ora.gipcd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac2'
CRS-2676: Start of 'ora.gpnpd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac2'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac2'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac2'
CRS-2676: Start of 'ora.diskmon' on 'rac2' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'rac2'
CRS-2676: Start of 'ora.ctssd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.drivers.acfs' on 'rac2'
CRS-2676: Start of 'ora.drivers.acfs' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac2'
CRS-2676: Start of 'ora.asm' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac2'
CRS-2676: Start of 'ora.crsd' on 'rac2' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'rac2'
CRS-2676: Start of 'ora.evmd' on 'rac2' succeeded
rac2
2012/02/27 14:35:44
/oracle/app/11.2.0/grid/cdata/rac2/backup_20120227_143544.olr
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

36 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Actual 2047 MB

Passed

IT

PU

(w

ww
.i
t

pu
x.

co
m)

Checking swap space: must be greater than 500 MB.


The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /oracle/app/oraInventory
'UpdateNodeList' was successful.

Version: <1.0>
mail:176140749@qq.com

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

37 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

pu
x.

3.14
3.14

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

[grid@rac2 ~]$ crs_stat -t


Name
Type
Target
State
Host
-----------------------------------------------------------ora.CRS.dg
ora....up.type ONLINE
ONLINE
rac1
ora....N1.lsnr ora....er.type ONLINE
ONLINE
rac1
ora.asm
ora.asm.type
ONLINE
ONLINE
rac1
ora.eons
ora.eons.type ONLINE
ONLINE
rac1
ora.gsd
ora.gsd.type
OFFLINE
OFFLINE
ora....network ora....rk.type ONLINE
ONLINE
rac1
ora.oc4j
ora.oc4j.type OFFLINE
OFFLINE
ora.ons
ora.ons.type
ONLINE
ONLINE
rac1
ora....SM1.asm application
ONLINE
ONLINE
rac1
ora.rac1.gsd
application
OFFLINE
OFFLINE
ora.rac1.ons application
ONLINE
ONLINE
rac1
ora.rac1.vip
ora....t1.type ONLINE
ONLINE
rac1
ora....SM2.asm application
ONLINE
ONLINE
rac2
ora.rac2.gsd
application
OFFLINE
OFFLINE
ora.rac2.ons application
ONLINE
ONLINE
rac2
ora.rac2.vip
ora....t1.type ONLINE
ONLINE
rac2
ora....ry.acfs ora....fs.type ONLINE
ONLINE
rac1
ora.scan1.vip ora....ip.type ONLINE
ONLINE
rac1

crsctl status resource -t


),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

38 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

STATE_DETAILS

Started
Started

4 ASM

IT

PU

(w

ww
.i
t

pu
x.

co
m)

[grid@rac2 ~]$ crsctl status resource -t


-------------------------------------------------------------------------------NAME
TARGET STATE
SERVER
-------------------------------------------------------------------------------Local Resources
-------------------------------------------------------------------------------ora.CRS.dg
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
ora.LISTENER.lsnr
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
ora.asm
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
ora.eons
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
ora.gsd
OFFLINE OFFLINE
rac1
OFFLINE OFFLINE
rac2
ora.net1.network
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
ora.ons
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
ora.registry.acfs
ONLINE ONLINE
rac1
ONLINE ONLINE
rac2
-------------------------------------------------------------------------------Cluster Resources
-------------------------------------------------------------------------------ora.LISTENER_SCAN1.lsnr
1
ONLINE ONLINE
rac1
ora.oc4j
1
OFFLINE OFFLINE
ora.rac1.vip
1
ONLINE ONLINE
rac1
ora.rac2.vip
1
ONLINE ONLINE
rac2
ora.scan1.vip
1
ONLINE ONLINE
rac1

Version: <1.0>
mail:176140749@qq.com

asmca
su - grid
asmca
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

39 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

diskgroup

IT

PU

(w

ww
.i
t

pu
x.

co
m)

Version: <1.0>
mail:176140749@qq.com

[grid@rac2 ~]$ crs_stat -t


Name
Type
Target
State
Host
-----------------------------------------------------------ora.CRS.dg
ora....up.type ONLINE
ONLINE
rac1
ora....ER.lsnr ora....er.type ONLINE
ONLINE
rac1
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

40 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

co
m)

5 ORACLE 11gR2

ora....N1.lsnr ora....er.type ONLINE


ONLINE
rac1
ora.asm
ora.asm.type
ONLINE
ONLINE
rac1
ora.eons
ora.eons.type ONLINE
ONLINE
rac1
ora.gsd
ora.gsd.type
ONLINE
ONLINE
rac1
ora....network ora....rk.type ONLINE
ONLINE
rac1
ora.oc4j
ora.oc4j.type OFFLINE
OFFLINE
ora.ons
ora.ons.type
ONLINE
ONLINE
rac1
ora....SM1.asm application
ONLINE
ONLINE
rac1
ora....C1.lsnr application
ONLINE
ONLINE
rac1
ora.rac1.gsd
application
ONLINE
ONLINE
rac1
ora.rac1.ons application
ONLINE
ONLINE
rac1
ora.rac1.vip
ora....t1.type ONLINE
ONLINE
rac1
ora....SM2.asm application
ONLINE
ONLINE
rac2
ora....C2.lsnr application
ONLINE
ONLINE
rac2
ora.rac2.gsd
application
ONLINE
ONLINE
rac2
ora.rac2.ons application
ONLINE
ONLINE
rac2
ora.rac2.vip
ora....t1.type ONLINE
ONLINE
rac2
ora....ry.acfs ora....fs.type ONLINE
ONLINE
rac1
ora.scan1.vip ora....ip.type ONLINE
ONLINE
rac1

5.1

pu
x.

xhost +
su - oracle
/soft/database/

ww
.i
t

cd

IT

PU

(w

./runInstaller

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

41 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

5.2 ,, install database software only

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

42 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

IT

PU

(w

ww
.i
t

5.3

pu
x.

co
m)

Version: <1.0>
mail:176140749@qq.com

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

43 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

5.4

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

44 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

5.5

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

45 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

5.6

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

46 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

5.7

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

47 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

co
m)

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

5.8 root.sh

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

48 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

6 Oracle 11gR2

6.1 dbca

xhost +

su - oracle

dbca

IT

PU

(w

ww
.i
t

pu
x.

co
m)

Create database
6.2 Create
database

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

49 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

IT

PU

(w

ww
.i
t

pu
x.

6.3

co
m)

Version: <1.0>
mail:176140749@qq.com

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

50 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

Global Database Name


Sid Prefix
6.4 Global
NameSid
Prefix

co
m)

racdb

IT

PU

(w

ww
.i
t

pu
x.

6.5 EM

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

51 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

Use the Same Password for all Accounts


6.6 Use
Accounts

pu
x.

co
m)

ORACLE

IT

PU

(w

ww
.i
t

Automatic Storage Management (ASM)


6.7 Automatic
(ASM)

6.8

Specify Flash Recovery AreaEnable Archiving, flash recovery area


40GB

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

52 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

co
m)

6.9

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

53 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

co
m)

6.10
6.10

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

54 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

co
m)

6.11

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

55 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

co
m)

6.12
6.12

IT

PU

(w

ww
.i
t

pu
x.

6.13
6.13

6.14
6.14
),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

56 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Version: <1.0>
mail:176140749@qq.com

IT

PU

(w

ww
.i
t

pu
x.

co
m)

EXIT

6.15
6.15

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

57 58

Oracle RAC
RACLinux + Oracle 11g R2 RAC
:
ITPUX
):
:
ITPUX (
(http://www.itpux.com
http://www.itpux.com):

Host

rac1
rac1
rac1
rac1
rac1
rac2
rac2
rac2
rac2
rac2
rac1
rac1
rac2
rac1
rac1
rac2

IT

PU

(w

ww
.i
t

pu
x.

co
m)

[root@rac2 ~]# crs_stat -t


Name
Type
Target
State
-----------------------------------------------------------ora....SM1.asm application
ONLINE
ONLINE
ora....C1.lsnr application
ONLINE
ONLINE
ora.rac1.gsd
application
ONLINE
ONLINE
ora.rac1.ons application
ONLINE
ONLINE
ora.rac1.vip
application
ONLINE
ONLINE
ora....SM2.asm application
ONLINE
ONLINE
ora....C2.lsnr application
ONLINE
ONLINE
ora.rac2.gsd
application
ONLINE
ONLINE
ora.rac2.ons application
ONLINE
ONLINE
ora.rac2.vip
application
ONLINE
ONLINE
ora.racdb.db
application
ONLINE
ONLINE
ora....b1.inst application
ONLINE
ONLINE
ora....b2.inst application
ONLINE
ONLINE
ora....db_s.cs application
ONLINE
ONLINE
ora....db1.srv application
ONLINE
ONLINE
ora....db2.srv application
ONLINE
ONLINE

Version: <1.0>
mail:176140749@qq.com

),
ITPUX ((http://www.itpux.com
http://www.itpux.com),
), IT
158277749 ,IT 1:199479729
199479729
Oracle 1:158277749

58 58

You might also like