1. 程式人生 > >Oracle 12c RAC 配置安裝文件

Oracle 12c RAC 配置安裝文件



一、安裝RAC的準備工作

1、新增組和使用者(所有節點)

groupadd -g 1000 oinstall

groupadd -g 1200 asmadmin

groupadd -g 1201 asmdba

groupadd -g 1202 asmoper

groupadd -g 1300 dba

groupadd -g 1301 oper

useradd -m -u 1100 -g oinstall -Gasmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash grid

useradd -m -u 1101 -g oinstall -Gdba,oper,asmdba -d /home/

Oracle -s /bin/bash oracle

--將使用者grid新增到dba組:

[[email protected] app]# gpasswd -a grid dba

Adding user grid to group dba

--確認使用者資訊:

[[email protected] ~]# id oracle

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

[[email protected] ~]# id grid

uid=1100(grid) gid=507(oinstall) groups=507(oinstall),504(asmadmin),506(asmdba),505(asmoper)

--修改密碼:

passwd oracle

passwd grid

2、禁用防火牆和SELNUX(所有節點)

關閉防火牆:

service iptables status

service iptables stop

chkconfig iptables off

chkconfig iptables --list

設定/etc/selinux/config 檔案,將SELINUX設定為disabled。

[[email protected] ~]# cat/etc/selinux/config

# This file controls the state of SELinuxon the system.

# SELINUX= can take one of these threevalues:

#    enforcing - SELinux security policy is enforced.

#    permissive - SELinux prints warnings instead of enforcing.

#    disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these twovalues:

#    targeted - Targeted processes are protected,

#    mls - Multi Level Security protection.

SELINUXTYPE=targeted

3、配置時間同步(所有節點)

這裡我們使用CTSS.所以要停用 NTP 服務,並從初始化序列中禁用該服務,並刪除 ntp.conf 檔案。以 root 使用者身份在兩個 OracleRAC 節點上執行以下命令:

[[email protected] ~]# /sbin/service ntpd stop

Shutting down ntpd:                                        [  OK  ]

[[email protected] ~]# chkconfig ntpd off

[[email protected] ~]# mv /etc/ntp.conf/etc/ntp.conf.original

[[email protected] ~]# chkconfig ntpd --list

ntpd            0:off   1:off  2:off   3:off   4:off  5:off   6:off

[[email protected] ~]# /sbin/service ntpd stop

Shutting down ntpd:                                        [  OK  ]

[[email protected] ~]# chkconfig ntpd off

[[email protected] ~]# mv /etc/ntp.conf/etc/ntp.conf.original

[[email protected] ~]# chkconfig ntpd --list

ntpd            0:off   1:off  2:off   3:off   4:off  5:off   6:off

還要刪除以下檔案:

rm /var/run/ntpd.pid

此檔案儲存了 NTP 後臺程式的 pid。

4、建立目錄結構(所有節點)

mkdir -p /u01/gridsoft/12.1.0

mkdir -p /u01/gridbase

chown -R grid:oinstall /u01

chown -R grid:oinstall /u01

mkdir -p/u01/oracle/12.1.0/db_1

chown-R oracle:oinstall /u01/oracle

chmod -R 775 /u01

5、配置環境變數

5.1 Grid使用者

修改grid使用者的.bash_profile.注意每個節點的不同內容:

export ORACLE_SID=+ASM1

#export ORACLE_SID=+ASM2

export ORACLE_BASE=/u01/gridbase

export ORACLE_HOME=/u01/gridsoft/12.1.0

exportPATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:.

export TEMP=/tmp

export TMP=/tmp

export TMPDIR=/tmp

umask 022

5.2 Oracle 使用者

修改oracle 使用者的.bash_profile,注意每個節點的不同內容:

ORACLE_SID=cndba1;export ORACLE_SID

#ORACLE_SID=cndba2;export ORACLE_SID

ORACLE_UNQNAME=cndba;export ORACLE_UNQNAME

JAVA_HOME=/usr/local/Java; export JAVA_HOME

ORACLE_BASE=/u01/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/12.1.0/db_1; exportORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT

NLS_LANG=american_america.ZHS16GBK; exportNLS_LANG

TNS_ADMIN=$ORACLE_HOME/network/admin; exportTNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; exportORA_NLS11

PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp

export TMPDIR=/tmp

umask 022 

6、為安裝使用者設定資源限制

6.1 修改/etc/security/limits.conf

以 root 使用者身份,在每個 Oracle RAC 節點上,在 /etc/security/limits.conf 檔案中新增如下內容,或者執行執行如下命令:

[[email protected] ~]# cat >> /etc/security/limits.conf <<EOF

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

EOF

6.2       修改/etc/pam.d/login

在每個 OracleRAC 節點上,在 /etc/pam.d/login 檔案中新增或編輯下面一行內容:

[[email protected] ~]# cat >> /etc/pam.d/login <<EOF

session    required     pam_limits.so

EOF

6.3       shell 的限制

對預設的 shell 啟動檔案進行以下更改,以便更改所有 Oracle 安裝所有者的 ulimit 設定:

[[email protected] ~]# cat >> /etc/profile <<EOF

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

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

        ulimit-p 16384

        ulimit-n 65536

    else

        ulimit-u 16384 -n 65536

    fi

    umask022

fi

EOF

注:紅色部分一起執行

6.4 修改/etc/sysctl.conf

#vi /etc/sysctl.conf

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

使修改的引數生效:

[[email protected] ~]# sysctl -p

6.5 修改/etc/hosts檔案(所有節點)

[[email protected] ~]# cat/etc/hosts

127.0.0.1   localhost 

192.168.56.5 rac1

192.168.56.6 rac2

192.168.57.5 rac1-priv

192.168.57.6 rac2-priv

192.168.56.7 rac1-vip

192.168.56.8 rac2-vip

192.168.56.9 rac-scan

二、共享裝置配置

1、裝置劃分說明

冗餘策略

卷劃分及大小說明

OCRVOTING

Ocrvoting01

8G

Ocrvoting02

8G

Ocrvoting03

8G

DATAFILE

Data01

8G

Data02

8G

FRA_ARCH

Fra01

8G

Fra02

8G

我們這裡OCRVOTING 採用Normal,DATAFRA 採用external

11g中每個OCRvote disk 至少需要600M空間。在ASM 的冗餘級別中:

external >= 1

normal >=3

high >=5

12c裡面,OCR voting disk 外部冗餘,至少需要4342MB的空間,Normal 至少需要8711MB的空間。

Cause - Insufficient spaceavailable in theselected Disks. At least, 4,342 MB of free space isrequired. Action - Chooseadditional disks such that the total size should be atleast 4,342 MB.

Cause - Insufficient spaceavailable in theselected Disks. At least, 8,711 MB of free space isrequired. Action - Chooseadditional disks such that the total size should be atleast 8,711 MB.

具體建立過程,直接在VBOX上建立,這裡不在詳述。

2、配置UDEV

用如下指令碼獲取繫結指令碼:

for i in b c d e f g h;

do

echo "KERNEL==\"sd*\",BUS==\"scsi\",PROGRAM==\"/sbin/scsi_id -g-u /dev/\$name\", RESULT==\"`/sbin/scsi_id -g-u/dev/sd$i`\", NAME=\"asm-disk$i\",OWNER=\"grid\",GROUP=\"asmadmin\",MODE=\"0660\""

done

--在所有節點建立並配置UDEV Rules 檔案

[[email protected] ~]# touch /etc/udev/rules.d/99-oracle-asmdevices.rules

--新增如下內容:

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VB0fe2de72-ff43e01f",NAME="asm-diskb",OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u  /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBb84b3378-7205c629",NAME="asm-diskc",OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u  /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VB8c6d2199-64d26b1e",NAME="asm-diskd",OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBc86e3f5c-ba9c8397",NAME="asm-diske",OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VB4776a8c1-0b444519",NAME="asm-diskf",OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBb7771090-d177eeaf",NAME="asm-diskg",OWNER="grid", GROUP="asmadmin",MODE="0660"

KERNEL=="sd*",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u /dev/$name",RESULT=="1ATA_VBOX_HARDDISK_VBe7da4ea4-622fea96",NAME="asm-diskh",OWNER="grid", GROUP="asmadmin",MODE="0660"

--重啟UDEV

[[email protected] rules.d]# start_udev

Starting udev: [  OK  ]

--檢查共享裝置的所屬關係和許可權:

[[email protected] ~]# ll /dev/asm*

brw-rw---- 1 grid asmadmin 8,  16 May 28 22:55/dev/asm-diskb

brw-rw---- 1 grid asmadmin 8,  32 May 28 22:55/dev/asm-diskc

brw-rw---- 1 grid asmadmin 8,  48 May 28 22:55/dev/asm-diskd

brw-rw---- 1 grid asmadmin 8,  64 May 28 22:55/dev/asm-diske

brw-rw---- 1 grid asmadmin 8,  80 May 28 22:55/dev/asm-diskf

brw-rw---- 1 grid asmadmin 8,  96 May 28 22:55/dev/asm-diskg

brw-rw---- 1 grid asmadmin 8, 112 May 2822:55/dev/asm-diskh

[[email protected] ~]#

3  安裝Grid

在節點1,用grid使用者執行runInstaller。

 

\

[[email protected] /]# /u01/oraInventory/orainstRoot.sh

Changing permissions of /u01/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions forworld.

Changing groupname of /u01/oraInventory tooinstall.

The execution of the script is complete.

[[email protected] /]#/u01/oraInventory/orainstRoot.sh

Changing permissions of /u01/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions forworld.

Changing groupname of /u01/oraInventory tooinstall.

The execution of the script is complete.

[[email protected] /]#

--節點1執行root.sh, 過程很長: 17分鐘:

[[email protected] /]# /u01/gridsoft/12.1.0/root.sh

Performing root user operation for Oracle12c

The following environment variables are setas:

   ORACLE_OWNER= grid

   ORACLE_HOME=  /u01/gridsoft/12.1.0

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

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

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

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

Creating /etc/oratab file...

Entries will be added to the /etc/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of rootscript.

Now product-specific root actions will beperformed.

Using configuration parameter file: /u01/gridsoft/12.1.0/crs/install/crsconfig_params

2014/08/07 02:42:37 CLSRSC-363: Userignored prerequisites during installation

OLR initialization - successful

 root wallet

 root wallet cert

 root cert export

 peer wallet

 profile reader wallet

  pawallet

 peer wallet keys

  pawallet keys

 peer cert request

  pacert request

 peer cert

  pacert

 peer root cert TP

 profile reader root cert TP

  paroot cert TP

 peer pa cert TP

  papeer cert TP

 profile reader pa cert TP

 profile reader peer cert TP

 peer user cert

  pauser cert

2014/08/07 02:43:33 CLSRSC-330: AddingClusterware entries to file 'oracle-ohasd.conf'

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Oracle High Availability Serviceshas been started.

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Oracle High Availability Serviceshas been started.

CRS-2673: Attempting to stop'ora.drivers.acfs' on 'rac1'

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

CRS-2672: Attempting to start 'ora.evmd' on'rac1'

CRS-2672: Attempting to start 'ora.mdnsd'on 'rac1'

CRS-2676: Start of 'ora.mdnsd' on 'rac1'succeeded

CRS-2676: Start of 'ora.evmd' 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-2672: Attempting to start 'ora.gipcd'on 'rac1'

CRS-2676: Start of 'ora.cssdmonitor' on'rac1' succeeded

CRS-2676: Start of 'ora.gipcd' 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

ASM created and started successfully.

Disk Group OCR_VOTING created successfully.

CRS-2672: Attempting to start 'ora.crf' on'rac1'

CRS-2672: Attempting to start 'ora.storage'on 'rac1'

CRS-2676: Start of 'ora.storage' on 'rac1'succeeded

CRS-2676: Start of 'ora.crf' on 'rac1'succeeded

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 diskf56b0e0be76b4f03bf4782230c783e67.

Successfully replaced voting disk groupwith +OCR_VOTING.

CRS-4256: Updating the profile

CRS-4266: Voting file(s) successfullyreplaced

## STATE    File Universal Id                File Name Disk group

-- -----    -----------------                --------- ---------

 1.ONLINE   f56b0e0be76b4f03bf4782230c783e67(/dev/asm-diske) [OCR_VOTING]

Located 1 voting disk(s).

CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'rac1'

CRS-2673: Attempting to stop 'ora.crsd' on'rac1'

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

CRS-2673: Attempting to stop 'ora.ctssd' on'rac1'

CRS-2673: Attempting to stop 'ora.evmd' on'rac1'

CRS-2673: Attempting to stop 'ora.storage'on 'rac1'

CRS-2673: Attempting to stop 'ora.gpnpd' on'rac1'

CRS-2673: Attempting to stop'ora.drivers.acfs' on 'rac1'

CRS-2673: Attempting to stop 'ora.mdnsd' on'rac1'

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

CRS-2673: Attempting to stop 'ora.asm' on'rac1'

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

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

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

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

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

CRS-2673: Attempting to stop'ora.cluster_interconnect.haip' on 'rac1'

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

CRS-2677: Stop of 'ora.ctssd' 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.crf' on'rac1'

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

CRS-2673: Attempting to stop 'ora.gipcd' on'rac1'

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

CRS-2793: Shutdown of Oracle HighAvailability Services-managed resources on 'rac1' has completed

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Starting Oracle High AvailabilityServices-managed resources

CRS-2672: Attempting to start 'ora.mdnsd'on 'rac1'

CRS-2672: Attempting to start 'ora.evmd' on'rac1'

CRS-2676: Start of 'ora.mdnsd' on 'rac1'succeeded

CRS-2676: Start of 'ora.evmd' 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.gipcd'on 'rac1'

CRS-2676: Start of 'ora.gipcd' 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-2789: Cannot stop resource'ora.diskmon' as it is not running on server 'rac1'

CRS-2676: Start of 'ora.cssd' on 'rac1'succeeded

CRS-2672: Attempting to start'ora.cluster_interconnect.haip' on 'rac1'

CRS-2672: Attempting to start 'ora.ctssd'on 'rac1'

CRS-2676: Start of 'ora.ctssd' on 'rac1'succeeded

CRS-2676: Start of'ora.cluster_interconnect.haip' 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.storage'on 'rac1'

CRS-2676: Start of 'ora.storage' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.crf' on'rac1'

CRS-2676: Start of 'ora.crf' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.crsd' on'rac1'

CRS-2676: Start of 'ora.crsd' on 'rac1'succeeded

CRS-6023: Starting Oracle Cluster ReadyServices-managed resources

CRS-6017: Processing resource auto-startfor servers: rac1

CRS-6016: Resource auto-start has completedfor server rac1

CRS-6024: Completed start of Oracle ClusterReady Services-managed resources

CRS-4123: Oracle High Availability Serviceshas been started.

2014/08/07 02:52:25 CLSRSC-343:Successfully started Oracle clusterware stack

CRS-2672: Attempting to start'ora.ASMNET1LSNR_ASM.lsnr' on 'rac1'

CRS-2676: Start of'ora.ASMNET1LSNR_ASM.lsnr' 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.OCR_VOTING.dg' on 'rac1'

CRS-2676: Start of 'ora.OCR_VOTING.dg' on'rac1' succeeded

CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'rac1'

CRS-2673: Attempting to stop 'ora.crsd' on'rac1'

CRS-2790: Starting shutdown of ClusterReady Services-managed resources on 'rac1'

CRS-2673: Attempting to stop'ora.LISTENER_SCAN1.lsnr' on 'rac1'

CRS-2673: Attempting to stop'ora.OCR_VOTING.dg' on 'rac1'

CRS-2673: Attempting to stop 'ora.rac1.vip'on 'rac1'

CRS-2673: Attempting to stop 'ora.cvu' on'rac1'

CRS-2673: Attempting to stop 'ora.oc4j' on'rac1'

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

CRS-2673: Attempting to stop'ora.scan1.vip' on 'rac1'

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

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

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

CRS-2673: Attempting to stop 'ora.asm' on'rac1'

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

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

CRS-2673: Attempting to stop'ora.ASMNET1LSNR_ASM.lsnr' on 'rac1'

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

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

CRS-2673: Attempting to stop 'ora.ons' on'rac1'

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

CRS-2673: Attempting to stop'ora.net1.network' on 'rac1'

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

CRS-2792: Shutdown of Cluster ReadyServices-managed resources on 'rac1' has completed

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

CRS-2673: Attempting to stop'ora.drivers.acfs' on 'rac1'

CRS-2673: Attempting to stop 'ora.ctssd' on'rac1'

CRS-2673: Attempting to stop 'ora.evmd' on'rac1'

CRS-2673: Attempting to stop 'ora.storage'on 'rac1'

CRS-2673: Attempting to stop 'ora.gpnpd' on'rac1'

CRS-2673: Attempting to stop 'ora.crf' on 'rac1'

CRS-2673: Attempting to stop 'ora.mdnsd' on'rac1'

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

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

CRS-2673: Attempting to stop 'ora.asm' on'rac1'

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

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

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

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

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

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

CRS-2673: Attempting to stop'ora.cluster_interconnect.haip' on 'rac1'

CRS-2677: Stop of'ora.cluster_interconnect.haip' 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.gipcd' on'rac1'

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

CRS-2793: Shutdown of Oracle HighAvailability Services-managed resources on 'rac1' has completed

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Starting Oracle High AvailabilityServices-managed resources

CRS-2672: Attempting to start 'ora.mdnsd'on 'rac1'

CRS-2672: Attempting to start 'ora.evmd' on'rac1'

CRS-2676: Start of 'ora.mdnsd' on 'rac1'succeeded

CRS-2676: Start of 'ora.evmd' 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.gipcd'on 'rac1'

CRS-2676: Start of 'ora.gipcd' 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-2789: Cannot stop resource'ora.diskmon' as it is not running on server 'rac1'

CRS-2676: Start of 'ora.cssd' on 'rac1'succeeded

CRS-2672: Attempting to start'ora.cluster_interconnect.haip' on 'rac1'

CRS-2672: Attempting to start 'ora.ctssd'on 'rac1'

CRS-2676: Start of 'ora.ctssd' on 'rac1'succeeded

CRS-2676: Start of'ora.cluster_interconnect.haip' 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.storage'on 'rac1'

CRS-2676: Start of 'ora.storage' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.crf' on'rac1'

CRS-2676: Start of 'ora.crf' on 'rac1'succeeded

CRS-2672: Attempting to start 'ora.crsd' on'rac1'

CRS-2676: Start of 'ora.crsd' on 'rac1'succeeded

CRS-6023: Starting Oracle Cluster ReadyServices-managed resources

CRS-6017: Processing resource auto-startfor servers: rac1

CRS-2672: Attempting to start'ora.scan1.vip' on 'rac1'

CRS-2672: Attempting to start 'ora.oc4j' on'rac1'

CRS-2672: Attempting to start 'ora.ons' on'rac1'

CRS-2672: Attempting to start'ora.rac1.vip' on 'rac1'

CRS-2672: Attempting to start 'ora.cvu' on'rac1'

CRS-2676: Start of 'ora.cvu' on 'rac1'succeeded

CRS-2676: Start of 'ora.scan1.vip' on'rac1' succeeded

CRS-2672: Attempting to start'ora.LISTENER_SCAN1.lsnr' on 'rac1'

CRS-2676: Start of 'ora.rac1.vip' on 'rac1'succeeded

CRS-2676: Start of 'ora.ons' on 'rac1'succeeded

CRS-2676: Start of'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded

CRS-2676: Start of 'ora.oc4j' on 'rac1' succeeded

CRS-6016: Resource auto-start has completedfor server rac1

CRS-6024: Completed start of Oracle ClusterReady Services-managed resources

CRS-4123: Oracle High Availability Serviceshas been started.

2014/08/07 02:59:19 CLSRSC-325: ConfigureOracle Grid Infrastructure for a Cluster ... succeeded

[[email protected] /]#

節點2執行:

[[email protected] /]# /u01/gridsoft/12.1.0/root.sh

Performing root user operation for Oracle12c

The following environment variables are setas:

   ORACLE_OWNER= grid

   ORACLE_HOME=  /u01/gridsoft/12.1.0

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

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

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

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

Creating /etc/oratab file...

Entries will be added to the /etc/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of rootscript.

Now product-specific root actions will beperformed.

Using configuration parameter file:/u01/gridsoft/12.1.0/crs/install/crsconfig_params

2014/08/07 03:03:51 CLSRSC-363: Userignored prerequisites during installation

OLR initialization - successful

2014/08/07 03:04:15 CLSRSC-330: AddingClusterware entries to file 'oracle-ohasd.conf'

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Oracle High Availability Serviceshas been started.

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Oracle High Availability Serviceshas been started.

CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'rac2'

CRS-2673: Attempting to stop'ora.drivers.acfs' on 'rac2'

CRS-2677: Stop of 'ora.drivers.acfs' on'rac2' succeeded

CRS-2793: Shutdown of Oracle HighAvailability Services-managed resources on 'rac2' has completed

CRS-4133: Oracle High Availability Serviceshas been stopped.

CRS-4123: Starting Oracle High AvailabilityServices-managed resources

CRS-2672: Attempting to start 'ora.mdnsd'on 'rac2'

CRS-2672: Attempting to start 'ora.evmd' on'rac2'

CRS-2676: Start of 'ora.mdnsd' on 'rac2'succeeded

CRS-2676: Start of 'ora.evmd' 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.gipcd'on 'rac2'

CRS-2676: Start of 'ora.gipcd' 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-2789: Cannot stop resource'ora.diskmon' as it is not running on server 'rac2'

CRS-2676: Start of 'ora.cssd' on 'rac2'succeeded

CRS-2672: Attempting to start 'ora.cluster_interconnect.haip'on 'rac2'

CRS-2672: Attempting to start 'ora.ctssd'on 'rac2'

CRS-2676: Start of 'ora.ctssd' on 'rac2'succeeded

CRS-2676: Start of'ora.cluster_interconnect.haip' 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.storage'on 'rac2'

CRS-2676: Start of 'ora.storage' on 'rac2'succeeded

CRS-2672: Attempting to start 'ora.crf' on'rac2'

CRS-2676: Start of 'ora.crf' on 'rac2' succeeded

CRS-2672: Attempting to start 'ora.crsd' on'rac2'

CRS-2676: Start of 'ora.crsd' on 'rac2'succeeded

CRS-6017: Processing resource auto-startfor servers: rac2

CRS-2672: Attempting to start'ora.ASMNET1LSNR_ASM.lsnr' on 'rac2'

CRS-2672: Attempting to start 'ora.ons' on'rac2'

CRS-2676: Start of 'ora.ons' on 'rac2'succeeded

CRS-2676: Start of'ora.ASMNET1LSNR_ASM.lsnr' 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.proxy_advm' on 'rac2'

CRS-2676: Start of 'ora.proxy_advm' on'rac2' succeeded

CRS-6016: Resource auto-start has completedfor server rac2

CRS-6024: Completed start of Oracle ClusterReady Services-managed resources

CRS-4123: Oracle High Availability Serviceshas been started.

2014/08/07 03:07:42 CLSRSC-343:Successfully started Oracle clusterware stack

2014/08/07 03:08:02 CLSRSC-325: ConfigureOracle Grid Infrastructure for a Cluster ... succeeded

[[email protected] /]#

至此,GRID 安裝完成。

[[email protected] ~]$ crs_stat -t

Name           Type           Target    State    Host       

------------------------------------------------------------

ora....SM.lsnr ora....er.type ONLINE    ONLINE   rac1       

ora....ER.lsnr ora....er.type ONLINE    ONLINE   rac1       

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

ora.MGMTLSNR   ora....nr.type ONLINE    ONLINE   rac1       

ora....TING.dg ora....up.type ONLINE    ONLINE   rac1       

ora.asm        ora.asm.type   ONLINE   ONLINE    rac1       

ora.cvu        ora.cvu.type   ONLINE   ONLINE    rac1       

ora.mgmtdb     ora....db.type ONLINE    ONLINE   rac1       

ora....network ora....rk.type ONLINE    ONLINE   rac1       

ora.oc4j       ora.oc4j.type  ONLINE   ONLINE    rac1       

ora.ons        ora.ons.type   ONLINE   ONLINE    rac1       

ora.proxy_advm ora....vm.type ONLINE    ONLINE   rac1       

ora....C1.lsnr application    ONLINE   ONLINE    rac1       

ora.rac1.ons   application    ONLINE   ONLINE    rac1       

ora.rac1.vip   ora....t1.type ONLINE    ONLINE   rac1       

ora....C2.lsnr application    ONLINE   ONLINE    rac2       

ora.rac2.ons   application    ONLINE   ONLINE    rac2       

ora.rac2.vip   ora....t1.type ONLINE    ONLINE   rac2       

ora.scan1.vip  ora....ip.type ONLINE    ONLINE   rac1       

[[email protected] ~]$

[[email protected] ~]$ crsctl stat res -t

--------------------------------------------------------------------------------

Name           Target  State       Server                   Statedetails      

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.ASMNET1LSNR_ASM.lsnr

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.LISTENER.lsnr

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.OCR_VOTING.dg

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.net1.network

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.ons

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

ora.proxy_advm

               ONLINE  ONLINE      rac1                     STABLE

               ONLINE  ONLINE      rac2                     STABLE

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.LISTENER_SCAN1.lsnr

     1        ONLINE  ONLINE      rac1                     STABLE

ora.MGMTLSNR

     1        ONLINE  ONLINE      rac1                     169.254.203.88192.1

                                                            68.57.5,STABLE

ora.asm

     1        ONLINE  ONLINE      rac1                     STABLE

     2        ONLINE  ONLINE      rac2                     STABLE

     3        OFFLINE OFFLINE                               STABLE

ora.cvu

     1        ONLINE  ONLINE      rac1                     STABLE

ora.mgmtdb

     1        ONLINE  ONLINE      rac1                     Open,STABLE

ora.oc4j

     1        ONLINE  ONLINE      rac1                     STABLE

ora.rac1.vip

     1        ONLINE  ONLINE      rac1                     STABLE

ora.rac2.vip

     1        ONLINE ONLINE       rac2                     STABLE

ora.scan1.vip

     1        ONLINE  ONLINE      rac1                     STABLE

--------------------------------------------------------------------------------

[[email protected] ~]$

4  安裝DB軟體

在節點1,用oracle 使用者執行runInstaller程式。

 

[[email protected] /]# /u01/oraInventory/orainstRoot.sh

Changing permissions of /u01/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions forworld.

Changing groupname of /u01/oraInventory tooinstall.

The execution of the script is complete.

[[email protected] /]#/u01/oraInventory/orainstRoot.sh

Changing permissions of /u01/oraInventory.

Adding read,write permissions for group.

Removing read,write,execute permissions forworld.

Changing groupname of /u01/oraInventory tooinstall.

The execution of the script is complete.

[[email protected] /]#

--節點1執行root.sh, 過程很長: 17分鐘:

[[email protected] /]# /u01/gridsoft/12.1.0/root.sh

Performing root user operation for Oracle12c

The following environment variables are setas:

   ORACLE_OWNER= grid

   ORACLE_HOME=  /u01/gridsoft/12.1.0

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

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

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

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

Creating /etc/oratab file...

Entries will be added to the /etc/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of rootscript.

Now product-specific root actions will beperformed.

Using configuration parameter file: /u01/gridsoft/12.1.0/crs/install/crsconfig_params

2014/08/07 02:42:37 CLSRSC-363: Userignored prerequisites during installation

OLR initialization - successful

 root wallet

 root wallet cert

 root ce