Kind Oracle 11GR2 RAC installation configuration-Prerequisite configuration phase
Installing the Oracle 11GR2 11.2.0.4 RAC cluster based on Linux RedHat 6.4 in Vmwarevcenter server
1. Network Planning
Where public and private are divided into different network segments. Guaranteed Safe Transmission
[root@zracnode1~]# cat/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4localhost4.localdomain4
:: 1 localhost 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
10.2.12.141 Zracnode2-priv
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 |
|
/ |
30GB |
|
Swap |
16GB |
|
/u01 |
100GB |
|
3. Shared Disk Settings
There are several ways to share disk configurations, NFS, and disk array direct mapping, which I'm using with shared disk technology on VMware vCenter Server, with the following steps:
3.1. The SCSI controller needs to be configured. Configure the bus to [physical] mode. The parameters are explained as follows:
Options |
Describe |
No |
Other virtual machines cannot share virtual disks. |
Virtual |
Virtual machines on the same server can share virtual disks. |
Physical |
The virtual disks can be shared by virtual machines on any server. |
3.2 The new SCSI controller 1 controller, and set the relevant parameters, the Vmwarevcenter operation page is as follows:
3.3 Create a new hard disk with a hard disk type of [Thick provision eager zeroed]. and set virtual Device node to [SCSI (1:0)]. In set disk mode to [Independent-persistent]. The Operation page is as follows:
3.4 Add the existing disk, above the ZRAC02 node, add the disk. The Operation page is as follows:
4. Installing RAC
4.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
Installation of VNC on Linux
#yuminstall Tigervnc-server
#vncserver #该命令在服务器端启动一个VNC进程. Allow a
VNC View connection, if you need multiple view connections to the server, you need to execute the above command multiple times;
Password: # In order to not want anyone can remotely control this computer. Therefore, when you start the VNC server for the 1th time, you will be asked to set the password for the network remote.
Verify: # verify password;
Go to the. VNC hidden directory in the root master directory, locate the Xstartup file and edit it:
# CD/ROOT/.VNC
# VI Xstartup
# twm& (comment out the line)
startkde& (Add this line)
# KILLALLXVNC
#vncserver
4.2 Configuring the/etc/hosts file (all nodes)
[root@rac01network-scripts]# vi/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4localhost4.localdomain4
:: 1 localhost 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
10.2.13.141 Zracnode2-priv
10.2.13.142 Zrac-scan
4.3 Adding a combined user (all nodes)
groupadd-g500 Oinstall
groupadd-g501 DBA
groupadd-g502 Oper
groupadd-g503 Asmadmin
groupadd-g504 Asmoper
groupadd-g505 ASMDBA
Useradd-goinstall-g Dba,asmdba,oper Oracle
Useradd-goinstall-g asmadmin,asmdba,asmoper,oper,dba Grid
Detecting User Oracle and Grid
[root@rac1~]# ID Oracle
uid=500 (Oracle) gid=500 (oinstall) groups=500 (Oinstall), 501 (DBA), 502 (Oper), 505 (ASMDBA)
[root@rac1~]# ID Grid
uid=501 (GRID) gid=500 (Oinstall) groups=500 (Oinstall), 501 (DBA), 502 (OPER), 503 (Asmadmin), 504 (Asmoper), 505 (ASMDBA)
Set a password for user Oracle and grid
[root@rac1~]# passwd Oracle
[root@rac1~]# passwd Grid
4.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 modification parameters effective 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
Oracle 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 users:
[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 uses FDISK to partition disks, as follows:
[Root@rac01 ~]# Fdisk/dev/sdb
The partitioning effect is as follows:
---------------------------------------------------------------------------
Device Boot Start End Blocks Id System
/DEV/SDB1 1 1060258+ Linux//crs1 900M
/DEV/SDB2 133 1060290 Linux//crs2 900M
/DEV/SDB3 265 396 1060290, Linux//crs3 900M
/DEV/SDB4 397 13054 101675385 5 Extended
/DEV/SDB5 397 3008 20980858+, Linux//data1 30GB
/DEV/SDB6 3009 5620 20980858+, Linux//data2 30GB
/dev/sdb7 5621 8232 20980858+, Linux//data3 30GB
/DEV/SDB8 8233 9538 10490413+, Linux//rec1 30GB
/DEV/SDB9 9539 13054 28242238+, Linux//rec2 30GB
4.9.2 Installing 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 Configuring ASM
RAC01 perform the following actions:
[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 perform the following actions:
[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, and I operate on the 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 the other node, on the 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 User Configuration SSH Trust
Creating connections for SSH and SCP
Ls-l/usr/local/bin/ssh
Ls-l/USR/LOCAL/BIN/SCP
Does not exist then creates
[Root@rac01 ~]#/bin/ln-s/usr/bin/ssh/usr/local/bin/ssh
[Root@rac01 ~]#/bin/ln-s/USR/BIN/SCP/USR/LOCAL/BIN/SCP
To configure SSH for a 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, respectively:
[Grid@rac01 ~]# ssh rac01 date
[Grid@rac01 ~]# ssh rac02 date
[Grid@rac01 ~]# ssh-agent $SHELL
[Grid@rac01 ~]# Ssh-add
To configure SSH for an Oracle User:
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, respectively:
[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.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.xxx.xxx
Enable Name Service Cache Daemon
[Root@rac01 ~]# chkconfig--level Nscdon
[ROOT@RAC01 ~]# Service NSCD restart
-----------The following two stages, which are GI installation and Oracle installation, have been continued! ~
http://www.bkjia.com/PHPjc/1114837.html www.bkjia.com true http://www.bkjia.com/PHPjc/1114837.html techarticle Kind Oracle 11GR2 RAC installation configuration-The prerequisite configuration phase installs Oracle 11GR2 11.2.0.4 RAC cluster 1 based on Linux RedHat 6.4 in Vmwarevcenter server. Network planning Which Pu ...