Oracle LINUX 6.3 + Oracle 11.2.0.3 RAC + VBox Installation Documentation

Source: Internet
Author: User
Tags dba stdin

Oracle LINUX 6.3 + Oracle 11.2.0.3 RAC + vbox Installation documentation2015-10-21 12:51 525 people read Comments (0) favorite reports Classification:Oracle RAC

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

VBOX + Oracle Linux 6U3 + Oracle 11.2.0.3.0 RAC Installation

Environment:

Virtual Machine BOX

OS ORACLE LINUX 6.3_x86_64

ORACLE 11.2.0.3.0_x86_64



1, install vitual BOX, skip over.
2. Install the Oracle LINUX 6U3 virtual machine with the option to select the desktop when installing.
Hardware configuration CPU 1, Memory 2048GB, hard disk 100GB, shared disk 30GB (6 5GB shared disk, fixed size, 3 blocks for asm,3 block for Oracle) every 3 blocks using grid ASMCA command to create a admdisk, 2 Nic (One of the bridge , another internal network),

3, configure the network environment,
Server 1 hostname RAC1 public Network Bridge Adapter ip:192.168.2.10 Gateway: 192.168.2.1 private Network Internal network card ip:172.168.1.10 Subnet mask is: 255.255.255.0
Server 2 hostname RAC2 public Network Bridge Adapter ip:192.168.2.11 Gateway: 192.168.2.1 private Network Internal network card ip:172.168.1.11 Subnet mask is: 255.255.255.0

4, and boot automatically activated. Add the/etc/hosts file as follows

#public
192.168.2.10 Rac1 rac1.fengg.com
192.168.2.11 Rac2 rac2.fengg.com

#vip
192.168.2.12 RAC1-VIP
192.168.2.13 RAC2-VIP

#scan
192.168.2.18 Rac-cluster Rac-cluster-scan

#priv
172.168.1.10 Rac1-priv
172.168.1.11 Rac2-priv

#public, VIP, scan in the same network segment, PRIV in the same network segment

5, close services such as firewall and disable SELinux
Vim/etc/selinux/config ==> selinux=disabled
[Email protected] ~]# chkconfig--level iptables off
[Email protected] ~]# chkconfig--level ip6tables off
[Email protected] ~]# chkconfig--level ATD Off
[Email protected] ~]# chkconfig--level postfix off
[Email protected] ~]# chkconfig--level bluetooth off

6, create user, group, directory and set password
Groupadd-g Asmadmin
Groupadd-g 5001 ASMDBA
Groupadd-g 5002 Asmoper
GROUPADD-G 6000 Oinstall
Groupadd-g 6001 DBA
Groupadd-g 6002 Oper

Useradd-g oinstall-g asmadmin,asmdba,asmoper,dba Grid
USERADD-G oinstall-g DBA,ASMDBA Oracle

echo ' Oracle ' | passwd--stdin Oracle
echo ' Oracle ' | passwd--stdin Grid

Mkdir/s01
Mkdir/g01

Chown oracle:oinstall/s01
Chown GRID:OINSTALL/G01


7. Install Oracle-rdbms-server-11gr2-preinstall with Yum to prepare the RAC installation environment
[Email protected] ~]# CD/ETC/YUM.REPOS.D
[Email protected] yum.repos.d]# MV Public-yum-ol6.repo Public-yum-ol6.repo.bak
[Email protected] yum.repos.d]# vim Public-yum-ol6.repo

[Oel6]
Name = Enterprise Linux 6.3 DVD
baseurl=file:///media/"OL6.3 x86_64 Disc 1 20120626"/server
Gpgcheck=0
Enabled=1

[email protected] ~]# Yum install oracle-rdbms-server-11gr2-preinstall*
Vim/etc/security/limits.conf
#在文件最后增加以下行
# Grid-rdbms-server-11gr2-preinstall setting for Nofile soft limit is 1024
Grid Soft Nofile 1024

# Grid-rdbms-server-11gr2-preinstall setting for Nofile hard limit is 65536
Grid hard Nofile 65536

# Grid-rdbms-server-11gr2-preinstall setting for Nproc soft limit is 2047
Grid Soft Nproc 2047

# Grid-rdbms-server-11gr2-preinstall setting for Nproc hard limit is 16384
Grid hard Nproc 16384

# Grid-rdbms-server-11gr2-preinstall setting for stack soft limit is 10240KB
Grid Soft Stack 10240

# Grid-rdbms-server-11gr2-preinstall setting for stack hard limit is 32768KB
Grid Hard Stack 32768

8. Clone the RAC2 virtual machine and modify the hostname and IP address of the RAC2
9. Configure two servers to mount shared storage

[[email protected] ~]# for i in B c d E F g;
Do
echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/\$ Name\ ", result==\" '/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/sd$i ' \ ", NAME=\" asm-disk$i\ ", Owner=\ "grid\", group=\ "asmadmin\", mode=\ "0660\" ">>/etc/udev/rules.d/99-oracle-asmdevices.rules
Done


[[email protected] ~]# for i in B c d E F g;
Do
echo "kernel==\" sd*\ ", bus==\" scsi\ ", program==\"/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/\$ Name\ ", result==\" '/sbin/scsi_id--whitelisted--replace-whitespace--device=/dev/sd$i ' \ ", NAME=\" asm-disk$i\ ", Owner=\ "grid\", group=\ "asmadmin\", mode=\ "0660\" ">>/etc/udev/rules.d/99-oracle-asmdevices.rules
Done

/sbin/start_udev

10, configure root, grid, Oracle user profile

Mkdir/g01/orabase

RAC1 node:
Export Grid_home=/g01/11ggrid/app/11.2.0/grid
Export Oracle_home=/g01/11ggrid/app/11.2.0/grid
Export path= $GRID _home/bin: $GRID _home/opatch:/sbin:/bin:/usr/sbin:/usr/bin

Export ORACLE_SID=+ASM1
Export ld_library_path= $GRID _home/lib: $GRID _home/lib32

Export Oracle_base=/g01/orabase
#export ora_nls10= $ORACLE _home/nls/data
Export nls_lang= "Simplified Chinese" _china.al32utf8

RAC2 node:
Export Grid_home=/g01/11ggrid/app/11.2.0/grid
Export Oracle_home=/g01/11ggrid/app/11.2.0/grid
Export path= $GRID _home/bin: $GRID _home/opatch:/sbin:/bin:/usr/sbin:/usr/bin

Export ORACLE_SID=+ASM2
Export ld_library_path= $GRID _home/lib: $GRID _home/lib32

Export Oracle_base=/g01/orabase
#export ora_nls10= $ORACLE _home/nls/data
Export nls_lang= "Simplified Chinese" _china.al32utf8


RAC1 and RAC2 node root user environment variables
Export Grid_home=/g01/11ggrid/app/11.2.0/grid
Export Oracle_home=/g01/11ggrid/app/11.2.0/grid
Export path= $GRID _home/bin: $GRID _home/opatch:/sbin:/bin:/usr/sbin:/usr/bin

RAC1 node environment variables for Oracle users
Mkdir/s01/orabase

Export Oracle_home=/s01/orabase/app/oracle/product/11.2.0/dbhome_1
Export path= $ORACLE _home/bin: $ORACLE _home/opatch:/sbin:/bin:/usr/sbin:/usr/bin
Export ORACLE_SID=RAC1
Export ld_library_path= $ORACLE _home/lib: $ORACLE _home/lib32
Export Oracle_base=/s01/orabase
#export ora_nls10= $ORACLE _home/nls/data
Export nls_lang= "Simplified Chinese" _china.al32utf8


RAC2 node environment variables for Oracle users
Mkdir/s01/orabase


Export Oracle_home=/s01/orabase/app/oracle/product/11.2.0/dbhome_1
Export path= $ORACLE _home/bin: $ORACLE _home/opatch:/sbin:/bin:/usr/sbin:/usr/bin

Export ORACLE_SID=RAC2
Export ld_library_path= $ORACLE _home/lib: $ORACLE _home/lib32

Export Oracle_base=/s01/orabase
#export ora_nls10= $ORACLE _home/nls/data
Export nls_lang= "Simplified Chinese" _china.al32utf8

11, install Linux under the Xterm software support Xmanger graphical interface yum install xterm*
12. Install the grid clustware software without selecting the GNS option.
Note: Pre-installation Check failures can be ignored
Device Check for ASM warning No
Network time Protocol (NTP) Warning No
Task resolv.conf Integrity failed No

The following options can be ignored when installation fails
Oracleoracle Cluster Verification utility failed, configure Oracle Grid infrastructure for a cluster failed

13. Install Oracle Software again

14. In the RAC1 and RAC2 node grid, Oracle hit the PSU patch, patch file P14727347_112030_linux-x86-64.zip,unzip extracted to the/tmp/patch directory, Upgrade the Opatch command software before upgrading the PSU, package p6880880_112000_linux-x86-64.zip, unzip to the grid home directory to overwrite the Opatch directory
Opatch lspatches ==> Check PSU patch
Su-root
$GRID _home/crs/install/rootcrs.pl-unlock
On Aix: Su-root; Slibclean

Su-grid
Opatch Napply-oh $GRID _home-local/tmp/patch/14727310/
Opatch Napply-oh $GRID _home-local/tmp/patch/15876003/

Su-oracle
[Email protected] scripts]$/tmp/patch/15876003/custom/server/15876003/custom/scripts/prepatch.sh-dbhome $ORACLE _ HOME
/tmp/patch/15876003/custom/server/15876003/custom/scripts/prepatch.sh completed successfully.

#注意patch权限
Opatch Napply-oh $ORACLE _home-local/tmp/patch/15876003/custom/server/15876003
Opatch Napply-oh $ORACLE _home-local/tmp/patch/14727310

/tmp/patch/15876003/custom/server/15876003/custom/scripts/postpatch.sh-dbhome $ORACLE _home

Su-root
[Email protected] ~]#/g01/11ggrid/app/11.2.0/grid/rdbms/install/rootadd_rdbms.sh
[Email protected] ~]#/g01/11ggrid/app/11.2.0/grid/crs/install/rootcrs.pl-patch

15. Install Oracle database using DBCA

16,rac monitor installed grid automatically created, Tnsnames.ora files and related commands are as follows:

/usr/bin/xterm-ls-display $DISPLAY

CRSCTL Stat res-t
CRSCTL Check CRS
Asmcmd
Asmcmd>lsdg
Asmcmd> Lsdsk
Crs_stat|grep VIP
Crsctl Stat Res ORA.SCAN1.VIP
Crsctl Stat Res ora.scan1.vip-p
Crsctl Stat Res ora.net1.network
Crsctl Stat Res ora.net1.network-p
Opatch Auto
Opatch lspatches
Opatch version
Opatch lsinventory
CRSCTL Check has
CRSCTL Check CRS
Crsctl Stop Has-f
Crsctl start has
Srvctl Stop database-d RAC
Srvctl Start database-d RAC
Srvctl Status database-d RAC
Srvctl Config database-d RAC
Crsctl Stop Cluster-all
Crsctl Start Cluster-all
Crsctl Start Cluster-n Rac1 rac2
Crsctl Status Resource-t
CRSCTL Check Cluster
Crsctl Check CTSS
Srvctl Status Asm-a
Cluvfy Comp Clocksync-verkbose
Olsnodes-n
Ocrcheck
Crsctl Query CSS Votedisk
Crs_stat-t-V


Crsctl Start Cluster-all
Crsctl Stop Cluster-all
Srvctl Start database-d RAC
Srvctl Stop database-d RAC


Show parameter cluster_database;
Show parameter Local_listener;
Show parameter Remote_listener;
SELECT * from V$instance;
SELECT * from Gv$instance;


See Cluster status
Crs_stat-t
View Cluster resource information
Srvctl config database-d rac-a
View connection Information
Srvctl config database-d rac-t
View service Information
Srvctl config service-d rac-a
Srvctl Config service-d rac-s RAC
Srvctl config service-d rac-s rac-a
View ASM Information
Srvctl config asm-n Rac1
Srvctl config asm-n rac2
Viewing listening information
Srvctl config listener-n Rac1
Srvctl config listener-n rac2
View database Status
Srvctl Status database-d RAC
Srvctl Status database-d rac-v


Viewing the Listening status
Srvctl Status instance-d rac-i rac1,rac2
Srvctl Status instance-d rac-i rac1,rac2-v


View Node app status
Srvctl Status Nodeapps-n Rac1
Srvctl Status Nodeapps-n RAC2


View node ASM status
Srvctl Status Asm-n Rac1
Srvctl Status Asm-n RAC2


Close the currently connected instance
Srvctl Stop instance-i rac1-d rac-o abort
Open current Instance
Srvctl Start Instance-i rac1-d RAC


Set the service TAF mode to basic
RAC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = RAC1-VIP) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = RAC2-VIP) (PORT = 1521))
(load_balance = yes)
(Connect_data =
(SERVER = dedicated)
(service_name = RAC)
(Failover_mode =
(TYPE = SELECT)
(METHOD = BASIC)
(retries = 180)
(DELAY = 5)
)
)
)



Client Tnsnames.ora
Use the database Tnsname connection as follows:

RAC_12/13 =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.12) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.2.13) (PORT = 1521))
(load_balance = yes)
(Failover=yes)
)
(Connect_data =
(server=dedicated)
(service_name = RAC)
)
)





SELECT x.ksppinm NAME, Y.KSPPSTVL VALUE, X.ksppdesc describ
From Sys.x$ksppi x, SYS.X$KSPPCV y
WHERE x.inst_id = USERENV (' Instance ')
and y.inst_id = USERENV (' Instance ')
and x.indx = Y.indx
and x.ksppinm like '%high% ';


Virtual machines can turn off this option to improve performance

Sql> alter system set "_high_priority_processes" = ' lms* ' scope=spfile;

Reference from the Internet

Oracle LINUX 6.3 + Oracle 11.2.0.3 RAC + VBox Installation Documentation

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.