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 oracle rac database

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces how to install the oracle rac database, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

This time, use vm virtualBOX for installation, configure two-node RAC and use ASM shared disk group for storage management.

Install version linux 5.6

1. Linux installation and configuration

Memory disk network card

1536M30G two network cards (host mode only)

Network card configuration

Hostname IP (eth0) priv (eth2) Port number Gateway

Rac1192.168.80.5010.0.80.1024192.168.80.0

Rac2192.168.80.6010.0.80.2024192.168.80.0

The system shuts down unwanted services

Service NetworkManager stop

Service acpid stop

Service anacron stop

Service apmd stop

Service atd stop

Service auditd stop

Service autofs stop

Service avahi-daemon stop

Service avahi-dnsconfd stop

Service bluetooth stop

Service conman stop

Service cpuspeed stop

Service cups stop

Service dnsmasq stop

Service dund stop

Service firstboot stop

Service gpm stop

Service haldaemon stop

Service hidd stop

Service ip6tables stop

Service ipmi stop

Service ipmievd stop

Service iptables stop

Service irda stop

Service irqbalance stop

Service kdump stop

Service kudzu stop

Service mcstrans stop

Service mdmpd stop

Service microcode_ctl stop

Service netconsole stop

Service netfs stop

Service netplugd stop

Service nfs stop

Service nfslock stop

Service nscd stop

Service ntpd stop

Service pand stop

Service pcscd stop

Service portmap stop

Service psacct stop

Service rawdevices stop

Service rdisc stop

Service readahead_early stop

Service readahead_later stop

Service restorecond stop

Service rhnsd stop

Service rpcgssd stop

Service rpcidmapd stop

Service rpcsvcgssd stop

Service saslauthd stop

Service sendmail stop

Service setroubleshoot stop

Service smartd stop

Service vncserver stop

Service wdaemon stop

Service winbind stop

Service wpa_supplicant stop

Service xfs stop

Service xinetd stop

Service ypbind stop

Service yum-updatesd stop

Modify the hosts directory / etc/hosts

# # Public Network-(eth0)

192.168.80.50 rac1

192.168.80.60 rac2

# # Private Interconnect-(eth2)

10.0.80.10 rac1-priv

10.0.80.20 rac2-priv

# # Public Virtual IP (VIP) addresses-(eth0)

192.168.80.100 rac1-vip

192.168.80.200 rac2-vip

# # scan IP

192.168.80.150 rac-scan

Modify kernel parameter / etc/sysctl.conf

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 4294967295

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

The current configuration parameters take effect

Space / sbin/sysctl-p

Security restrictions configuration / etc/security/limits.conf

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

Oracle soft stack 10240

Grid soft nproc 2047

Grid hard nproc 16384

Grid soft nofile 1024

Grid hard nofile 65536

Grid soft stack 10240

Configuration meaning

Soft refers to the setting for which the current system is in effect.

Hard indicates the maximum value that can be set in the system. The limit of soft cannot be higher than the limit of har

Nofile-maximum number of files opened

Nproc-maximum number of processes available to a single user

Create users and groups

Groupadd-g 1000 oinstall

Groupadd-g 1001 dba

Groupadd-g 1002 oper

Groupadd-g 2000 asmadmin

Groupadd-g 2001 asmdba

Groupadd-g 2002 asmoper

Useradd-u 2001-d / home/grid-g oinstall-G asmadmin,asmdba,asmoper,oper,dba grid

Useradd-u 1001-d / home/oracle-g oinstall-G dba,asmdba,oper oracle

Configure password

Passwd grid

Passwd oracle

Create a directory to store installation files

Mkdir / soft

Chown-R oracle:oinstall / soft

Chmod-R 775 / soft

Create installation directory and change permissions

Mkdir-p / u01/app/11.2.0/grid

Mkdir-p / u01/app/grid

Mkdir-p / u01/app/oracle

Mkdir-p / u01/app/oraInventory

Chown-R grid:oinstall / U01

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

Chmod-R 755 / U01

Chmod 775 / u01

Chmod 775 / u01/app

Set environment variables for oracle and grid users

Oracle user

[oracle@rac1 ~] vi .bash _ profile

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

Export ORACLE_SID=RACDB1

Export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

Grid user

[grid@rac1 ~] $vi .bash _ profile

Export ORACLE_BASE=/u01/app/grid

Export ORACLE_HOME=/u01/app/11.2.0/grid

Export ORACLE_SID=+ASM1

Export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH

Toggle root user configuration yum source installation Yum package

1. Insert the CD

2. Mount mount / dev/cdrom / mnt

3. Configure yum source text vi / etc/yum.repos.d/public-yum-el5.repo

[oel5]-the name of the yum source, which must be globally unique and unique.

Name = Enterprise Linux 5.6DVD-comment content, which can be specified at will

Baseurl= file:///mnt/Server/-the path to the yum source, which supports three protocols: http, ftp, and file, where file represents the local file, and here the file:// is followed by the iso mount path

Gpgcheck=0-1 means enabled, 0 means disabled

Enabled=1-fingerprint check. 0 means no verification.

Yum installation

[root@ocmu ~] # yum install oracle-validated

Remove the disc and copy the two nodes

Reset the mac address of the network card and copy it completely

Configure rac2 hostnam

Vi / etc/sysconfig/network

Change hostname to rac2

Change the hosts hostname vi / etc/hosts

127.0.0.1 hostname changed to rac2 localhost.localdomain localhost

Effective hostname immediately

Hostname rac2

Query whether the hostname change takes effect

Hostname

Configure rac2 Nic with reference to rac1

Cd / etc/sysconfig/network-scripts/

Ls | grep ifcfg-eth

Cat ifcfg-eth0

Cat ifcfg-eth2

Copy the contents of the HWADDR

Change the content in eth0.bak and eth2.bak

DEVICE=eth0-name of the network card

BOOTPROTO=static-Startup mode (static static, dhcp dynamic)

BROADCAST=192.168.80.255-broadcast addr

HWADDR=08:00:27:16:8e:36-mac Nic address

IPADDR=192.168.80.60-IP address

NETMASK=255.255.255.0-Subnet Mask

NETWORK=192.168.80.0-Gateway addr

ONBOOT=yes-whether the network card is started when the system starts (yes, no)

Save the IP address, boot mode (changed to static) and mac address (previously copied content) of the two network cards.

Delete eth0 and eth2, and change eth0.bak and eth2.bak to eth0, eth2

Restart the network card service network restart

Modify the environment variable of rac2

Oracle user

[oracle@rac1 ~] vi .bash _ profile

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

Export ORACLE_SID=RACDB1

Export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

Change ORACLE_SID=RACDB1 to ORACLE_SID=RACDB2

Grid user

[grid@rac1 ~] $vi .bash _ profile

Export ORACLE_BASE=/u01/app/grid

Export ORACLE_HOME=/u01/app/11.2.0/grid

Export ORACLE_SID=+ASM1

Export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH

Change export ORACLE_SID=+ASM1 to export ORACLE_SID=+ASM2

After all the settings are completed, restart the second node.

Mutual trust

The oracle and grid users of the two nodes respectively execute the generation of password files

Ssh-keygen-t dsa

View password file

Cd .ssh

Rac Node 1 oracle and grid users transfer password files and node 2 mutual trust respectively

Execute in the .ssh directory

Cat * .pub > authorized_keys

Ssh 192.168.80.60 cat ~ / .ssh/*.pub > > authorized_keys

Scp authorized_keys 192.168.80.60. SSH.

Note: IP address is configured as rac2 node address

Test the communication between public network and private network, and oracle and grid users of each node execute separately.

Ssh rac1 date

Ssh rac2 date

Ssh rac1-priv date

Ssh rac2-priv date

Install the cvuqdisk package using the root user

There is a cvuqdisk package in the node-soft/grid/rpm folder. Installation command: rpm-ivh cvuqdisk-1.0.9-1.rpm, transfer the cvuqdisk package to Node 2 to install scp cvuqdisk-1.0.9-1.rpm 192.168.80.60:/soft/

Two nodes shut down the host

Configure ASM shared storage

1. As soon as a new disk is added to the node, the size of 30g is fixed.

2. Set the disk to shared mode within the virtual media management.

Node 2 adds the shareable disk that has just been configured

Disk partition

The two nodes check whether the disk has been mounted.

Fdisk-l

Node 1 configuration partition: there are four main partitions, the first three 1024m, and the remaining space is put into the last partition.

Configure disk partitions: fdisk / dev/sdb

N is assigned partition, p is primary partition, w is saved, Q is not saved configuration

Node one configures bare equipment

[root@rac1 ~] # raw/ dev/raw/raw1 / dev/sdb1

/ dev/raw/raw1: bound to major 8, minor 17-remember the following mount directory number, which will be used later

[root@rac1 ~] # raw/ dev/raw/raw2 / dev/sdb2

/ dev/raw/raw2: bound to major 8, minor 18

[root@rac1 ~] # raw/ dev/raw/raw3 / dev/sdb3

/ dev/raw/raw3: bound to major 8, minor 19

[root@rac1 ~] # raw/ dev/raw/raw4 / dev/sdb4

/ dev/raw/raw4: bound to major 8, minor 20

Check the configuration ll / dev/raw

The two nodes configure the system to start automatically mounting disk text.

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/sdb2", RUN+= "/ bin/raw / dev/raw/raw2% N"

ACTION== "add", ENV {MAJOR} = = "8", ENV {MINOR} = = "18", RUN+= "/ bin/raw / dev/raw/raw2% M% m"

ACTION== "add", KERNEL== "/ dev/sdb3", RUN+= "/ bin/raw / dev/raw/raw3% N"

ACTION== "add", ENV {MAJOR} = = "8", ENV {MINOR} = = "19", RUN+= "/ bin/raw / dev/raw/raw3% M% m"

ACTION== "add", KERNEL== "/ dev/sdb4", RUN+= "/ bin/raw / dev/raw/raw4% N"

ACTION== "add", ENV {MAJOR} = = "8", ENV {MINOR} = = "20", RUN+= "/ bin/raw / dev/raw/raw4% M% m"

KERNEL== "raw [1-4]", OWNER= "grid", GROUP= "asmadmin", MODE= "660"

Adjust the document appropriately according to the previously recorded mount catalog number

Restart the two-node system, or restart AWR

[root@rac2 ~] # start_udev

Starting udev: [OK]

Check the mounting status of Node 2

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

Total 0

Crw-rw---- 1 grid asmadmin 162,1 Apr 26 23:02 raw1-the following means that the mount is successful

Crw-rw---- 1 grid asmadmin 162, 2 Apr 26 23:02 raw2

Crw-rw---- 1 grid asmadmin 162, 3 Apr 26 23:02 raw3

Crw-rw---- 1 grid asmadmin 162, 4 Apr 26 23:02 raw4

Upload installation media to node 1

Configure permissions, extract the package

Package 1, 2 oracle:oinstall 755 permissions

Compressed package 3 grid:oinstall 755 permissions

Decompression command: unzip

Modify master and group command: chown

Modify permission command: chmod

Grid self-test

Execute under the / soft/grid directory

. / runcluvfy.sh stage-pre crsinst-n rac1,rac2-verbose

Install grid softwar

There is no problem with the validation. Start installing grid cluster software.

Note: you must be a grid user when you install login using the tool

. / runInstaller

Installation steps

1. Cancel accepting mail

2. Choose the first one

Cluster installation and configuration of Oracle grid infrastructure

Independent server configuration of Oracle grid infrastructure

Upgrade Oracle grid infrastructure or Oracle automatic storage management (ASM)

Install only Oracle grid infrastructure software

3. Choose the second one

General installation

Advanced installation

4. Configuration language

5. Configure SCAN IP

6. Add rac2 private network IP

7. Configuration of public and private networks

Parameter: public (public network) private (private network) do not use (not used)

Eth0 is a public network

Eth2 is a private network

8. Storage structure configuration

Select ASM Management

Oracle automatic storage management-automatic Storage Management (ASM)

Shared file system-shared file system

9. Configure the ASM disk group and its members. If the ASM disk is not visible, restart Node 1.

10. Configure the ASM disk group administrator password. If the first letter is not capitalized and not combined with a number, it will prompt INS-30011 error (the password is too simple)

If you are not configuring a bare device, when adding an ASM disk, blur match the disk in the following ways

11. Fault isolation support options

Select the second one

User intelligent platform management interface-user's IPMI interface (intelligent management platform)

No intelligent platform management interface-do not use the IPMI interface

12. Configure the group of ASM disks

Oracle asm administrator group-oracle administrators group is handed over to asmadmin group

Oracle asmdba group-Oracle DBA group is handed over to asmdba group

Oracle asm operator group-oracle operation group is handed over to asmoper group

13. Grid basic directory. Check whether each node directory exists and whether the permissions are sufficient.

14. Grid inventory

You need to check the / u01/app/oraInventory directory and report an error to check whether a directory exists and whether the permissions are sufficient for each node.

15. Final check of configuration. If there is a problem, an error is reported.

Device checks for asm-ASM device check (this issue can be skipped due to virtual configuration)

Task resolv.conf integrity-check each node / etc/resolv.conf (since DNS parsing is not configured, this issue can be skipped)

Network Time Protocol (NTP)-Network time protocol NTP (represents that the RAC time is not synchronized and the heartbeat cannot be achieved. But skip it if you don't need it)

Other problems need to be solved by looking for information. All problems will be solved later or skipped. Select lgnore All (ignore all) to report an error INS-13016 to confirm skipping the problem.

16. Whether to store configuration records

17. Start installing install

18. At the prompt node and the user, execute the prompt script file respectively.

Pay attention to check the execution results, execute the script Times for other errors, and need to go back. Execute the script again after resolution

Fallback cleanup command / u01/app/11.2.0/grid/crs/install/rootcrs.pl-verbose-deconfig-force

Error [INS-20802] Oracle Cluster Verification Utility failed. -Oracle cluster verification utility failed. Click Next for this problem.

Report an error [INS-32091] Software installation was successful after execution. But some configuration assistants failed, were cancelled or skipped. -indicates that the software has been installed successfully. But some configuration assistants failed and were canceled or skipped.

Grid has been installed successfully

Note: uninstall the grid method manually, and the two nodes execute it separately.

Root user

Cd / u01/app/11.2.0/grid/crs/install

. / rootcrs.pl-deconfig-force

. / rootcrs.pl-verbose-deconfig-force

. / crsconfig_params

Grid user

Cd / u01/app/11.2.0/grid/deinstall

. / deinstall

Root user

Rm-rf / var/tmp/.oracle

Rm-rf / usr/local/bin/coraenv

Rm-rf / usr/local/bin/dbhome

Rm-rf / usr/local/bin/oracle

Rm-rf / u01/app/oraImbentory

Finally, the ASM disk header is formatted as follows:

Dd if=/dev/zero count=10 bs=512 of=/dev/sde1

Install database management software (RDBMS)

Note: you must be an oracle user when you install login using the tool

Cd / soft/database (installation directory)

Execute. / runInstaller

Installation steps

1. Cancel accepting mail

2. Update options

Download updates through the Internet

2. Update through local source

Third, do not update (select this item)

3. Installation options

Create and configure a database-create and configure the database

Install database software only-install only database software (select this time)

Update an existing database-updates the existing database

4. Single instance or RAC installation

Single instance database installation-single instance database installation

Oracle real application clusters database installation-Multi-Node (RAC) database installation

Oracle RAC one node database installation-single node (RAC) database installation

Select nodes (in addition to the local node) in the cluster where the installer should install oracle rac or oracle rac one

Select a node in the RAC (except for the local node), and the installer should install Oracle RAC (cluster) or Oracle RAC (single node)

SSH can configure oracle users' passwords and add and delete nodes.

Select the second multi-node RAC this time

5. Configuration language

Enterprise edition-Enterprise Edition (selected this time)

Standard edition-Standard Edition

6. Oracle basic directory. Check whether each node directory exists and whether the permissions are sufficient.

7. Configure the database group

The first item is the database administrator's group DBA

Group of database operators in item 2 (fill in DBA this time)

8. The final check of the configuration shows that an error is reported if there is a problem (this problem is the same as the problem with installing grid)

Swap size-the swap partition is too small (this issue can be skipped)

Device checks for asm-ASM device check (this issue can be skipped due to virtual configuration)

Task resolv.conf integrity-check each node / etc/resolv.conf (since DNS parsing is not configured, this issue can be skipped)

Network Time Protocol (NTP)-Network time protocol NTP (represents that the RAC time is not synchronized and the heartbeat cannot be achieved. But skip it if you don't need it)

Other problems need to be solved by looking for information. All problems will be solved later or skipped. Select lgnore All (ignore all) to report an error INS-13016 to confirm skipping the problem.

9. Installation configuration report

10. Click install to start the installation, follow the prompts at the prompt node and the user, and execute the prompt script file

Pay attention to check the execution result

Create an ASM disk group

Note: you must be a grid user when you install login using the tool

Use the asmcan command to start the graphical tool

1. Create or mount a disk group

Create-create (select this time)

Mount all-Mount all

Dismount all-Uninstall all

2. Disk group configuration

High-Advanced redundancy

Normal-Standard redundancy

EXTERNAL (nome)-external redundancy Select this option, select OK after configuration

End configuration

Create a database

Switch oracle users to start the graphical interface installation using dbca

1. Select the installation mode

Oracle real application clusters (rac) database-Multi-Node (RAC) database selected this time

Oracle rac one node database-single node (RAC) database

Oracle single instance database-single instance database

2. Choose to perform the operation.

Create a database-create a database and select this item

Configure database options-configuration database

Delete database-Delete the database

Manage templates-template Management

Instance management-strength Management

3. Installation type

Templates that include datafiles contain pre=created databases .they allow you to create a new database in miuntes,as opposed to an hour or more use templates without datafiles only when necessary,such as when you need to change attributes like block size,which cannot be altered after database creation

The template file contains pre-created databases. They allow you to create a new database in minutes instead of using template files for an hour or more, only when necessary, such as when you need to change the block size of attributes, not after you create the database.

Ceneral purpose or transaction processing-General purpose or transaction processing

Custom database-Custom Database

Data warehouse-data Warehouse

4. Configure the RAC database name, and click select all after configuration (select all)

5. Cancel EM (Enterprise Manager) and keep automatic mainenance tasks (automatic maintenance task)

6. Configure sys and system user passwords. The rules require that the first letter must be capitalized and letters must be combined with numbers. Failure to comply with the requirements will prompt

7. Storage management

Specify storage type and locations for database files-specify the database file storage type and location

Use common location for all database files-use a common database file storage location

Use oracle-managed files-automatically managed using oracle, which requires configuring the domain of the database (this selection)

8. Rapid recovery area

Specify fast reconvery area-specify a quick recovery area, which is not enabled this time

Enable archiving-Archive, do not start this time

9. Sample user and execute script

Choose to enable the sample user without using the execution script

10. Configuration management

Memory-configure automatic management (SGA and PGA) or SGA, PGA manual management

Sizing-resize blocks, maximum number of concurrent connections

Character sets-character set used

Connection mode-server mode (private or shared)

11. Database storage configuration

Maximum datafiles-maximum number of big data files

Maximum instances-maximum number of instances

Maximum log history-maximum number of archive logs, beyond which will be reused

Maximum redo log files-maximum number of redo logs

Maximum log members-maximum log log member

Data files that have been configured by the database

Included redo log groups and members of the group

12. Select the database creation options Select the database creation option

Create database-create the database (select this time)

Generate database creation scripts-generate a database creation script

13. Click finish to start execution, and you can save the installation report.

14. Start the installation, and end the installation to generate the DBname database name, SID system identifier, and server parameter name

At this point, all the installation is complete.

Thank you for reading this article carefully. I hope the article "how to install oracle rac Database" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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

*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