Test Oracle 11GR2 RAC installation and configuration-prerequisite configuration stage

Source: Internet
Author: User

Test Oracle 11GR2 RAC installation and configuration-prerequisite configuration stage

Install Oracle 11GR2 11.2.0.4 RAC cluster based on Linux RedHat 6.4 in VMwarevCenter Server

1. Network Planning

Public and private must be divided into different network segments. Secure Transmission

[Root @ Zracnode1 ~] # Cat/etc/hosts

127.0.0.1 localhost. localdomain localhost4localhost4. localdomain4

: 1 localhost. localdomainlocalhost6 localhost6.localdomain6

10.2.13.80 zracnode1

10.2.13.81 zracnode2

10.2.13.82 zracnode1-vip

10.2.13.83 zracnode2-vip

10.2.12.140 zracnode1-priv

Zracnode2-priv 10.2.12.141

10.2.13.142 zrac-scan

10.2.13.143 zrac-scan

10.2.13.144 zrac-scan

2. Operating System settings

* The operating system installed is LinuxRedhat 6.4.

*. Disk partitioning Configuration

Disk directory

Disk size

/

30 GB

Swap

16 GB

/U01

100 GB

3. Shared disk settings

There are multiple ways to configure shared disks. nfs and disk arrays are directly mapped and divided. Here I use the shared disk technology on vmware vCenter server. The procedure is as follows:

3.1. Configure the SCSI controller. Configure the [physical] mode for the bus. The parameters are described as follows:

Option

Description

None

Other virtual machines cannot share Virtual Disks.

Virtual

Virtual machines on the same server can share Virtual Disks.

Physical

Virtual disks can be shared by virtual machines on any server.

3.2 Create a SCSI controller 1 controller and set relevant parameters. The VmwarevCenter operation page is as follows:

3.3 create a new hard disk. The hard disk type is [Thick provision eager zeroed]. set the virtual Device Node to [SCSI (1:0)]. set the disk mode to [Independent-Persistent]. the operation page is as follows:

3.4 add an existing disk. On the ZRAC02 node, add a disk. The operation page is as follows:

4. Install RAC4.1 prerequisites 4.1.1 yum Configuration

Mount image configuration yum

Mount-oloop-t iso9660/u01/software/rhel-server-6.4-x86_64-dvd.iso/u01/iso

[Root @ Zracnode1u01] # cat/etc/yum. repos. d/rhel-source.repo

[Server]

Name = Server

Baseurl = file: // u01/iso

Gpgcheck = 0

Gpgkey = file: // u01/iso/RPM-GPG-KEY-redhat-release

4.1.2 vnc Configuration

Install VNC on Linux

# Yuminstall tigervnc-server

# Vncserver # This command starts a VNC process on the server. Allow one

The VNC View is connected. If you need multiple views to connect to the server, you need to execute the preceding command multiple times;

Password: # to prevent anyone from remotely controlling the computer. Therefore, when you start the VNC server for 1st times, you must set a remote control password.

Verify: # Verify the password;

Go to the. vnc hidden directory in the root directory, find the xstartup file, and edit it:

# Cd/root/. vnc

# Vi xstartup

# Twm & (comment out this line)

Startkde & (add this row)

# KillallXvnc

# Vncserver

4.2 configure the/etc/hosts file (all nodes)

[Root @ rac01network-scripts] # vi/etc/hosts

127.0.0.1 localhost. localdomain localhost4localhost4. localdomain4

: 1 localhost. localdomainlocalhost6 localhost6.localdomain6

10.2.13.80 Zracnode1

10.2.13.81 Zracnode2

10.2.13.82 Zracnode1-vip

10.2.13.83 Zracnode2-vip

10.2.13.140 Zracnode1-priv

Zracnode2-priv 10.2.13.141

10.2.13.142 Zrac-scan

4.3 Add a combined user (all nodes)

Groupadd-g500 oinstall

Groupadd-g501 dba

Groupadd-g502 success

Groupadd-g503 asmadmin

Groupadd-g504 asmoper

Groupadd-g505 asmdba

Useradd-goinstall-G dba, asmdba, external oracle

Useradd-goinstall-G asmadmin, asmdba, asmoper, role, dba grid

Detect oracle and grid users

[Root @ rac1 ~] # Id oracle

Uid = 500 (oracle) gid = 500 (oinstall) groups = 500 (oinstall), 501 (dba), 502 (region), 505 (asmdba)

[Root @ rac1 ~] # Id grid

Uid = 501 (grid) gid = 500 (oinstall) groups = 500 (oinstall), 501 (dba), 502 (runtime), 503 (asmadmin), 504 (asmoper ), 505 (asmdba)

Set password for oracle and grid

[Root @ rac1 ~] # Passwd oracle

[Root @ rac1 ~] # Passwd grid

4. Create a directory (all nodes)

Mkdir/u01/app

Chown-Rgrid: oinstall/u01/app/

Chmod-R 775/u01/app/

Mkdir-p/u01/app/oraInventory

Chown-Rgrid: oinstall/u01/app/oraInventory/

Chmod-R 775/u01/app/oraInventory/

Mkdir-p/u01/app/grid

Mkdir-p/u01/app/oracle

Chown-Rgrid: oinstall/u01/app/grid/

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

Chmod-R 775/u01/app/grid/

Chmod-R 775/u01/app/oracle/

4.5. Modify kernel parameters (all nodes)

[Root @ rac01 ~] # Vi/etc/sysctl. conf

# For oracle11g

Fs. aio-max-nr = 1048576

Fs. file-max = 6815744

Kernel. shmall = 2147483648

Kernel. shmmax = 68719476736

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

Make the modified parameters take effect immediately:

[Root @ rac01 ~] #/Sbin/sysctl-p

[Root @ rac01 ~] #/Etc/security/limits. conf

Grid soft nproc 2047

Grid hard nproc 16384

Grid soft nofile 1024

Grid hard nofile 65536

Oracle soft nproc 2047

Hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

[Root @ rac01 ~] #/Etc/pam. d/login

Session required pam_limits.so

[Root @ rac01 ~] #/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

Umask 022

Fi

4.6. Disable firewall and SELINUX (all nodes)

Serviceiptables stop

Chkconfigiptables off

Chkconfigiptables -- list

Setenforce 0

Sed-I's/SELINUX =. */SELINUX = disabled/'/etc/selinux/config

4.7. Check the installation package

Rpm-q -- qf' % {NAME}-% {VERSION}-% {RELEASE} (% {ARCH}) \ n' binutils \

Compat-libstdc ++-33 \

Elfutils-libelf \

Elfutils-libelf-devel \

Gcc \

Gcc-c ++ \

Glibc \

Glibc-common \

Glibc-devel \

Glibc-headers \

Ksh \

Libaio \

Libaio-devel \

Libgcc \

Libstdc ++ \

Libstdc ++-devel \

Make \

Sysstat \

UnixODBC \

4.8. Configure user environment variables (grid and oracle user_all nodes)

Grid User:

[Grid @ rac01 ~] # Vi. bash_profile

Export ORACLE_SID = + ASM1/+ ASM2

Export ORACLE_BASE =/u01/app/oracle

Export ORACLE_HOME =/u01/app/grid/11.2

Export PATH = $ PATH: $ ORACLE_HOME/bin

Oracle users:

[Oracle @ rac01 ~] # Vi. bash_profile

Export ORACLE_SID = racdb1/racdb2

Export ORACLE_UNQNAME = $ ORACLE_SID

Export ORACLE_BASE =/u01/app/oracle

Export ORACLE_HOME = $ ORACLE_BASE/11.2/db_1

Export PATH = $ PATH: $ ORACLE_HOME/bin

4.9. ASM disk group planning & partitioning 4.9.1 use fdisk to partition disks, as shown below:

[Root @ rac01 ~] # Fdisk/dev/sdb

The Division effect is as follows:

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

Device Boot Start End Blocks Id System

/Dev/sdb1 1 132 1060258 + 83 Linux // CRS1 900 M

/Dev/sdb2 133 264 1060290 83 Linux // CRS2 900 M

/Dev/sdb3 265 396 1060290 83 Linux // CRS3 900 M

/Dev/sdb4 397 13054 101675385 5 Extended

/Dev/sdb5 397 3008 20980858 + 83 Linux // DATA1 30 GB

/Dev/sdb6 3009 5620 20980858 + 83 Linux // DATA2 30 GB

/Dev/sdb7 5621 8232 20980858 + 83 Linux // DATA3 30 GB

/Dev/sdb8 8233 9538 10490413 + 83 Linux // REC1 30 GB

/Dev/sdb9 9539 13054 28242238 + 83 Linux // REC2 30 GB

4.9.2 install asm

[Root @ rac02software] # rpm-ivh kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm

Warning: kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, keyID fd431d51: NOKEY

Preparing... ######################################## ### [100%]

1: kmod-oracleasm ##################################### ###### [100%]

[Root @ rac02 software] # rpm-ivhoracleasm-support-2.1.8-1.el6.x86_64.rpm

Warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY

Preparing... ######################################## ### [100%]

1: oracleasm-support ##################################### ###### [100%]

[Root @ rac02 software] # rpm-ivhoracleasmlib-2.0.4-1.el6.x86_64.rpm

Warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key IDec551f03: NOKEY

Preparing... ######################################## ### [100%]

1: oracleasmlib ####################################### #### [100%]

4.9.3 configure asm

RAC01:

[Root @ rac1 ~] #/Etc/init. d/oracleasmconfigure

[Root @ rac1 ~] #/Etc/init. d/oracleasmconfigure

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

Writing Oracle ASM library driverconfiguration: done

Initializing the Oracle ASMLib driver: [OK]

Scanning the system for Oracle ASMLibdisks: [OK]

RAC02 performs the following operations:

[Root @ rac02 software] #/etc/init. d/oracleasmconfigure

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

Writing Oracle ASM library driverconfiguration: done

Initializing the Oracle ASMLib driver: [OK]

Scanning the system for Oracle ASMLibdisks: [OK]

The following operations are performed on one of the rac nodes. I operate on rac1.

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk CRS1/dev/sdb1

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk CRS2/dev/sdb2

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk CRS3/dev/sdb3

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk DATA1/dev/sdb5

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk DATA2/dev/sdb6

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk DATA3/dev/sdb7

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk REC1/dev/sdb8

[Root @ rac1 ~] #/Etc/init. d/oracleasmcreatedisk REC2/dev/sdb9

The following operations are performed on another node and on RAC2:

[Root @ rac02 software] # oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

[Root @ Zracnode2 software] # oracleasmlistdisks

CRS1

CRS2

CRS3

DATA1

DATA2

DATA3

REC1

REC2

4.10.grid and oracle users configure SSH mutual trust

Create a connection for ssh and scp

Ls-l/usr/local/bin/ssh

Ls-l/usr/local/bin/scp

If not, create

[Root @ rac01 ~] #/Bin/ln-s/usr/bin/ssh/usr/local/bin/ssh

[Root @ rac01 ~] #/Bin/ln-s/usr/bin/scp/usr/local/bin/scp

Configure SSH for the grid user:

On each node:

[Root @ rac01 ~] # Su-grid

[Grid @ rac01 ~] # Mkdir ~ /. Ssh

[Grid @ rac01 ~] # Cd. ssh

[Grid @ rac01 ~] # Ssh-keygen-t rsa

[Grid @ rac01 ~] # Ssh-keygen-t dsa

On Node 1:

[Grid @ rac01 ~] # Touch authorized_keys

[Grid @ rac01 ~] # Ssh rac01 cat/home/grid/. ssh/id_rsa.pub> authorized_keys

[Grid @ rac01 ~] # Ssh rac02 cat/home/grid/. ssh/id_rsa.pub> authorized_keys

[Grid @ rac01 ~] # Ssh rac01 cat/home/grid/. ssh/id_dsa.pub> authorized_keys

[Grid @ rac01 ~] # Ssh rac02 cat/home/grid/. ssh/id_dsa.pub> authorized_keys

[Grid @ rac01 ~] # Scp authorized_keysrac02:/home/grid/. ssh/

On each node:

[Grid @ rac01 ~] # Ssh rac01 date

[Grid @ rac01 ~] # Ssh rac02 date

[Grid @ rac01 ~] # Ssh-agent $ SHELL

[Grid @ rac01 ~] # Ssh-add

Configure SSH for oracle users:

On each node:

[Root @ rac01 ~] # Su-oracle

[Oracle @ rac01 ~] # Mkdir ~ /. Ssh

[Oracle @ rac01 ~] # Cd. ssh

[Oracle @ rac01 ~] # Ssh-keygen-t rsa

[Oracle @ rac01 ~] # Ssh-keygen-t dsa

On Node 1:

[Oracle @ rac01 ~] # Touch authorized_keys

[Oracle @ rac01 ~] # Ssh rac01 cat/home/oracle/. ssh/id_rsa.pub> authorized_keys

[Oracle @ rac01 ~] # Ssh rac02 cat/home/oracle/. ssh/id_rsa.pub> authorized_keys

[Oracle @ rac01 ~] # Ssh rac01 cat/home/oracle/. ssh/id_dsa.pub> authorized_keys

[Oracle @ rac01 ~] # Ssh rac02 cat/home/oracle/. ssh/id_dsa.pub> authorized_keys

[Oracle @ rac01 ~] # Scp authorized_keysrac02:/home/oracle/. ssh/

On each node:

[Oracle @ rac01 ~] # Ssh rac01 date

[Oracle @ rac01 ~] # Ssh rac02 date

[Oracle @ rac01 ~] # Ssh-agent $ SHELL

[Oracle @ rac01 ~] # Ssh-add

4. 11. Configure NTP

[Root @ rac01 ~] # Vi/etc/ntp. conf

...

# Server 0.centos.pool.ntp.org

# Server 1.centos.pool.ntp.org

# Server 2.centos.pool.ntp.org

Server xxx. xxx

# Server127.127.1.0 # local clock

# Fudge 127.127.1.0 stratum 10

[Root @ rac01 ~] # Vi/etc/sysconfig/ntpd

# Drop root to id 'ntp: ntp 'by default.

OPTIONS = "-x-u ntp: ntp-p/var/run/ntpd. pid"

# Set to 'yes' to sync hw clock aftersuccessful ntpdate

SYNC_HWCLOCK = yes

# Additional options for ntpdate

NTPDATE_OPTIONS = ""

Start

[Root @ rac01 ~] # Chkconfig ntpd on

[Root @ rac01 ~] # Service ntpd start

[Root @ rac01 ~] # Ntpdate-d-u xxx. xxx

Enable name service cache daemon

[Root @ rac01 ~] # Chkconfig -- level 35 nscdon

[Root @ rac01 ~] # Service nscd restart


----------- The following two phases are GI installation and oracle installation, which are not complete yet !~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.