Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redhat6 + 11G RAC dual-node deployment

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. configure the network environment

Node1

[root@node1 ~] # vi/etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=node1

[root@node1 ~] # vi/etc/sysconfig/network-scripts/ifcfg-eth0

# Intel Corporation 82540EM GigabitEthernet Controller

DEVICE=eth0

BOOTPROTO=static

IPADDR=192.168.10.41

NETMASK=255.255.255.0

GATEWAY=192.168.10.1

ONBOOT=yes

[root@node1 ~] # vi/etc/sysconfig/network-scripts/ifcfg-eth2

# Intel Corporation 82540EM GigabitEthernet Controller

DEVICE=eth2

BOOTPROTO=static

IPADDR=10.10.10.41

NETMASK=255.255.255.0

ONBOOT=yes

[root@node1 ~] # vi/etc/hosts

# Do not remove the following line, orvarious programs

# that require network functionality willfail.

127.0.0.1 localhost

:: 1 localhost6.localdomain6 localhost6

192.168.10.41 node1

192.168.10.43 node1-vip

10.10.10.41 node1-priv

192.168.10.42 node2

192.168.10.44 node2-vip

10.10.10.42 node2-priv

192.168.10.55 rac_scan

[root@node1 ~] # service network restart

(node2 is basically the same as node1, but IP and hostname are different)

Create user, group, oracle and grid folders

Node1

[root@lq1 ~] # vimkuser.sh

Groupadd-g 200 oinstall

Groupadd-g 201 dba

Groupadd-g 202 oper

Groupadd-g 203 asmadmin

Groupadd-g 204 asmoper

Groupadd-g 205 asmdba

Useradd-u 200g oinstall-G dba,asmdba,oper oracle

Useradd-u 201g oinstall-G asmadmin,asmdba,asmoper,oper,dba grid

[root@node1 ~] # shmkuser.sh

[root@node1 ~] # vimkdir.sh

Mkdir-p / u01/app/oraInventory

Chown-R grid:oinstall / u01/app/oraInventory/

Chmod-R 775 / u01/app/oraInventory/

Mkdir-p / u01/11.2.0/grid

Chown-R grid:oinstall / u01/11.2.0/grid/

Chmod-R 775 / u01/11.2.0/grid/

Mkdir-p / u01/app/oracle

Mkdir-p / u01/app/oracle/cfgtoollogs

Mkdir-p / u01/app/oracle/product/11.2.0/db_1

Chown-R oracle:oinstall / u01/app/oracle

Chmod-R 775 / u01/app/oracle

[root@node1 ~] # shmkdir.sh

[root@node1 ~] # passwdoracle

[root@node1 ~] # passwdgrid

[root@node1~] # id oracle

Uid=200 (oracle) gid=200 (oinstall) groups=200 (oinstall), 201 (dba), 202 (oper), 205 (asmdba)

[root@node1~] # id grid

Uid=201 (grid) gid=200 (oinstall) groups=200 (oinstall), 201 (dba), 202 (oper), 203 (asmadmin), 204 (asmoper), 205 (asmdba)

[root@node1~] # id nobody

Uid=99 (nobody) gid=99 (nobody) groups=99 (nobody)

(node2 is the same as node1)

Modify 4 files in the / etc directory

Node1

[root@node1~] # vi / etc/sysctl.conf

Fs.aio-max-nr= 1048576

Fs.file-max= 6815744

Kernel.shmall= 2097152

Kernel.shmmax= 536870912

Kernel.shmmni= 4096

Kernel.sem= 250 32000 100 128

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= 1048586

[root@node1~] # sysctl-p

[root@node1~] # vi / etc/security/limits.conf

Oraclesoft nproc 2047

Oraclehard nproc 16384

Oraclesoft nofile1024

Oraclehard nofile 65536

Oraclesoft stack10240

Gridsoft nproc 2047

Gridhard nproc 16384

Gridsoft nofile 1024

Gridhard nofile65536

Gridsoft stack 10240

[root@node1~] # vi / etc/pam.d/login

Sessionrequired / lib/security/pam_limits.so

[root@node1~] # vi / etc/profile

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

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

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

(node2 is the same as node1)

4. Shut down the ntp service and adopt the time that comes with oracle

Turn off the mail service

Node1

[root@node1~] # chkconfig ntpd off

[root@node1~] # chkconfig ntpd-- list

[root@node1~] # mv / etc/ntp.conf / etc/ntp.conf.bak

[root@node1~] # chkconfig sendmail off

[root@node1~] # chkconfig sendmail-- list

(node2 is the same as node1)

5. Modify the environment variables of oracle and grid users

Node1

[root@node1 ~] # su-oracle

[oracle@node1~] $vi .bash _ profile

Export EDITOR=vi

ExportORACLE_SID=prod1

ExportORACLE_BASE=/u01/app/oracle

ExportORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

ExportPATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

Umask 022

[oracle@node1~] $. .bash _ profile

[root@node1 ~] # su-grid

[grid@node1~] $vi .bash _ profile

Export EDITOR=vi

ExportORACLE_SID=+ASM1

ExportORACLE_BASE=/u01/app/oracle

ExportORACLE_HOME=/u01/11.2.0/grid

ExportGRID_HOME=/u01/11.2.0/grid

ExportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

ExportTHREADS_FLAG=native

ExportPATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

Umask 022

[grid@node1~] $. .bash _ profile

(node2 is the same as node1)

6. Create ASM disk for hard disk partition

Node1

Check all the disks in the system

[root@node1~] # fdisk-l

Disk / dev/sda: 21.4 GB, 21474836480 bytes

255heads, 63 sectors/track, 2610 cylinders

Units= cylinders of 16065 * 512 = 8225280 bytes

DeviceBoot Start End Blocks Id System

/ dev/sda1* 1 13 104391 83 Linux

/ dev/sda2 14 2610 20860402 + 8e Linux LVM

Disk/dev/sdb: 32.2 GB, 32212254720 bytes

255heads, 63 sectors/track, 3916 cylinders

Units= cylinders of 16065 * 512 = 8225280 bytes

Disk/dev/sdb doesn't contain a valid partition table

Disk/dev/sdc: 21.4 GB, 21474836480 bytes

255heads, 63 sectors/track, 2610 cylinders

Units= cylinders of 16065 * 512 = 8225280 bytes

Disk/dev/sdc doesn't contain a valid partition table

Partition / dev/sdb disk

[root@node1~] # fdisk/dev/sdb

Partition / dev/sdc disk

[root@node1~] # fdisk/dev/sdc

View disk information in the system

[root@node1~] # fdisk-l

Format / dev/sdb1 disk

[root@node1~] # mkfs.ext3/dev/sdb1

Mount the new disk / dev/sdb1 to / U01 to check the mount status

[root@node1~] # mount/dev/sdb1 / u01

[root@node1~] # df-h

Filesystem Size Used Avail Use% Mounted on

/ dev/mapper/VolGroup00-LogVol00 18G 6.1G 11G 38% /

/ dev/sda1 99m 12m 82m 13% / boot

Tmpfs 782m 0 782m 0% / dev/shm

/ dev/sdb1 30G 173M 28G 1% / U01

View physical memory and feed space swap

[root@node1~] # free-m

Total used free shared buffers cached

Mem: 1562 1525 37 0 11 1438

-/ + buffers/cache: 75 1486

Swap: 2047 0 2047

Create a large file

[root@node1soft] # ddif=/dev/zero of=/u01/swapfile1 bs=1024k count=2048

2048+0records in

2048+0records out

2147483648bytes (2.1GB) copied, 5.66353 seconds, 379MB/s

Create a swap file

[root@node1~] # mkswap-c/u01/swapfile1

Settingup swapspace version 1, size = 2147479 Kb

Mount the swap file

[root@node1~] # swapon/u01/swapfile1

View physical memory and changed page space swap

[root@node1~] # free-m

Total used free shared buffers cached

Mem: 1562 1525 37 0 11 1438

-/ + buffers/cache: 75 1486

Swap: 4095 0 4095

Write the mounted new disk and the added swap file to the fstab file, which will be mounted automatically when the system is rebooted.

[root@node1~] # vi/etc/fstab

/ dev/VolGroup00/LogVol00/ ext3 defaults 1 1

LABEL=/boot / boot ext3 defaults 1 2

Tmpfs / dev/shm tmpfs defaults,size=1g 0 0

Devpts / dev/pts devpts gid=5,mode=620 0 0

Sysfs / sys sysfs defaults 0 0

Proc / proc proc defaults 0 0

/ dev/VolGroup00/LogVol01swap swap defaults 00

/ dev/sdb1 / u01 ext3 defaults 0 0

/ u01/swapfile1 swap swap defaults 0 0

[root@node2~] # mkfs.ext3/dev/sdb1

Mount the new disk / dev/sdb1 to / U01 to check the mount status

[root@node2~] # mount/dev/sdb1 / u01

[root@node2~] # df-h

Filesystem Size Used Avail Use% Mounted on

/ dev/mapper/VolGroup00-LogVol00 18G 6.1G 11G 38% /

/ dev/sda1 99m 12m 82m 13% / boot

Tmpfs 782m 0 782m 0% / dev/shm

/ dev/sdb1 30G 173M 28G 1% / U01

View physical memory and feed space swap

[root@node2~] # free-m

Total used free shared buffers cached

Mem: 1562 1525 37 0 11 1438

-/ + buffers/cache: 75 1486

Swap: 2047 0 2047

Create a large file

[root@node2soft] # ddif=/dev/zero of=/u01/swapfile1 bs=1024k count=2048

2048+0records in

2048+0records out

2147483648bytes (2.1GB) copied, 5.66353 seconds, 379MB/s

Create a swap file

[root@node2~] # mkswap-c/u01/swapfile1

Settingup swapspace version 1, size = 2147479 Kb

Mount the swap file

[root@node2~] # swapon/u01/swapfile1

View physical memory and changed page space swap

[root@node2~] # free-m

Total used free shared buffers cached

Mem: 1562 1525 37 0 11 1438

-/ + buffers/cache: 75 1486

Swap: 4095 0 4095

Write the mounted new disk and the added swap file to the fstab file, which will be mounted automatically when the system is rebooted.

[root@node2~] # vi/etc/fstab

/ dev/VolGroup00/LogVol00/ ext3 defaults 1 1

LABEL=/boot / boot ext3 defaults 1 2

Tmpfs / dev/shm tmpfs defaults,size=1g 0 0

Devpts / dev/pts devpts gid=5,mode=620 0 0

Sysfs / sys sysfs defaults 0 0

Proc / proc proc defaults 0 0

/ dev/VolGroup00/LogVol01swap swap defaults 00

/ dev/sdb1 / u01 ext3 defaults 0 0

/ u01/swapfile1 swap swap defaults 0 0

View the location of the ASM disk management software (download from the website and upload to the linux system)

[root@node1~] # cd / soft/asm

[root@node1asm] # ls

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

Oracleasmlib-2.0.4-1.el5.i386.rpm

Oracleasm-support-2.1.3-1.el5.i386.rpm

Pay attention to the match with the kernel version

[root@node1asm] # uname-a

Linux node1 2.6.18-194.el5 # 1 SMP Tue Mar16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux

Install ASM management software

[root@node1asm] # rpm-ivh * .rpm

Warning:oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm:Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... # [100%]

1:oracleasm-support # [33%]

2:oracleasm-2.6.18-194.el### [67%]

3:oracleasmlib # # [100%]

Configure oracleasm initialization

[root@node1soft] # serviceoracleasm configure

Configuringthe Oracle ASM library driver.

Thiswill configure the on-boot properties of the Oracle ASM library

Driver. The following questions will determinewhether the driver is

Loadedon boot and what permissions it will have. The current values

Willbe shown in brackets ('[]'). Hitting without typing an

Answerwill keep that current value. Ctrl-Cwill abort.

Defaultuser to own the driver interface []: grid

Defaultgroup to own the driver interface []: asmadmin

StartOracle ASM library driver on boot (yzone) [n]: y

Scanfor Oracle ASM disks on boot (yzone) [y]:

WritingOracle ASM library driver configuration: done

Initializingthe Oracle ASMLib driver: [OK]

Scanningthe system for Oracle ASMLib disks: [OK]

Create an oracleasm disk

[root@node1soft] # serviceoracleasm createdisk OCR_VOTE1 / dev/sdc1

Markingdisk "OCR_VOTE1" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm createdisk OCR_VOTE2 / dev/sdc2

Markingdisk "OCR_VOTE2" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm createdisk OCR_VOTE3 / dev/sdc3

Markingdisk "OCR_VOTE3" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm createdisk ASM_DATA1 / dev/sdc5

Markingdisk "ASM_DATA1" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm createdisk ASM_DATA2 / dev/sdc6

Markingdisk "ASM_DATA2" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm createdisk ASM_RCY1 / dev/sdc7

Markingdisk "ASM_RCY1" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm createdisk ASM_RCY2 / dev/sdc8

Markingdisk "ASM_RCY2" as an ASM disk: [OK]

[root@node1soft] # serviceoracleasm listdisks

ASM_DATA1

ASM_DATA2

ASM_RCY1

ASM_RCY2

OCR_VOTE1

OCR_VOTE2

OCR_VOTE3

At this time, copy the three packages of node1 / soft/asm to node2 / soft/asm

After copying, check the location of ASM disk management software (download from website and upload to linux system)

Pay attention to the match with the kernel version

[root@node2asm] # uname-a

Linux node1 2.6.18-194.el5 # 1 SMP Tue Mar16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux

Install ASM management software

[root@node2asm] # rpm-ivh * .rpm

Warning:oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm:Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... # [100%]

1:oracleasm-support # [33%]

2:oracleasm-2.6.18-194.el### [67%]

3:oracleasmlib # # [100%]

Node2 also needs to perform oraclasm initialization

[root@node2soft] # serviceoracleasm configure

Configuringthe Oracle ASM library driver.

Thiswill configure the on-boot properties of the Oracle ASM library

Driver. The following questions will determinewhether the driver is

Loadedon boot and what permissions it will have. The current values

Willbe shown in brackets ('[]'). Hitting without typing an

Answerwill keep that current value. Ctrl-Cwill abort.

Defaultuser to own the driver interface []: grid

Defaultgroup to own the driver interface []: asmadmin

StartOracle ASM library driver on boot (yzone) [n]: y

Scanfor Oracle ASM disks on boot (yzone) [y]:

WritingOracle ASM library driver configuration: done

Initializingthe Oracle ASMLib driver: [OK]

Scanningthe system for Oracle ASMLib disks: [OK]

Then perform an asm scan and view

[root@node2asm] # serviceoracleasm scandisks

Scanningthe system for Oracle ASMLib disks: [OK]

[root@node2asm] # serviceoracleasm listdisks

ASM_DATA1

ASM_DATA2

ASM_RCY1

ASM_RCY2

OCR_VOTE1

OCR_VOTE2

OCR_VOTE3

(node1 and node2, shared disk / dev/sdc need not be configured, other configurations are the same)

Establish a trust relationship between hosts

Establish the trust between oracle and grid users between nodes (generate a pair of keys through ssh)

Node1-oracle user

[root@node1~] # su-oracle

[oracle@node1~] $mkdir .ssh

[oracle@node1~] $ls-a

. .. .bash _ history .bash _ logout .bash _ profile .bashrc .emacs .kde .mozilla .ssh .viminfo

[oracle@node1~] $ssh-keygen-t rsa

[oracle@node1] $ssh-keygen-t dsa

Node2-oracle user

[root@node1~] # su-oracle

[oracle@node2~] $mkdir .ssh

[oracle@node2~] $ls-a

. .. .bash _ history .bash _ logout .bash _ profile .bashrc .emacs .kde .mozilla .ssh .viminfo

[oracle@node2~] $ssh-keygen-t rsa

[oracle@node2] $ssh-keygen-t dsa

Configure trust relationship

[oracle@node1~] $ls .ssh

Id_dsa id_dsa.pub id_rsa id_rsa.pub known_hosts

[oracle@node1~] $cat.ssh/id_rsa.pub > > .ssh / authorized_keys

[oracle@node1~] $cat.ssh/id_dsa.pub > > .ssh / authorized_keys

[oracle@node1~] $ssh node2cat .ssh / id_rsa.pub > > .ssh / authorized_keys

[oracle@node1 ~] $ssh node2 cat .ssh / id_dsa.pub > > .ssh/authorized_keys

Oracle@node2'spassword:

[oracle@node1~] $scp.ssh/authorized_keys node2:~/.ssh

Oracle@node2'spassword:

Authorized_keys 100% 1988 1.9KB/s 00:00

Verify the trust relationship

[oracle@node1~] $ssh node1date

[oracle@node1 ~] $ssh node1-priv date

[oracle@node1 ~] $ssh node2-priv date

[oracle@node1 ~] $ssh node2 date

[oracle@node1~] $ssh node1date

WedAug 27 00:48:15 CST 2014

[oracle@node1~] $sshnode1-priv date

WedAug 27 00:48:17 CST 2014

[oracle@node1~] $ssh node2date

WedAug 27 00:48:18 CST 2014

[oracle@node1~] $sshnode2-priv date

WedAug 27 00:48:21 CST 2014

[oracle@node1~] $ssh node2date;date

WedAug 27 00:50:28 CST 2014

WedAug 27 00:50:29 CST 2014

[oracle@node1~] $sshnode2-priv date;date

WedAug 27 00:50:38 CST 2014

WedAug 27 00:50:38 CST 2014

[oracle@node2~] $ssh node2date

[oracle@node2 ~] $ssh node2-priv date

[oracle@node2 ~] $ssh node1-priv date

[oracle@node2 ~] $ssh node1 date

[oracle@node2~] $ssh node2date

WedAug 27 00:49:09 CST 2014

[oracle@node2~] $sshnode2-priv date

WedAug 27 00:49:11 CST 2014

[oracle@node2~] $ssh node1date

WedAug 27 00:49:15 CST 2014

[oracle@node2~] $sshnode1-priv date

WedAug 27 00:49:19 CST 2014

[oracle@node2~] $ssh node1date;date

WedAug 27 00:51:28 CST 2014

WedAug 27 00:51:29 CST 2014

[oracle@node2~] $ssh node1-privdate;date

WedAug 27 00:51:48 CST 2014

WedAug 27 00:51:48 CST 2014

Node1-grid user

[root@node1~] # su-grid

[grid@node1~] $mkdir .ssh

[grid@node1~] $ls-a

. .. .bash _ history .bash _ logout .bash _ profile .bashrc .emacs .kde .mozilla .ssh .viminfo

[grid@node1~] $ssh-keygen-t rsa

G

[grid@node1~] $ssh-keygen-t dsa

Node2-grid user

[root@node2~] # su-grid

[grid@node2~] $mkdir .ssh

[grid@node2~] $ls-a

. .. .bash _ history .bash _ logout .bash _ profile .bashrc .emacs .kde .mozilla .ssh .viminfo

[grid@node2~] $ssh-keygen-t rsa

[grid@node2] $ssh-keygen-t dsa

Configure trust relationship

[grid@node1~] $cat.ssh/id_rsa.pub > > .ssh / authorized_keys

[grid@node1~] $cat.ssh/id_dsa.pub > > .ssh / authorized_keys

[grid@node1~] $ssh node2cat .ssh / id_rsa.pub > > .ssh / authorized_keys

[grid@node1 ~] $ssh node2 cat .ssh / id_dsa.pub > > .ssh/authorized_keys

Grid@node2'spassword:

[grid@node1~] $scp.ssh/authorized_keys node2:~/.ssh

Grid@node2'spassword:

Authorized_keys 100% 1984 1.9KB/s 00:00

Verify the trust relationship

[grid@node1~] $ssh node1date

[grid@node1 ~] $ssh node1-priv date

[grid@node1 ~] $ssh node2-priv date

[grid@node1 ~] $ssh node2 date

[grid@node1~] $ssh node1date

WedAug 27 00:57:37 CST 2014

[grid@node1~] $sshnode1-priv date

WedAug 27 00:57:39 CST 2014

[grid@node1~] $ssh node2date

WedAug 27 00:57:41 CST 2014

[grid@node1~] $sshnode2-priv date

WedAug 27 00:57:43 CST 2014

[grid@node1~] $sshnode2-priv date;date

WedAug 27 00:57:50 CST 2014

WedAug 27 00:57:51 CST 2014

[grid@node1~] $ssh node2date;date

WedAug 27 00:58:01 CST 2014

WedAug 27 00:58:01 CST 2014

[grid@node2~] $ssh node2date

[grid@node2 ~] $ssh node2-priv date

[grid@node2 ~] $ssh node1-priv date

[grid@node2~] $ssh node1date

[grid@node2~] $ssh node2date

WedAug 27 00:59:01 CST 2014

[grid@node2~] $sshnode2-priv date

WedAug 27 00:59:03 CST 2014

[grid@node2~] $ssh node1date

WedAug 27 00:59:05 CST 2014

[grid@node2~] $sshnode1-priv date

WedAug 27 00:59:08 CST 2014

[grid@node2~] $sshnode1-priv date;date

WedAug 27 00:59:12 CST 2014

WedAug 27 00:59:12 CST 2014

[grid@node2~] $ssh node1date;date

WedAug 27 00:59:25 CST 2014

WedAug 27 00:59:24 CST 2014

Verify the environment before installation

Verify the installation environment as the grid user (in the grid installation package directory)

[root@node1~] # cd / soft

[root@node1soft] # ls

Asm linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip linux_11gR2_grid.zip

[root@node1soft] # unzip linux_11gR2_grid.zip

[root@node1soft] # ls

Asm grid linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip linux_11gR2_grid.zip

[root@node1soft] # chown-Rgrid:oinstall grid/

[root@node1soft] # chmod-R775 grid/

[root@node1soft] # chown-Rgrid:oinstall / tmp/bootstrap/ there is no need to operate without this directory

[root@node1soft] # chmod-R775 / tmp/bootstrap/ there is no need to operate without this directory

[root@node1soft] # su-grid

[grid@node1~] $cd/soft/grid/

[grid@node1grid] $. / runcluvfy.sh stage-pre crsinst-n node1,node2-fixup-verbose

Note the position of "failed" in it

Install packages that are not installed in the verification (all nodes)

(node1 is the same as node2.) finally, all nodes should be checked by passed itself.

Install Grid

[root@node1 ~] # / u01/app/oraInventory/orainstRoot.sh

Changingpermissions of / u01/app/oraInventory.

Addingread,write permissions for group.

Removingread,write,execute permissions for world.

Changinggroupname of / u01/app/oraInventory to oinstall.

Theexecution of the script is complete.

Node 2 also needs to run / u01/app/oraInventory/orainstRoot.sh

[root@node1~] # / u01/11.2.0/grid/root.sh

Node 2 also needs to run / u01/11.2.0/grid/root.sh

(the same is true of node2. Remember that after node1 runs the first script, node2 runs the first script, and then node1 runs the second script.

Node2 also runs a second script in the right order.)

After completing the grid installation, check to see if the crs process is enabled

Node1

[root@node1~] # vi / etc/profile

ExportPATH=$PATH:/u01/11.2.0/grid/bin

[root@node1~] # source / etc/profile

[root@node1~] # crsctl check crs

CRS-4638:Oracle High Availability Services is online

CRS-4537:Cluster Ready Services is online

CRS-4529:Cluster Synchronization Services is online

CRS-4533:Event Manager is online

[root@node1~] # crs_stat-t

Name Type Target State Host

Ora....ER.lsnrora....er.type ONLINE ONLINE node1

Ora....N1.lsnrora....er.type ONLINE ONLINE node1

Ora....VOTE.dgora....up.type ONLINE ONLINE node1

Ora.asm ora.asm.type ONLINE ONLINE node1

Ora.eons ora.eons.type ONLINE ONLINE node1

Ora.gsd ora.gsd.type OFFLINE OFFLINE

Ora....networkora....rk.type ONLINE ONLINE node1

Ora....SM1.asmapplication ONLINE ONLINE node1

Ora....E1.lsnrapplication ONLINE ONLINE node1

Ora.node1.gsd application OFFLINE OFFLINE

Ora.node1.ons application ONLINE ONLINE node1

Ora.node1.vip ora....t1.type ONLINE ONLINE node1

Ora....SM2.asmapplication ONLINE ONLINE node2

Ora....E2.lsnrapplication ONLINE ONLINE node2

Ora.node2.gsd application OFFLINE OFFLINE

Ora.node2.ons application ONLINE ONLINE node2

Ora.node2.vip ora....t1.type ONLINE ONLINE node2

Ora.oc4j ora.oc4j.type OFFLINE OFFLINE

Ora.ons ora.ons.type ONLINE ONLINE node1

Ora....ry.acfsora....fs.type ONLINE ONLINE node1

Ora.scan1.vip ora....ip.type ONLINE ONLINE node1

Node2

[root@node2~] # vi / etc/profile

ExportPATH=$PATH:/u01/11.2.0/grid/bin

[root@node2~] # source / etc/profile

[root@node2~] # crsctl check crs

CRS-4638:Oracle High Availability Services is online

CRS-4537:Cluster Ready Services is online

CRS-4529:Cluster Synchronization Services is online

CRS-4533:Event Manager is online

[root@node2~] # crs_stat-t

Name Type Target State Host

Ora....ER.lsnrora....er.type ONLINE ONLINE node1

Ora....N1.lsnrora....er.type ONLINE ONLINE node1

Ora....VOTE.dgora....up.type ONLINE ONLINE node1

Ora.asm ora.asm.type ONLINE ONLINE node1

Ora.eons ora.eons.type ONLINE ONLINE node1

Ora.gsd ora.gsd.type OFFLINE OFFLINE

Ora....networkora....rk.type ONLINE ONLINE node1

Ora....SM1.asmapplication ONLINE ONLINE node1

Ora....E1.lsnrapplication ONLINE ONLINE node1

Ora.node1.gsd application OFFLINE OFFLINE

Ora.node1.ons application ONLINE ONLINE node1

Ora.node1.vip ora....t1.type ONLINE ONLINE node1

Ora....SM2.asmapplication ONLINE ONLINE node2

Ora....E2.lsnrapplication ONLINE ONLINE node2

Ora.node2.gsd application OFFLINE OFFLINE

Ora.node2.ons application ONLINE ONLINE node2

Ora.node2.vip ora....t1.type ONLINE ONLINE node2

Ora.oc4j ora.oc4j.type OFFLINE OFFLINE

Ora.ons ora.ons.type ONLINE ONLINE node1

Ora....ry.acfsora....fs.type ONLINE ONLINE node1

Ora.scan1.vip ora....ip.type ONLINE ONLINE node1

After completing the grid installation, check to see if the crs process is enabled

Node1

[root@node1~] # vi / etc/profile

ExportPATH=$PATH:/u01/11.2.0/grid/bin

[root@node1~] # source / etc/profile

[root@node1~] # crsctl check crs

CRS-4638:Oracle High Availability Services is online

CRS-4537:Cluster Ready Services is online

CRS-4529:Cluster Synchronization Services is online

CRS-4533:Event Manager is online

[root@node1~] # crs_stat-t

Name Type Target State Host

Ora....ER.lsnrora....er.type ONLINE ONLINE node1

Ora....N1.lsnrora....er.type ONLINE ONLINE node1

Ora....VOTE.dgora....up.type ONLINE ONLINE node1

Ora.asm ora.asm.type ONLINE ONLINE node1

Ora.eons ora.eons.type ONLINE ONLINE node1

Ora.gsd ora.gsd.type OFFLINE OFFLINE

Ora....networkora....rk.type ONLINE ONLINE node1

Ora....SM1.asmapplication ONLINE ONLINE node1

Ora....E1.lsnrapplication ONLINE ONLINE node1

Ora.node1.gsd application OFFLINE OFFLINE

Ora.node1.ons application ONLINE ONLINE node1

Ora.node1.vip ora....t1.type ONLINE ONLINE node1

Ora....SM2.asmapplication ONLINE ONLINE node2

Ora....E2.lsnrapplication ONLINE ONLINE node2

Ora.node2.gsd application OFFLINE OFFLINE

Ora.node2.ons application ONLINE ONLINE node2

Ora.node2.vip ora....t1.type ONLINE ONLINE node2

Ora.oc4j ora.oc4j.type OFFLINE OFFLINE

Ora.ons ora.ons.type ONLINE ONLINE node1

Ora....ry.acfsora....fs.type ONLINE ONLINE node1

Ora.scan1.vip ora....ip.type ONLINE ONLINE node1

IX. Install oracle software

[root@node1~] # cd / soft/

[root@node1soft] # ls

Asmgridlinux_11gR2_database_1of2.ziplinux_11gR2_database_2of2.zip linux_11gR2_grid.zip

[root@node1soft] # unzip linux_11gR2_database_1of2.zip

.

[root@node1soft] # unzip linux_11gR2_database_2of2.zip

.

[root@node1soft] # ls

Asmgrid database linux_11gR2_database_1of2.ziplinux_11gR2_database_2of2.zip linux_11gR2_grid.zip

[root@node1soft] # chown-R oracle:oinstall database/

[root@node1soft] # chmod-R 775 database/

[root@node1~] # su-oracle

[oracle@node1~] $cd / soft/database/

[oracle@node1database] $ls

Doc install response rpm runInstaller sshsetup stage welcome.html

Pre-installation preparation is the same as grid

[oracle@node1database] $. / runInstaller

StartingOracle Universal Installer...

CheckingTemp space: must be greater than 80 MB. Actual 7196 MB Passed

Checkingswap space: must be greater than 150 MB. Actual 4005 MB Passed

Checkingmonitor: must be configured to display at least 256 colors. Actual 16777216 Passed

Preparingto launch Oracle Universal Installer from / tmp/OraInstall2014-08-27003-43-06AM.Please wait... [oracle@node1 database] $

Node1

[root@node1~] # / u01/app/oracle/product/11.2.0/db_1/root.sh

RunningOracle 11g root.sh script...

Thefollowing environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= / u01/app/oracle/product/11.2.0/db_1

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

Thefile "dbhome" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]: y

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

Thefile "oraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]: y

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

Thefile "coraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]: y

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

Entrieswill be added to the / etc/oratab file as needed by

DatabaseConfiguration Assistant when a database is created

Finishedrunning generic part of root.sh script.

Nowproduct-specific root actions will be performed.

Finishedproduct-specific root actions.

Node2

[root@node2~] # / u01/app/oracle/product/11.2.0/db_1/root.sh

RunningOracle 11g root.sh script...

Thefollowing environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= / u01/app/oracle/product/11.2.0/db_1

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

Thefile "dbhome" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]: y

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

Thefile "oraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]: y

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

Thefile "coraenv" already exists in / usr/local/bin. Overwrite it? (YBO)

[n]: y

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

Entrieswill be added to the / etc/oratab file as needed by

DatabaseConfiguration Assistant when a database is created

Finishedrunning generic part of root.sh script.

Nowproduct-specific root actions will be performed.

Finishedproduct-specific root actions.

Create an ASM disk group

[root@node1~] # su-grid

[grid@node1~] $asmca

11. DBCA to build a database

[oracle@node1 ~] $dbca

Complete the installation of oracle database

Verification

[oracle@node1 ~] $sqlplus / as sysdba

SQL*Plus: Release11.2.0.1.0 Production on Wed Aug 27 04:52:36 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:

Oracle Database11g Enterprise Edition Release 11.2.0.1.0-Production

With thePartitioning, Real Application Clusters, Automatic Storage Management, OLAP

Data Mining andReal Application Testing options

SQL > select status from gv$instance

STATUS

-

OPEN

OPEN

SQL > show parameter name

NAME TYPE VALUE

-

Db_file_name_convert string

Db_name string prod

Db_unique_name string prod

Global_names boolean FALSE

Instance_name string prod1

Lock_name_space string

Log_file_name_convert string

Service_names string prod

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report