Oracle RAC Deployment Process

Source: Internet
Author: User
Tags chmod dba iptables

Lsb_release-a
Vmware-vdiskmanager.exe-c-S 20000mb-a lsilogic-t 2 D:\ORACLE_RAC\OCR.VMDK
Vmware-vdiskmanager.exe-c-S 20000mb-a lsilogic-t 2 D:\ORACLE_RAC\OCR2.VMDK
Vmware-vdiskmanager.exe-c-S 20000mb-a lsilogic-t 2 D:\ORACLE_RAC\VOTINGDISK.VMDK
Vmware-vdiskmanager.exe-c-S 30000mb-a lsilogic-t 2 D:\ORACLE_RAC\DATA.VMDK
Vmware-vdiskmanager.exe-c-S 20000mb-a lsilogic-t 2 D:\ORACLE_RAC\BACKUP.VMDK
RAC1 Configure the VMX virtual machine configuration file in the virtual machine RAC1 RAC2 directory, and add the following at the end of the row:
Scsi1.present = "TRUE"
Scsi1.virtualdev = "Lsilogic"
Scsi1.sharedbus = "virtual"
Scsi1:1.present = "TRUE"
Scsi1:1.mode = "Independent-persistent"
Scsi1:1.filename = "D:\ORACLE_RAC\OCR.VMDK"
Scsi1:1.devicetype = "Plaindisk"
Scsi1:2.present = "TRUE"
Scsi1:2.mode = "Independent-persistent"
Scsi1:2.filename = "D:\ORACLE_RAC\VOTINGDISK.VMDK"
Scsi1:2.devicetype = "Plaindisk"
Scsi1:3.present = "TRUE"
Scsi1:3.mode = "Independent-persistent"
Scsi1:3.filename = "D:\ORACLE_RAC\DATA.VMDK"
Scsi1:3.devicetype = "Plaindisk"
Scsi1:4.present = "TRUE"
Scsi1:4.mode = "Independent-persistent"
Scsi1:4.filename = "D:\ORACLE_RAC\BACKUP.VMDK"
Scsi1:4.devicetype = "Plaindisk"
Scsi1:5.present = "TRUE"
Scsi1:5.mode = "Independent-persistent"
Scsi1:5.filename = "D:\ORACLE_RAC\OCR2.VMDK"
Scsi1:5.devicetype = "Plaindisk"
Disk.locking = "false"
Disklib.datacachemaxsize = "0"
Disklib.datacachemaxreadaheadsize = "0"
Disklib.datacacheminreadaheadsize = "0"
Disklib.datacachepagesize = "4096"
Disklib.maxunsyncedwrites = "0" Off SELinux
Setenforce 0
[Email protected] ~]# Vi/etc/selinux/config
Selinux=disabled
Shutting down the firewall
Service Iptables Stop
Chkconfig iptables off
Uninstalling the NTP service
[[email protected] ~]# Rpm-qa |grep NTP
[Email protected] ~]# rpm-e--nodeps ntp-4.2.6p5-1.el6.centos.x86_64
[Email protected] ~]# rpm-e--nodeps ntpdate-4.2.6p5-1.el6.centos.x86_64
[[Email protected] ~] #mv/etc/ntp.conf/etc/ntp.conf.bakhostname Rac1
Hostname RAC2
RAC1
Eth0 192.168.100.103
Eht1 10.10.10.100
RAC2
Eth0 192.168.100.104
Eth1 10.10.10.101
Vi/etc/sysconfig/networkvi/etc/hosts
192.168.100.103 Rac1
192.168.100.104 RAC2
192.168.100.105 RAC1-VIP
192.168.100.108 RAC2-VIP
10.10.10.100 Rac1-priv
10.10.10.101 Rac2-priv
192.168.100.88 SCAN-IP Create related users:
GROUPADD-G 1300 DBA
Groupadd-g 1301 Oper
Groupadd-g Oinstall
Groupadd-g Asmadmin
Groupadd-g 1201 Asmdba
GROUPADD-G 1202 Asmoper
Useradd-m-u 1100-g oinstall-g asmadmin,asmdba,asmoper-s/bin/bash grid
Useradd-m-u 1101-g oinstall-g dba,oper,asmdba-s/bin/bash Oracle
Set the relevant account password:
passwd Oracle passwd Grid
RAC1 RAC2 Mutual configuration ssh secret key login
Execute the following 2-line commands in the user root Oracle grid:
RAC1, RAC2:
SSH-KEYGEN-T RSA
Ssh-keygen-t DSA
Switch users to configure the following SSH command:
Su-oracle
Su-grid
RAC1
[Email protected] ~]$
SSH Rac1 cat ~/.ssh/id_rsa.pub >> Authorized_keys
SSH rac2 cat ~/.ssh/id_rsa.pub >> Authorized_keys
SSH Rac1 cat ~/.ssh/id_dsa.pub >> Authorized_keys
SSH rac2 cat ~/.ssh/id_dsa.pub >> Authorized_keys
[email protected]. ssh]$ SCP Authorized_keys rac2:~/.ssh/
[email protected]. ssh]$ chmod Authorized_keys
RAC2:
[Email protected] ~]$
SSH rac2 cat ~/.ssh/id_rsa.pub >> Authorized_keys
SSH Rac1 cat ~/.ssh/id_rsa.pub >> Authorized_keys
SSH rac2 cat ~/.ssh/id_dsa.pub >> Authorized_keys
SSH Rac1 cat ~/.ssh/id_dsa.pub >> Authorized_keys
[email protected]. ssh]$ SCP Authorized_keys rac1:~/.ssh/
[email protected]. ssh]$ chmod Authorized_keys
SSH Rac1 Date
SSH RAC2 Date
SSH Rac1-priv Date
SSH rac2-priv Date configuration directory
Mkdir-p/u01/app/11.2.0/grid
Mkdir-p/u01/app/grid
Mkdir-p/u01/app/oracle
Chown-r grid:oinstall/u01
Chown Grid:oinstall/u01/app/11.2.0/grid
Chown Grid:oinstall/u01/app/grid
Chown oracle:oinstall/u01/app/oracle
Chmod-r 775/u01/Set the kernel file:
Vi/etc/sysctl.conf
FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 4398046511104
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
Net.ipv4.tcp_wmem = 262144 262144 262144
Net.ipv4.tcp_rmem = 4194304 4194304 4194304
Reference value:
Kernel.shmmax = 1054472192 (reference value)
SYSCTL-P immediate effect configuration system files
Vi/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

Configuring Grid and Oracle User environment variables
Su-oracle
Oracle Environment variables
VI. bash_profile
Export Tmp=/tmp
Export tmpdir= $TMP
Export ORACLE_SID=ORCL1 # RAC1
Export Oracle_sid=orcl2 # RAC2
Export ORACLE_UNQNAME=ORCL
Export Oracle_base=/u01/app/oracle
Export Oracle_home= $ORACLE _base/product/11.2.0/db_1
Export tns_admin= $ORACLE _home/network/admin
Export Path=/usr/sbin: $PATH
Export path= $ORACLE _home/bin: $PATH
Export Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib
Export classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib
Umask 022
Make the configuration file effective as source. bash_profile
Grid environment variables
Su-grid
VI. bash_profile
Export Tmp=/tmp
Export tmpdir= $TMP
Export ORACLE_SID=+ASM1 # RAC1

Export ORACLE_SID=+ASM2 # RAC2 Configure one to export Oracle_base=/u01/app/grid
Export Oracle_home=/u01/app/11.2.0/grid
Export Path=/usr/sbin: $PATH
Export path= $ORACLE _home/bin: $PATH
Export Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib
Export classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib
Umask 022
Make the configuration file effective as source. bash_profile
Configure Login
[Email protected] ~]# Vi/etc/pam.d/login
Session required pam_limits.so configuration bare disk:
To view unformatted disks
Fdisk-l
Ls/dev/sd
FDISK format command:
Fdisk/dev/sdb
Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P
Partition number (1-4): 1
Last w command to save changes
Command (M for help): W
Execute in turn:
Fdisk/dev/sdb
Fdisk/dev/sdd
Fdisk/dev/sdc
Fdisk/dev/sdf
Fdisk/dev/sde
Vi/etc/udev/rules.d/60-raw.rules
action== "Add", kernel== "/dev/sdb1", run+= '/bin/raw/dev/raw/raw1%N "
action== "Add", env{major}== "8", env{minor}== "+", run+= "/bin/raw/dev/raw/raw1%M%M"
action== "Add", kernel== "/DEV/SDC1", run+= '/bin/raw/dev/raw/raw2%N "
action== "Add", env{major}== "8", env{minor}== ", run+="/bin/raw/dev/raw/raw2%M%M "
action== "Add", kernel== "/dev/sdd1", run+= '/bin/raw/dev/raw/raw3%N "
action== "Add", env{major}== "8", env{minor}== "$", run+= "/bin/raw/dev/raw/raw3%M%M"
action== "Add", kernel== "/dev/sde1", run+= '/bin/raw/dev/raw/raw4%N "
action== "Add", env{major}== "8", env{minor}== ", run+="/bin/raw/dev/raw/raw4%M%M "
action== "Add", kernel== "/dev/sdf1", run+= '/bin/raw/dev/raw/raw5%N "
action== "Add", env{major}== "8", env{minor}== "Bayi", run+= "/bin/raw/dev/raw/raw5%M%M"
action== "Add", kernel== "Raw[1-5", owner= "grid", group= "Asmadmin", mode= "660"
Synchronize commands under RAC1 and RAC2: Partprobe
Execute this command to view the following: Ll/dev/raw/raw

View Bare disk information:
[Email protected] ~]# lsblk
NAME maj:min RM SIZE RO TYPE mountpoint
SDA 8:0 0 40G 0 disk
├─SDA1 8:1 0 1000M 0 part/boot
├─sda2 8:2 0 3.9G 0 part [SWAP]
└─sda3 8:3 0 35.1G 0 Part/
SDB 8:16 0 19.5G 0 disk
└─SDB1 8:17 0 19.5G 0 part
SDC 8:32 0 19.5G 0 disk
└─SDC1 8:33 0 19.5G 0 part
SDD 8:48 0 29.3G 0 disk
└─SDD1 8:49 0 29.3G 0 part
SDE 8:64 0 19.5G 0 disk
└─sde1 8:65 0 19.5G 0 part
SDF 8:80 0 19.5G 0 disk
└─SDF1 8:81 0 19.5G 0 part
Sr0 11:0 1 4.2G 0 rom
Mount Optical Drive
Mount/dev/sr0/media/centos_6.5_final (Reference command: mount/dev/cdrom/mnt/cdrom/)
Vi/etc/yum.repos.d/dvd.repo
[DVD]
Name=dvd
Baseurl=file:///media/centos_6.5_final
Gpgcheck=0
Enabled=1
: wq!
To install a dependency package:
[email protected] ~]# Yum Clean all
[email protected] ~]# Yum Makecache
[email protected] ~]# Yum install gcc gcc-c++ glibc Glibc-develKsh LIBGCC libstdc++Libstdc++-devel Make Sysstat
Yum Install binutils-2
Compat-libcap1-1 COMPAT-LIBSTDCGcc-4 gcc-c++-4Glibc-2 Glibc-devel-2Libgcc-4 libstdc++-4Libstdc++-devel-4 libaio-0libaio-devel-0 make-3Sysstat-9 - y
Mv/etc/yum.repos.d/centos-base.repo/root
Mv/etc/yum.repos.d/centos-debuginfo.repo/root
Mv/etc/yum.repos.d/centos-media.repo/root
Mv/etc/yum.repos.d/centos-vault.repo/root
Cp/root/centos-base.repo/etc/yum.repos.d
Cp/root/centos-debuginfo.rep/etc/yum.repos.d
Cp/root/centos-media.repo/etc/yum.repos.d
Cp/root/centos-vault.repo/etc/yum.repos.d
Yum Install-y glibc-devel-2.12-1.209.el6_9.2.i686
Yum Install-y libstdc++-4.4.7-18.el6.i686
Yum install-y glibc.i686 glibc.x86_64
Yum Install-y elfutils-libelf-devel.i686
Yum install-y elfutils-libelf

Install under Grid
Cvuqdisk Bag
Xhost + #使所有用户都能访问图形桌面, this step needs to be manipulated in the graphical interface
Date-s 18:00:00
/u01/app/orainventory/orainstroot.sh
/u01/app/11.2.0/grid/root.sh

/u01/app/11.2.0/grid/crs/install/crsconfig_params
[Email protected] grid]#/u01/app/11.2.0/grid/root.sh
Running Oracle 11g root.sh script ...
The following environment variables is set as:
oracle_owner= Grid
Oracle_home=/u01/app/11.2.0/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "Dbhome" already exists in/usr/local/bin. Overwrite it? (y/n)

Copying dbhome To/usr/local/bin ...
The file "Oraenv" already exists in/usr/local/bin. Overwrite it? (y/n)

Copying oraenv To/usr/local/bin ...
The file "Coraenv" already exists in/usr/local/bin. Overwrite it? (y/n)

Y Copying coraenv To/usr/local/bin ...
Entries'll be added to The/etc/oratab file as needed by
Database Configuration Assistant When a database is created
Finished running generic part of root.sh script.
Now product-specific root actions would be performed.
2017-08-03 18:31:49:parsing the host name
2017-08-03 18:31:49:checking for Super User privileges
2017-08-03 18:31:49:user has super User privileges
Using configuration parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS is already configured on this node for crshome=0
Cannot Configure-CRS instances on the same cluster.
Deconfigure before proceeding with the configuration of the new home.
[Email protected] grid]#
Uninstall command
$GRID _home/crs/install/roothas.pl-delete-force-verbose
/u01/app/11.2.0/grid/crs/install/rootcrs.pl-delete-force-verbose
Existing OCR configuration found, aborting the configuration. Rerun configuration setup after deinstall at/u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 10302.
Determine if the RAC is OK
Su-grid
Crsctl Status Resource-t
modifying network card Rules
Vi/etc/udev/rules.d/70-persistent-net.rules
Troika is not DG GG RAC
To toggle the SCAN-IP command:
Srvctl relocate Scan_listener-i 1-n RAC2

Oracle RAC Deployment Process

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.