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 11.2.0.1 RAC under Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly shows you "Oracle 11.2.0.1 RAC under Linux how to install", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn how to install Oracle 11.2.0.1 RAC under Linux "this article.

The operating system is Oracle Enterprise Linux 5, with two nodes rac1 and rac2, and the network card eth0 is used as public,eth2 as private, assuming that a shared disk with 20g capacity has been added before.

About Oracle Enterprise Linux download, you can download it after you log in to https://edelivery.oracle.com/osdc/faces/Home.jspx.

Host configuration

All commands are executed under the root user.

Configure shared storage. Shared storage can be considered a / dev/sdb device. Two 10G partitions will be created using the fdisk command. Two new partitions will be used for ASM.

-- list devices ls / dev/sd*/dev/sda / dev/sda1 / dev/sda2 / dev/sdb--add two partitionsfdisk / dev/sdbThe number of cylinders for this disk is set to 2610.There is nothing wrong with that, but this is larger than 1024 and could in certain setups cause problems with: 1) software that runs at boot time (e.g.old versions of LILO) 2) booting and partitioning software from other OSs (e.g.DOS FDISK) OS/2 FDISK) Command (m for help): nCommand action e extended p primary partition (1-4) pPartition number (1-4): 1 First cylinder (1-2610, default 1): Using default value 1 Last cylinder or + size or + sizeM or + sizeK (1-2610, default 2610): + 10240MCommand (m for help): nCommand action e extended p primary partition (1-4) pPartition number (1-4): 2 First cylinder (1247-2610, default 1247): Using default value 1247 Last cylinder or + size or + sizeM or + sizeK (1247-2610) Default 2610): Using default value 2610 Command (m for help): w The partition table has been altered! Calling ioctl () to re-read partition table.Syncing disks.--list new partitionsfdisk-l / dev/sdbDisk / dev/sdb: 21.4GB, 21474836480 bytes 255heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System / dev/sdb1 1 1246 10008463 + 83 Linux / dev/sdb2 1247 2610 1095683 Linux

Add Group

-- required groups / usr/sbin/groupadd-g 501 oinstall / usr/sbin/groupadd-g 502 dba / usr/sbin/groupadd-g 503 oper

Add Oracle user

/ usr/sbin/useradd-u 502-g oinstall-G dba oracle

Modify Oracle user password

Passwd oracle

Add kernel parameters under / etc/sysctl.conf

# kernel parameters for 11g installationkernel.shmmni = 4096 kernel.shmmax = 4398046511104 kernel.shmall = 1073741824 kernel.sem = 25032000 100128 fs.aio-max-nr = 1048576 fs.file-max = 6815744 net.ipv4.ip_local_port_range = 900065500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586

Apply kernel parameters

/ sbin/sysctl-p

Add the following line to the / etc/security/limits.conf file for user Oracle to set the shell limit

-- shell limits for users oracle 11gR2oracle soft nproc 131072 oracle hard nproc 131072 oracle soft nofile 131072 oracle hard nofile 131072 oracle soft core unlimitedoracle hard core unlimitedoracle soft memlock 50000000 oracle hard memlock 5000000

The "/ etc / hosts" file must contain the fully qualified name of the server.

Enter the following data under "/ etc / hosts"

127.0.0.1 localhost.localdomain localhost#public 192.168.0.50 rac1.dbaora.com rac1 192.168.0.51 rac2.dbaora.com rac2#private 192.168.1.60 rac1-priv.dbaora.com rac1-priv 192.168.1.61 rac2-priv.dbaora.com rac2-priv#virtual 192.168.0.70 rac1-vip.dbaora.com rac1-vip 192.168.0.71 rac2-vip.dbaora.com rac2-vip#scan 192.168 . 0.20 rac-scan.dbaora.com rac-scan

Verify the network response of th0 and eth2 on rac1.dbaora.com

[root@rac1] # ping rac1-C1 PING rac1.dbaora.com (192.168.0.50) 56 (84) bytes of data. 64 bytes from rac1.dbaora.com (192.168.0.50): icmp_seq=1 ttl=64 time=0.032 ms-rac1.dbaora.com ping statistics-1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 0.032 bytes of data 0.032 ms [root@rac1] # ping rac1-priv-C1 PING rac1-priv.dbaora.com (192.168.1.60) 56 (84) bytes of data. 64 bytes from rac1-priv.dbaora.com (192.168.1.60): icmp_seq=1 ttl=64 time=0.036 ms-rac1-priv.dbaora.com ping statistics-1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 0.036 ms 0.036 ms

Check which packages are installed and which are missing

Rpm-Q-- qf'% {NAME} -% {VERSION} -% {RELEASE} (% {ARCH})\ n 'binutils\ compat-libstdc++-33\ elfutils-libelf\ elfutils-libelf-devel\ gcc\ gcc-c++\ glibc-common\ glibc-devel\ glibc-headers\ ksh\ libaio\ libaio-devel\ libgcc\ libstdc++\ libstdc++-devel\ make\ sysstat\ unixODBC\ unixODBC-devel

Install the missing package. This is just one example:

# directory with mounted Oracle Enterprise Linux 5 install diskcd / Server/Packages#install missed packages (example for package unixODBC*) rpm-Uvh unixODBC*

Disable Secure Linux

To disable Secure Linux editing the "/ etc/selinux/config" file, make sure that SELINUX is set as follows, which requires a restart to be effective.

SELINUX=disabled

Disable Firewall

Firewalls can be disabled in graphical mode or manually.

Execute the following command to disable manually

Service iptables stopchkconfig iptables off

Change NTP

You need to disable NTP (Network Time Protocol) or modify its settings so that Oracle Cluster Time Synchronization Service (ctssd) can synchronize the time of the RAC node.

Option 1-disable NTP

Service ntpd stopShutting down ntpd: [OK] chkconfig ntpd off mv / etc/ntp.conf / etc/ntp.conf.orig rm / var/run/ntpd.pid

Option 2-change NTP

If you want to keep NTP, add the "- x" option to the "/ etc/sysconfig/ntpd" file.

OPTIONS= "- x-u ntp:ntp-p / var/run/ntpd.pid"

And restart NTP

# service ntpd restart

During the installation of the operating system, you can disable SElinux and Firewall and do not start NTP, which can be omitted in the host configuration.

Catalogue

Create ORACLE_BASE

Mkdir-p / ora01/app/oracle

Create ORACLE_HOME for grid and database softwar

Mkdir-p / ora01/app/oracle/product/11.2.0/db_1 mkdir-p / ora01/app/grid/product/11.2.0/grid chown oracle:oinstall-R / ora01 chmod 775 / ora01/app/oracle

New profile for Oracle user

Modify Oracle configuration file / home/oracle/.bash_profile

# .bash _ profile# Get the aliases and functions if [- f ~ / .bashrc]; then. ~ / .bashrc fi # User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHalias genv='. / home/oracle/.bash_profile_grid;envo' alias denv='. / home/oracle/.bash_profile_database;envo'. / home/oracle/.bash_profile_databaseenvo

Two aliases have been added: genv and denv, so that you can easily switch between grid and database software environments.

Add a new profile / home/oracle/.bash_profile_grid for the Oracle user. This profile will be used for the grid software.

# Oracle Settingsexport TMP=/tmpexport ORACLE_HOSTNAME=rac1.dbaora.comexport ORACLE_UNQNAME=+ASMexport ORACLE_BASE=/ora01/app/oracleexport ORACLE_HOME=/ora01/app/grid/product/11.2.0/gridexport ORACLE_SID=+ASM1PATH=/usr/sbin:$PATH:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;alias cdob='cd $ORACLE_BASE' alias cdoh='cd $ORACLE_HOME' alias tns='cd $ORACLE_HOME/network/admin' alias envo='env | grep ORACLE'

Add a new parameter file / home/oracle/.bash_profile_database for Oracle users. This profile will be used for the database software.

# Oracle Settingsexport TMP=/tmpexport ORACLE_HOSTNAME=rac1.dbaora.comexport ORACLE_UNQNAME=ORA11Gexport ORACLE_BASE=/ora01/app/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1export ORACLE_SID=ORA11G1PATH=/usr/sbin:$PATH:$ORACLE_HOME/binexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;alias cdob='cd $ORACLE_BASE' alias cdoh='cd $ORACLE_HOME' alias tns='cd $ORACLE_HOME/network/admin' alias envo='env | grep ORACLE' umask 022

In rac2, change the ORACLE_HOSTNAME and ORACLE_SID of the two parameter files to the parameter values of this server.

Remember to modify the owner of all configuration files

Chown oracle:oinstall / home/oracle/.bash* chmod 750 oracle:oinstall / home/oracle/.bash*

As an oracle user, extract the database and grid software. Create 2 directories:

Database-database software

Grid-grid software

Switch to the grid software environment and install the package cvuqdisk-1.0.9-1.rpm as the root user

Cd / rpm [root@rac1 rpm] # rpm-Uvh cvuqdisk-1.0.9-1.rpmsigning. # # [100%] Using default group oinstall to install package 1:cvuqdisk # # [100%]

Configure ASM Devic

To configure ASMlib, you first need to download ASMLib rpms from OTN. If you are using the UEK kernel, all necessary rpms is installed.

Oracleasm-support-2.1.8-1.el5.i386.rpm

Oracleasmlib-2.0.4-1.el5.i386.rpm

Oracleasm- [your-kernel-version]. Rpm

For oracleasm-supper and orcleasmlib package versions, you can download packages from http://www.oracle.com/technetwork/server-storage/linux/asmlib/index-101839.html based on the operating system version.

On the other hand, the oracleasm package should be determined according to the operating system kernel parameters:

Name-a

Here is a link for Oracle to install the oracleasm package by configuring YUM:

Http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html

Use the following command to install the software package

Rpm-Uvh oracleasm*.rpm

After the installation is complete, you can verify it with the command rpm-qa | grep oracleasm.

Configure SMlib

[root@rac1] # / usr/sbin/oracleasm configure-iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets ('[]'). Hitting without typing ananswer will keep that current value. Ctrl-C will abort.Default user to own the driver interface []: oracleDefault group to own the driver interface []: dbaStart Oracle ASM library driver on boot (YPAPO) [n]: yScan for Oracle ASM disks on boot (YPEA) [y]: Writing Oracle ASM library driver configuration: done

Load asm kernel module

[root@rac1 ~] # / usr/sbin/oracleasm initLoading module "oracleasm": oracleasmMounting ASMlib driver filesystem: / dev/oracleasm

Add ASM disk

[root@rac1 ~] # / usr/sbin/oracleasm createdisk DISK1 / dev/sdb1Writing disk header: done Instantiating disk: done [root@rac1 ~] # / usr/sbin/oracleasm createdisk DISK2 / dev/sdb2Writing disk header: done Instantiating disk: done

Scan ASM disk

[root@rac1 ~] # / usr/sbin/oracleasm scandisksReloading disk partitions: done Cleaning any stale ASM disks...Scanning system for ASM disks...

List ASM disks

[root@rac1 ~] # / usr/sbin/oracleasm listdisksDISK1DISK2

Here, oracleasm is used to configure ASM disk, or you can configure it with udev. When you encounter some bug when using oracleasm, it is recommended to use udev.

Now run the following command on each node to verify the network: rac1.dbaora.com and rac2.dbaora.com

Hostname ping rac1- C1 ping rac2- C1 ping rac1-priv-C1 ping rac2-priv-C1

Install grid softwar

Start the grid software installation as user oracle, and before that run the command xhost + as root.

Xhost + access control disabled, clients can connect from any host

Set up the grid environment and run the grid installation software

Su-oracle [oracle@rac1 ~] $genvORACLE_UNQNAME=+ASMORACLE_SID=+ASM1ORACLE_BASE=/ora01/app/oracleORACLE_HOSTNAME=rac1.dbaora.comORACLE_HOME=/ora01/app/grid/product/11.2.0/grid-- run installation cd. / runInstall

About the installation process, you can choose according to the actual needs, omitted here.

If you are using linux 6 or later, a BUG will be used when the root.sh script is executed at last. The specific solution is as follows

1. Delete the configuration:

/ ora01/app/grid/product/11.2.0/gridl/roothas.pl-deconfig-force-verbose

The path is the ORACLE_HOME of the grid environment.

Execute the dd command when the message Adding daemon to inittab appears

/ bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

If you are installing 11.2.0.1, it is recommended to use the linux 5 version.

ASM configuration assistant

So far, only one ASM group DATA has been created. The following shows how to quickly add additional groups to an ASM instance.

Before starting ASMCA as the Oracle user, switch to the root user to execute the xhost + command.

ASMCA-ASM configuration assistant is part of the grid software, so the correct environment must be set up

Su-oracle [oracle@rac1 ~] $genvORACLE_UNQNAME=+ASMORACLE_SID=+ASM1ORACLE_BASE=/ora01/app/oracleORACLE_HOSTNAME=rac1.dbaora.comORACLE_HOME=/ora01/app/grid/product/11.2.0/ grid [oracle @ rac1 ~] $asmca

Step by step as needed, the installation steps are omitted.

You can verify that you have 2 ASM groups in sqlplus.

[oracle@rac1] $sqlplusSQL*Plus: Release 11.2.0.3.0 Production on Sun Jun 16 22:39:11 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved.Enter user-name: / as sysasmConnected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production With the Automatic Storage Management optionSQL > select name from vested asmtrees diskgroupten name-- DATABACKUP

Install Database softwar

Start the database software installation as an Oracle user. Set up database software to love your environment

Su-oracle [oracle@rac1 ~] $denv ORACLE_UNQNAME=ORA11G ORACLE_SID=ORA11G1 ORACLE_BASE=/ora01/app/oracle ORACLE_HOSTNAME=rac1.dbaora.com ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1-- run installation cd. / runInstall

The installation steps are omitted.

During the installation process, you encounter a problem with the listener, prompt

Default listener is not configured in grid infrastructure home

Solution Link http://www.linuxidc.com/Linux/2017-08/146057.htm

Verify RAC installation

[root@rac1 ~] # su-oracle [oracle@rac1 ~] $genvORACLE_UNQNAME=+ASMORACLE_SID=+ASM1ORACLE_BASE=/ora01/app/oracleORACLE_HOSTNAME=rac1.dbaora.comORACLE_HOME=/ora01/app/grid/product/11.2.0/ grid [Oracle @ rac1 ~] $srvctl config database-d ORA11GDatabase unique name: ORA11GDatabase name: ORA11GOracle home: / ora01/app/oracle/product/11.2.0/db_1Oracle user: oracleSpfile: + DATA/ORA11G/spfileORA11G.oraDomain: dbaora.comStart options: openStop options: immediateDatabase role: PRIMARYManagement policy: AUTOMATICServer pools: ORA11GDatabase instances: ORA11G1 ORA11G2Disk Groups: DATAMount point paths: Services: Type: RACDatabase is administrator managed [oracle@rac1 ~] $srvctl status listenerListener LISTENER is enabledListener LISTENER is running on node (s): rac2,rac1 [oracle@rac1 ~] $srvctl status asmASM is running on rac2,rac1 [oracle@rac1 ~] $srvctl status database-d ORA11GInstance ORA11G1 is running on node rac1Instance ORA11G2 is running on node rac2 above are all the contents of the article "how to install Oracle 11.2.0.1 RAC under Linux" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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