Oracle 12c (12.1) RAC installation on Linux Virtual Machines – Step by step guide

Today we will see how we can install 12c Release 1 RAC (Real Application Clusters) database on 2 Linux 64 bit Virtual Machines using VMWare or Oracle VirtualBox. The “c” in Oracle 12c stands for “Cloud

There are a few important and interesting changes when it comes to installing 12c as compared to 11g RAC. Oracle seems to have added a lot of new interesting features in 12c.

Please note that we will need 2 Virtual Machines each with 3 GB of RAM. So if you have sufficient memory on your laptop/PC or server then you can host both VMs in same box or you can use 2 boxes which are connected to each other via local network.

Hardware requirements:

Processor with dual core or more

3 GB dedicated RAM for each VM

25 GB space for each VM

Since we are not using shared storage for Virtual Machines, we are sharing disks via NFS from one node to another. Here is how the VMs can be represented.  Please note that this is not recommended for production setup, this is just for demo installation on Virtual Machines for learning purpose. For production we must use external storage on SAN or NAS storage.

We could also use shared disk technology of VirtualBox but since we want to keep the VMs independent of Virtualization technology, we are using NFS only.

11gR2-VM-visio

 

Note: We also have plug and play type ready to use Virtual Machines also for those who want to learn or explore Oracle RAC without hassles of installing and configuring. Use the link on the top of this page to get these VMs if you want to skip the installation steps and directly start learning/exploring Oracle RAC technology.

For all others you can follow this guide to setup the VMs on your own. Please feel free to contact me if you face any issues using the installation guide. Also feel free to help fellow users by sharing the knowledge in comments section.

Following are the steps involved to achieve this.

1. Create Virtual Machine and install 64 bit Linux (generic step from previous post, not specific to this guide)

Please note that since we had already published document for installing Linux x86-64 on Virtual Machine using VMWare, I will not create a duplicate post here. Please refer to the same post except the hostname should be dbhost1 and full name is dbhost1.paramlabs.com. You can use Linux 5.x or 6.x

2. Add additional virtual Ethernet card and perform prerequisites in Linux

3. Copy/clone this virtual machine to create second node and modify host details

4. Setup shared file system and other pre-requisites

5. Install Oracle Grid Infrastructure

6. Install Oracle Database software and create RAC database

 

Please click respective link to go directly to the required step. Each page is having links to previous and next step as well as above list to directly jump to another step (except the first step since it is an older post)

Happy learning !!

Tushar

Jul 9th, 2013 | Posted by Tushar Thakker | Filed under Linux/Unix/Solaris, Oracle, Oracle Database, Oracle DBA, Oracle RAC, VirtualBox, Virtualization

Installing 12c RAC on Linux VM: Copy/clone this virtual machine to create second node and modify host details

Previous: Add additional virtual Ethernet card and perform prerequisites in Linux

In order to copy/clone the VM for node 1 to another VM, first you need to cleanly shutdown the first host i.e. dbhost1

Once it is cleanly shutdown, you can either user VMWare’s clone option or simply copy the whole VM directory including .vmdk and .vmx files to another directory and name it node2.

Since this is identical copy if the first node, we don’t want to create IP conflict while starting the VM so this time start only VM for node2 using VMWare or VirtualBox.

When it prompts following, select “I moved it“. This will preserve all settings including IP address from node 1 VM. Otherwise it will copy the interfaces to ethx.bak and create new interfaces in Linux which we want to avoid.

Now node2 OS is booted, login with root user.

In order to change the IP address and hostname, follow these steps.

Make sure the /etc/hosts entries are correct.

[root@ dbhost2~]# more /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

#::1 localhost6.localdomain6 localhost6

192.168.1.121 dbhost1.paramlabs.com dbhost1

192.168.1.122 dbhost2.paramlabs.com dbhost2

192.168.1.123 dbhost1-vip.paramlabs.com dbhost1-vip

192.168.1.124 dbhost2-vip.paramlabs.com dbhost2-vip

192.168.2.121 dbhost1-priv.paramlabs.com dbhost1-priv

192.168.2.122 dbhost2-priv.paramlabs.com dbhost2-priv

192.168.1.125 dbhost-scan.paramlabs.com dbhost-scan

192.168.1.121 nfshost.paramlabs.com nfshost

Now open the network setup screen as follows.

It will show 2 existing interfaces with IPs of node 1.

We need to change IPs for eth0 to match dbhost2 IP. While for eth1 it should match dbhost2-priv IP. Select the interface and click Edit to make the changes.

Change the hostname using DNS tab in the network configuration screen. Enter hostname as dbhost2.paramlabs.com

Once you change the IP addresses, make sure to save the configuration using File -> Save.

Once this is done, restart the network service using following command.

[root@ dbhost2~]# service network restart

Change the hostname to dbhost2

[root@r12host ~]# hostname dbhost2.paramlabs.com

Make sure changes are persistent by restarting network service.

[root@dbhost2 ~]# service network restart

Shutting down interface eth0: [ OK ]

Shutting down interface eth1: [ OK ]

Shutting down loopback interface: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: [ OK ]

Bringing up interface eth1: [ OK ]

 

[root@dbhost2 ~]# ping dbhost2.paramlabs.com -c1

PING dbhost2.paramlabs.com (192.168.1.122) 56(84) bytes of data.

64 bytes from dbhost2.paramlabs.com (192.168.1.122): icmp_seq=1 ttl=64 time=0.021 ms

— dbhost2.paramlabs.com ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 0.021/0.021/0.021/0.000 ms

Now you can restart Node 2 to make sure the new IPs and new hostname are preserved. Also we can start Node 1 now since there will be no conflict now.

This concludes the steps for creating second node for the RAC.

Next: Setup shared file system and other pre-requisites

Oracle 12c (12.1) RAC (Real Applications Cluster) installation on Linux Virtual Machines – Step by step guide

1. Create Virtual Machine and install 64 bit Linux
2. Add additional virtual Ethernet card and perform prerequisites in Linux
3. Copy/clone this virtual machine to create second node and modify host details
4. Setup shared file system and other pre-requisites
5. Install Oracle Grid Infrastructure
6. Install Oracle Database software and create RAC database

Jul 9th, 2013 | Posted by Tushar Thakker | Filed under Linux/Unix/Solaris, Oracle, Oracle Database, Oracle DBA, Oracle RAC, VirtualBox, Virtualization

Installing 12c RAC on Linux VM: Install Oracle Database software and create RAC database

Previous: Install Oracle Grid Infrastructure

You can start database installation from <stage>/database directory as follows. Make sure to use database owner user oracle.

[oracle@dbhost1 ~]$ cd /mnt/hgfs/Setup/database/

[oracle@dbhost1 database]$ ./runInstaller

Deselect the checkbox and click Next

 

Click Yes

 

Select “Skip software updates” and click Next

 

Select “Create and configure a database“. We can also install database software and later create database using DBCA. But here we will choose to create database as well. Click Next

 

Select “Server class” and click Next

 

Select “Oracle Real Application Clusters database installation” and click Next

 

Select “Admin managed” and click Next

 

Make sure to select both nodes. Click “SSH connectivity“.

Click Test

 

This confirms that passwordless ssh is setup between both nodes with oracle user. Click OK

 

Select “Advanced install” and click Next

 

Click Next

 

Select “Enterprise Edition” and click Next

 

Select Oracle base as above and click Next

 

Select “General purpose” and click Next

 

Enter Global database name as “rac12c.paramlabs.com” or whichever desired name and click Next

 

Select appropriate total memory to be assigned. Click on “Character sets” tab

Select “Unicode” and click Next

 

Select “File system” and enter value as “/u01/oradata”. Click Next

 

 

Note: Oracle Enterprise Manager Database Express is always installed and configured by default irrespective of whether you register Oracle Enterprise Manager Cloud Control.

 

Since we do not have 12c Cloud control yet, we have kept it unchecked. If you have one then provide details here and click Next

 

Since this is only for testing, we are deselecting recovery. If required then check this. Click Next

 

We are entering same password for all users here to keep everything simple. Click Next

 

Click Yes

 

Select appropriate groups but here we are using only “dba” group. Click Next

 

 

The error for SCAN is since we are not using DNS. We can manually make sure that SCAN is reachable from both nodes.

===================

[root@dbhost1 ~]# ping -c 1 dbhost-scan.paramlabs.com

PING dbhost-scan.paramlabs.com (192.168.1.125) 56(84) bytes of data.

64 bytes from dbhost-scan.paramlabs.com (192.168.1.125): icmp_seq=1 ttl=64 time=0.044 ms

 

— dbhost-scan.paramlabs.com ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 0.044/0.044/0.044/0.000 ms

 

[root@dbhost2 ~]# ping -c 1 dbhost-scan.paramlabs.com

PING dbhost-scan.paramlabs.com (192.168.1.125) 56(84) bytes of data.

64 bytes from dbhost-scan.paramlabs.com (192.168.1.125): icmp_seq=1 ttl=64 time=0.498 ms

 

— dbhost-scan.paramlabs.com ping statistics —

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 0.498/0.498/0.498/0.000 ms

===================

 

Click “Ignore All” to ignore this error. Click Next

 

Click Yes

 

Save Response file if required and click “Install” to start installation

 

It will prompt us to execute above script as root user on both nodes manually.

 

[root@dbhost1 ~]# /app/oracle/product/12.1.0/dbhome_1/root.sh

Performing root user operation for Oracle 12c

 

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /app/oracle/product/12.1.0/dbhome_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of “dbhome” have not changed. No need to overwrite.

The contents of “oraenv” have not changed. No need to overwrite.

The contents of “coraenv” have not changed. No need to overwrite.

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

 

[root@dbhost2 ~]# /app/oracle/product/12.1.0/dbhome_1/root.sh

Performing root user operation for Oracle 12c

 

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /app/oracle/product/12.1.0/dbhome_1

 

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of “dbhome” have not changed. No need to overwrite.

The contents of “oraenv” have not changed. No need to overwrite.

The contents of “coraenv” have not changed. No need to overwrite.

 

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

 

Now it will automatically launch the database configuration assistant since we selected option of creating database as well.

 

Above is the summary screen. Make a note of EM database “Express” URL for future reference.

 

Click Close to finish the installation.

 

Let us make sure if database is registered and started properly.

 

[oracle@dbhost1 database]$ export ORACLE_HOME=/app/oracle/product/12.1.0/dbhome_1

[oracle@dbhost1 database]$ export PATH=$ORACLE_HOME/bin:$PATH

[oracle@dbhost1 database]$ export ORACLE_SID=rac12c1

 

[oracle@dbhost1 database]$ srvctl status database -d rac12c

Instance rac12c1 is running on node dbhost1

Instance rac12c2 is running on node dbhost2

 

[oracle@dbhost1 database]$ sqlplus / as sysdba

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 – 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics

and Real Application Testing options

 

SQL> select instance_name, status from gv$instance;

INSTANCE_NAME STATUS

—————- ————

rac12c1 OPEN

rac12c2 OPEN

 

This concludes 12c RAC database installation. A lot of new posts will come soon where we will discuss the new features, tips and tricks of 12c. Also a new set of trainings will be introduced for 12c as we explore 12c in more details.

Happy learning !

Tushar

Oracle 12c (12.1) RAC (Real Applications Cluster) installation on Linux Virtual Machines – Step by step guide

1. Create Virtual Machine and install 64 bit Linux
2. Add additional virtual Ethernet card and perform prerequisites in Linux
3. Copy/clone this virtual machine to create second node and modify host details
4. Setup shared file system and other pre-requisites
5. Install Oracle Grid Infrastructure
6. Install Oracle Database software and create RAC database

Jul 9th, 2013 | Posted by Tushar Thakker | Filed under Linux/Unix/Solaris, Oracle, Oracle Database, Oracle DBA, Oracle RAC, VirtualBox, Virtualization