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

How to install the RAC environment of ORACLE data under linux system in the virtual software vmare

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to install the RAC environment of ORACLE data under the linux system in the virtual software vmare". In the operation of the actual case, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

/ opt / / install the package path and extract the grid package

1. Install the system, configure dual network cards, and configure shared disks (take rac02 as an example)

1.1 IP address Planning

192.168.47.151 rac01

192.168.47.152 rac02

10.11.12.51 rac01priv

10.11.12.52 rac02priv

192.168.47.153 rac01vip

192.168.47.154 rac02vip

192.168.47.155 racscanip

1.2 set up the shared disk (both virtual machine configurations need to be changed)

1.2.1 add standalone permanent disk-shared disk path: h:\ sharedisk\ diskrac2\ sharedisk*

1.2.2 change stand-alone virtual machine configuration (add and modify the following information in vmdk)

One:

Scsi1.present = "TRUE" scsi1.virtualDev = "lsilogic" scsi1.sharedBus = "virtual"

Scsi1:1.present = "TRUE" scsi1:1.mode = "independent-persistent"

Scsi1:1.filename = "H:\ sharedisk\ diskrac2\ sharediskOCR.vmdk"

Scsi1:1.deviceType = "plainDisk" scsi1:2.present = "TRUE"

Scsi1:2.mode = "independent-persistent"

Scsi1:2.filename = "H:\ sharedisk\ diskrac2\ sharediskrDate01.vmdk"

Scsi1:2.deviceType = "plainDisk"

Scsi1:3.present = "TRUE"

Scsi1:3.mode = "independent-persistent"

Scsi1:3.filename = "H:\ sharedisk\ diskrac2\ sharediskrDate02.vmdk"

Scsi1:3.deviceType = "plainDisk"

Scsi1:4.present = "TRUE"

Scsi1:4.mode = "independent-persistent"

Scsi1:4.filename = "H:\ sharedisk\ diskrac2\ sharediskrFlash.vmdk"

Scsi1:4.deviceType = "plainDisk"

Disk.locking = "false"

DiskLib.dataCacheMaxSize = "0"

DiskLib.dataCacheMaxReadAheadSize = "0"

DiskLib.DataCacheMinReadAheadSize = "0"

DiskLib.dataCachePageSize = "4096"

DiskLib.maxUnsyncedWrites = "0"

Disk.EnableUUID= "TRUE"

Two:

Scsi1.present = "TRUE"

Scsi1.virtualDev = "lsilogic"

Scsi1.sharedBus = "virtual"

Scsi1:0.present = "TRUE"

Scsi1:0.fileName = "C:\ sharedisk\ RAC01\ ocr1.vmdk"

Scsi1:0.mode = "independent-persistent"

Scsi1:0.deviceType = "plainDisk"

Scsi1:1.present = "TRUE"

Scsi1:1.fileName = "C:\ sharedisk\ RAC01\ ocr2.vmdk"

Scsi1:1.mode = "independent-persistent"

Scsi1:1.deviceType = "plainDisk"

Scsi1:2.present = "TRUE"

Scsi1:2.fileName = "C:\ sharedisk\ RAC01\ ocr3.vmdk"

Scsi1:2.mode = "independent-persistent"

Scsi1:2.deviceType = "plainDisk"

Scsi1:3.present = "TRUE"

Scsi1:3.fileName = "C:\ sharedisk\ RAC01\ data.vmdk"

Scsi1:3.mode = "independent-persistent"

Scsi1:3.deviceType = "plainDisk"

Scsi1:4.present = "TRUE"

Scsi1:4.fileName = "C:\ sharedisk\ RAC01\ fra.vmdk"

Scsi1:4.mode = "independent-persistent"

Scsi1:4.deviceType = "plainDisk"

Floppy0.present = "FALSE"

Disk.locking = "false"

DiskLib.dataCacheMaxSize = "0"

DiskLib.dataCacheMaxReadAheadSize = "0"

DiskLib.DataCacheMinReadAheadSize = "0"

DiskLib.dataCachePageSize = "4096"

DiskLib.maxUnsyncedWrites = "0"

Disk.EnableUUID= "TRUE"

Three:

Scsi1.sharedBus = "virtual"

Scsi1:0.deviceType = "plainDisk"

Scsi1:1.deviceType = "plainDisk"

Scsi1:2.deviceType = "plainDisk"

Scsi1:3.deviceType = "plainDisk"

Scsi1:4.deviceType = "plainDisk"

Disk.locking = "false"

DiskLib.dataCacheMaxSize = "0"

DiskLib.dataCacheMaxReadAheadSize = "0"

DiskLib.DataCacheMinReadAheadSize = "0"

DiskLib.dataCachePageSize = "4096"

DiskLib.maxUnsyncedWrites = "0"

Disk.EnableUUID= "TRUE"

2. Configure OS

2.1 turn off firewall, selinux

[root@rac02 ~] # chkconfig iptables off

[root@rac02 ~] # service iptables status

[root@rac02 ~] # service iptables stop

[root@rac02 ~] # vi / etc/selinux/config

SELINUX=disabled

2.2 modify the host file

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

172.19.15.142 racd01

172.19.15.141 racd02

10.10.11.10 racd01priv

10.10.11.22 racd02priv

172.19.15.143 racd01vip

172.19.15.144 racd02vip

172.19.15.145 racdscanip

2.3 configure yum feeds

2.3.1 configure a local yum source

[root@rac02 ~] # yum clean all

[root@rac02] # mkdir / mnt/cdrommount-t iso9660 / dev/cdrom / mnt/cdrom/

[root@rac02 ~] # vi / etc/yum.repos.d/local.repo

[local]

Name=local

Baseurl= file:///mnt/cdrom

Gpgcheck=0enabled=1

2.3.2 configure the 163yum source

[root@rac02 ~] # vi / etc/yum.repos.d/163.repo

[163]

Name=163

Baseurl= http://mirrors.163.com/centos/7/os/x86_64/

Gpgcheck=0enabled=1

# yum repolist

2.4 install the RPM package

[root@rac02 ~] # vi yum.sh

Yum install compat-lib*

Yum install binutils-2*

Yum install gcc*

Yum install glibc-2*

Yum install glibc-devel-2*

Yum install ksh

Yum install libgcc-4*

Yum install libstdc++-4*

Yum install libstdc++-d*

Yum install libaio-0*

Yum install libaio-d*

Yum install sysstat-9*

Yum install make-3*

Yum install binutils-2*

Yum install libc*

2.5 modify the kernel configuration file

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

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 1054472192

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

[root@rac02 ~] # # sysctl-p / / effective immediately.

2.6 modify user restrictions

[root@rac02 ~] # 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

Configure Oracle software installation groups, users, environment variables, installation directories

2.7.1 # create a group

Groupadd-g 1300 dbagroupadd-g 1301 opergroupadd-g 1000 oinstallgroupadd-g 1200 asmadmin

Groupadd-g 1201 asmdbagroupadd-g 1202 asmoper

# user

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

2.7.The configuration directory

Mkdir-p / u01/app/11.2.0/grid

Mkdir-p / u01/app/grid

Mkdir-p / u01/app/oracle

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/chown-R grid:oinstall / U01

2.7.The user environment variable modifies .bash _ profile under home (Oracle_sid needs to be modified according to different nodes)

ORACLE user

Export TMP=/tmp

Export TMPDIR=$TMPexport ORACLE_SID=orc1 # rac01

Export ORACLE_SID=orc2 # rac02

Export ORACLE_UNQNAME=orc

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

$source .bash _ profile / / make the configuration file effective

GRID user

Export TMP=/tmp

Export TMPDIR=$TMP

Export ORACLE_SID=+ASM1 # rac01

Export ORACLE_SID=+ASM2 # rac02

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

$source .bash _ profile / / make the configuration file effective

2.8. Configure grid and oracle user ssh mutual trust

Method 1:

# cd / software/grid/sshsetup

#. / sshUserSetup.sh-user grid-hosts "rac01 rac02"-advanced-noPromptPassphrase

#. / sshUserSetup.sh-user oracle-hosts "rac01 rac02"-advanced-noPromptPassphrase

Method 2:

1) on node 1:

[root@rac01 ~] $su-grid

[grid@rac01 ~] $cd / home/grid/

[grid@rac01 ~] $mkdir~/.ssh

[grid@rac01] $chmod 700 ~ / .ssh

[grid@rac01] $ssh-keygen-t rsa

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

2) on node 2:

[root@rac02 ~] $su-grid

[grid@rac02 ~] $cd / home/grid/

[grid@rac02] $mkdir ~ / .ssh

[grid@rac02] $chmod 700 ~ / .ssh

[grid@rac01] $ssh-keygen-t rsa

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

3) operate on only one node. Take rac01 as an example:

[grid@rac01] $touch ~ / .ssh/authorized_keys

[grid@rac01] $cd ~ / .ssh

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

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

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

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

[grid@rac01.ssh] $pwd

[grid@rac01.ssh] $scp authorized_keys racd02: `pwd`

4) each node operates

[grid@rac01] $chmod 600 ~ / .ssh/authorized_keys

[grid@rac01] $chmod 600 ~ / .ssh/authorized_keys

5) in the receiving order to run oui, run it with grid users. Take racd01 as an example:

[grid@rac01.ssh] $exec / usr/bin/ssh-agent $SHELL

[grid@rac01.ssh] $ssh-add

6) check mutual trust

$ssh rac01 date

$ssh rac02 date

$ssh rac01priv date

$ssh rac02priv date

2.9 configure bare device [root@rac01 ~] # fdisk / dev/sdb

N p 1 + 2G

N p 2 w

[root@rac01 ~] # 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} = = "17", 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} = = "33", 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} = = "49", 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} = = "65", 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} = = "81", RUN+= "/ bin/raw / dev/raw/raw5% M% m"

ACTION== "add", KERNEL== "raw*", OWNER= "grid", GROUP= "asmadmin", MODE= "660"

Use the following two statements when [root@rac01 ~] # start_udev / / cannot be installed correctly

/ / # raw/ dev/raw/raw1 / dev/sdb1

/ / # raw/ dev/raw/raw2 / dev/sdb2

[root@rac01] # raw-qa = equivalent to = ls-lrt / dev/raw

[root@rac01 ~] # ll / dev/raw

[root@rac01 ~] # partprobe

3. Install grid

[root@rac01 /] # xhost +

[root@rac01 /] # su-grid

[grid@rac01 ~] $export

[grid@rac01 ~] $cd / software/grid/

[grid@rac01 grid] $. / runInstaller

To run roo.sh, you can use the following command

[root@rac02] # / u01/app/11.2.0/grid/crs/install/rootcrs.pl-deconfig-force

View the installation log

[root@rac01 /] # cat / u01/app/oraInventory/logs/installActions2019-03-27004-25-47PM.log

Check crs status

[grid@rac01 ~] $crsctl check crs

Check Clusterware resources

[grid@rac01] $crs_stat-t-v

[grid@rac01] $crsctl stat res-t

Check cluster nodes

[grid@rac01] $olsnodes-n

Check the Oracle TNS listener process on both nodes

[grid@rac01 ~] $ps-ef | grep lsnr | grep-v 'grep' | grep-v' ocfs' | awk'{print$9}'

Confirm that the installed Oracle ASM is currently running:

[grid@rac01] $srvctl status asm-a. / runcluvfy.sh stage-post hwos-n rac01,rac02-verbose

Install asm [grid@rac01 ~] $asmca

4. Install oracle

[root@rac01 ~] # xhost +

[root@rac01 ~] # su-oracle

[oracle@rac01 ~] $cd / software/database

[oracle@rac01 database] $. / runInstaller

5. Check the configuration after installation

Check the cluster running status

[grid@rac01] $srvctl status database-d orc

Check the local node crs status

[grid@rac01 ~] $crsctl check crs

Check the crs status of the cluster

[grid@rac01 ~] $crsctl check cluster

Check cluster nodes

[grid@rac01] $olsnodes-n-I-s-t

Check the voting disk information between clusters

[grid@rac01 ~] $crsctl query css votedisk

Check the cluster scan ip

[grid@rac01 ~] $srvctl config scan

Check scan snooping

[grid@rac01 ~] $srvctl config scan_listener

6. Start and stop the cluster database and enter grid users

Database startup and shutdown of the whole cluster

[grid@rac01] $srvctl stop database-d orcl

[grid@rac01] $srvctl start database-d orcl

The user entering root only closes the current node

[root@rac01 bin] # pwd/u01/app/11.2.0/grid/bin

[root@rac01 bin] #. / crsctl stop crs

7 、 em

[oracle@rac1 ~] $emctl status dbconsole

[oracle@rac1 ~] $emctl start dbconsole

[oracle@rac1 ~] $emctl stop dbconsole

This is the end of the content of "how to install the RAC environment of ORACLE data under the linux system in the virtual software vmare". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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: 230

*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

Database

Wechat

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

12
Report