Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Monday, October 14, 2024

Oracle WebLogic Server 12cR2 (12.2.1) Installation on Oracle Linux (OL7u9)

Before initiating the installation of the WebLogic server, it would be helpful to review the article - Oracle WebLogic Server Overview to understand the terminologies and concepts of Oracle WebLogic Server.

Please note: This article assumes that you have an existing machine with Oracle Linux 7.9 installed and the required software downloaded, as mentioned in the prerequisite section.

Pre-requisites:

  • Download and install JDK1.8 (1.8.0_241)
  • Download Weblogic 12.2.1.4 (fmw_12.2.1.4.0_infrastructure.jar)
  • Create a new group 'dba' and 'oracle' user
  • Create the required directories and set the following environment variables
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/12.2.1
export MW_HOME=$ORACLE_HOME
export WLS_HOME=$MW_HOME/wlserver
export WL_HOME=$WLS_HOME
export DOMAIN_BASE=/u01/app/oracle/config/domains
export DOMAIN_HOME=$DOMAIN_BASE/mydomain
export JAVA_HOME=/u01/app/oracle/jdk18_241
export PATH=$JAVA_HOME/bin:$PATH
  • create /etc/oraInst.loc and add the following line in /etc/oraInst.loc 
inventory_loc=/u01/app/oraInventory

Installation:

Run the installer as the "oracle" user.
$ java -jar fmw_12.2.1.4.0_infrastructure.jar

Click the "Next" button on the welcome screen.


Select the "Skip Auto Updates" option, then click the "next" button.


Enter the middleware home and click the "Next" button.



Accept the "Fusion Middleware Infrastructure" option by clicking the "Next" button.


Wait for the prerequisite checks to complete. If there are failures, correct them and rerun the checks. If there are no failures, click the "Next" button.



Either enter your support details or uncheck the security updates checkbox. Click the "Next" button.  On the warning dialog, click the "Yes" button.


Review the summary information, and click the "Install" button.



Wait for the installation, then click the "Next" button.



On the installation complete screen, click the "Finish" button to launch the Configuration Wizard.

Creating WebLogic Domain

Launch the Configuration Wizard with the following command:
$ $ORACLE_HOME/oracle_common/common/bin/config.sh

Select the "Create a new domain" option, enter the domain name at the end of the "Domain Location", then click the "Next" button.



Select the required product template and click the "Next" button.



Enter the weblogic credentials and click the "Next" button.



Select domain mode as "Production" and JDK details, then click the "Next" button.



Select any required advanced configuration options. 



Review the configuration summary screen, and click the "Create" button.



Once the domain is created, click the "Next" button.

Please make sure to remember the Admin Server URL and then click the "Finish" button.

Once the server is started you can access the administrator console using the URL "http://hostname:port/console".


Hope this article will be helpful.

Thursday, July 11, 2019

Oracle Database 19c Installation on Oracle Linux 7 (OL7)

This article describes the installation of Oracle Database 19c on Oracle Linux 7 (OL7) on VirtualBox.

Introduction:

For installing 19c in your laptop or desktop, computer should have minimum 4 GB or more of RAM required, and minimum 30GB or more of storage required.

This article uses the 64-bit versions of Oracle Linux 7 and Oracle 19c.

Prerequisite: Oracle Linux 7 Install on VirtualBox

Download Software:

Download Oracle 19c database software for Linux x86-64 from OTN or edelivery and copy the files to linux server (on VirtualBox) using winscp or shared folder.

Oracle Installation Prerequisites

Either you can perform Automatic setup  or Manual setup to complete the prerequisites.

Automatic Setup:

Install "oracle-database-preinstall-19c" package to perform all prerequisite setup. use the following command
# yum install -y oracle-database-preinstall-19c           

Manual Setup:

If you have not used the "oracle-database-preinstall-19c" package to perform all prerequisites, you have to manually perform the following setup tasks.

Saturday, February 24, 2018

Oracle Database 12c Release 2 (12.2) Installation on Oracle Enterprise Linux 6 (OEL6)

This article describes the installation of Oracle Database 12c Release 2 on Oracle Enterprise Linux 6 (OEL6) on VirtualBox.

Introduction:

For installing 12cR2 in your laptop or desktop computer has minimum 4 GB or more of RAM required, and minimum 30GB storage required and used oracle virtualBox showed in this article.

This article uses the 64-bit versions of Oracle Enterprise Linux, and Oracle 12c Release 2 (12.2.0.1).

Prerequisite: Oracle Enterprise Linux 6 Install on VirtualBox

Download Software:

Download Oracle 12cR2 database software for Linux x86-64 from OTN or Edelivery and copy the files to linux server (on VirtualBox) using winscp or shared folder.

OS Configuration and Preparation:
1) Add the following lines to the "/etc/sysctl.conf" file
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500            
2) Run the following command to change the current kernel parameters.
/sbin/sysctl -p           
3) Add the following lines to "/etc/security/limits.conf" file
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728          
4) Create the new groups and users.
#groups for database management
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper         
Add user Oracle for database software
useradd -u 54321 -g oinstall -G dba,oper oracle          
5) Set the password for the "oracle" user.
passwd oracle           
6) The following packages are listed as required, including the 32-bit version of some of the packages. Many of the packages should be installed already.
 # OL6 and OL7 (RHEL6 and RHEL7)
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y

# Required for 12.1, not listed for 12.2
yum install gcc -y
yum install gcc-c++ -y
yum install libXext -y
yum install libXext.i686 -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y

# OL6 only (RHEL6 only)
yum install e2fsprogs -y
yum install e2fsprogs-libs -y
yum install libs -y
yum install libxcb.i686 -y
yum install libxcb -y         
7) Create directory structure as user root
mkdir -p /u01/app/oracle/product/12.2.0/dbhome_1
chown -R oracle:dba /u01
chmod -R 775 /u01          

Installation:

1) Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
DISPLAY=<machine-name>:0.0; export DISPLAY           
2) Unizp software it will create directory "database". Goto database directory and Start the Oracle Universal Installer (OUI) by issuing the following command.
-bash-4.1$ ls -rlt                                                                                                           
total 3376056                                                                                                                
drwxr-xr-x 7 oracle dba       4096 Jan 26  2017 database
-rw-r--r-- 1 oracle dba 3453696911 Mar  1  2017 linuxx64_12201_database.zip
-bash-4.1$
-bash-4.1$
-bash-4.1$ cd database/
-bash-4.1$ ls -rlt
total 36
-rwxr-xr-x  1 oracle dba  500 Feb  6  2013 welcome.html
drwxr-xr-x  4 oracle dba 4096 Jan 26  2017 install
-rwxr-xr-x  1 oracle dba 8771 Jan 26  2017 runInstaller
drwxr-xr-x  2 oracle dba 4096 Jan 26  2017 rpm
drwxrwxr-x  2 oracle dba 4096 Jan 26  2017 sshsetup
drwxrwxr-x  2 oracle dba 4096 Jan 26  2017 response
drwxr-xr-x 14 oracle dba 4096 Jan 26  2017 stage
-bash-4.1$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 3752 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16383 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 65536    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-02-23_09-32-39PM. Please wait                     

3) Uncheck checkbox "I wish to receive security updates via My Oracle Support" and then click "Next" button.


4) Ignore following message and click “Yes” button.


5) Select install option, Here I have choosen "Install database software only", to install the database software. 
You can choose "Create and configure a database" option, If you want to install database software and create database in single shot.


6) Select Database Installation Option, Accept default “Single instance database installation” and click “Next” button 


7) Select Database Edition, You can select here type of binaries to install. Once it’s done click “Next” button.


8) Installation Location, here you should see directories for ORACLE_BASE and ORACLE_HOME for your binaries according to environmental settings. Click “Next” button.


9) Operating system groups, here you can specify OS group for each oracle group. Change default groups to dba and click “Next” button.


10) Summary, If everything isfine, then click “Install” button. It’s the last moment to come back to each of previous point and make changes.


11) Product installation


12) Execute configuration script, once binaries are installed the last step is to run root.sh script as user root.  


13) After successful installation click "Close" button.




That's it. Installed the Oracle 12cR2 software on Oracle Enterprise linux 6.

In my next post will cover database creation.

Thanks,
Chowdari

Friday, June 24, 2016

Creating new CDB using DBCA in 12cR1

Oracle Database 12c allows single container database (CDB) to host multiple separate pluggable databases (PDB). This post covers creating a new CDB using DBCA.

Follow below steps to create new container database using DBCA:

Step 1: Set the base parameters and Invoke DBCA


 

Step 2: Database Operation - Select "Create Database". Click Next.


 Step 3: Creation Mode - Select "Advanced Mode". Click Next.


Step 4: Database Template - Select "General Purpose or Transaction Processing". Click Next.


Step 5: Database Identification - Enter Global Database Name: cdb2
SID: cdb2
Select "Create As Container Database"
Select "Create An Empty Container Database"
Click Next.


Step 6: Management Options - Deselect "Configure Enterprise Manager (EM) Database Express". Click Next.


Step 7: Database Credentials - Select "Use same Administrative password for all accounts" and Enter Password and Confirm password. Click Next.


Step 8: Network Configuration - Click Next.


Step 9: Storage Locations - Confirm Storage type is "File System". Select "Use Common Location for All Database Files". Click Next. 


Step 10: Database Options - Click Next. 


Step 11: Initialization Parameters - Select "Character Sets", Select "Use Unicode (AL32UTF8)". Click Next.




Step 12: Creation Options - Select "Create Database". Click Next.


Step 13: Pre Requisite Checks and Summary - Click Finish


Database creation is in progress



Database creation completed. Click close


Thats it. Hope this article will help you :-)

Thanks,
Chowdari

Friday, November 6, 2015

Oracle RAC 11gR2 Installation on Virtual Box

This article describes the installation of Oracle Database 11g release 2 RAC on Linux using VirtualBox.

Introduction:

For installing 11gR2 RAC in your laptop or desktop computer has minimum 8 GB or more of RAM required, and used oracle virtualBox showed in this article.

This article uses the 64-bit versions of Oracle Linux, and Oracle 11g Release 2 (11.2.0.3). Using VirtualBox you can run multiple Virtual Machines (VMs) on a single server, allowing you to run both RAC nodes on a single machine. Also it allows you to set up shared virtual disks. The finished system includes two guest operating systems, two sets of Oracle Grid Infrastructure (Clusterware + ASM) and two Database instances all on a single server.

Download Software:



Virtual Machine Setup:

Follow below steps to install VirtualBox in your system and create Virtual machine.

Start VirtualBox and click "New" button on the toolbar. Click the "Next" button on the first page of the Virtual Machine Wizard:

Enter the name "rac1", OS "Linux" and Version "Oracle (64 bit)", and then click the "Next" button:


 If you have 16 GB of RAM in your host system, then set Base Memory to 3072 MB, otherwise use 2048 MB. Then click the "Next" button:


Accept the default option to create a new virtual hard disk by clicking the "Next" button:


Select VMDK type and click the "Next" button on the Create Virtual Hard Drive Wizard welcome screen:


Accept the default "Dynamically allocated" option and check option "Split into files of less than 2GB". Then Click the "Next" button:


 Accept the default location and set the size to more than 16G and click the "Next" button:


Press the "Create" button on the Create New Virtual Disk Summary screen.

The "rac1" VM will appear on the left hand pane. Click on the "Network" link on the right side:


Make sure "Adapter 1" and Adapter 1 is enabled, And attach to "Bridged dapter"



Select Processors to minimum 2 CPU


The virtual machine is now configured so we can start the operating system installation.

Operating System Installation:

Follow below steps to install Oracle Enterprise Linux 5.7:

Start the "rac1" Virtual machine


Select OS iso image


The resulting console window will contain the Oracle Linux boot screen. Proceed with the "Install or upgrade in graphical mode":


Do not perform the media test. Choose "Skip" button:


Continue through the Oracle Linux installation as you would for a normal server.

































Reboot your guest operation system.

Install Guest Additions

Go to Devices and select Install Guest Additions 


Open New Terminal and copy Guest Additions as shown below


Eject the Guest Additions CD 


Mount the Linux Software as shown below


Go to Server directory in Linux Software and install the selected package as shown below


Go to Guest Additions software location and install Guest Additions now as follows


Again reboot the guest operating system.

Network Setup:

All actions in this section must be performed by the root user. Edit "/etc/hosts" file by appending the following information.

bash# cat /etc/hosts

127.0.0.1 localhost.localdomain localhost
# Public
192.168.1.101 rac1.oracle.com rac1
192.168.1.109 rac2.oracle.com rac2
# Private
192.168.0.101 rac1-priv.oracle.com rac1-priv
192.168.0.102 rac2-priv.oracle.com rac2-priv
# Virtual
192.168.1.111 rac1-vip.oracle.com rac1-vip
192.168.1.112 rac2-vip.oracle.com rac2-vip
# SCAN
192.168.1.113 rac-scan.oracle.com rac-scan


Setup Network Configuration with using "neat" command as root user. Follow below steps:

bash# neat


Select etho and click on “Edit”, Add entries mentioned in below image. Click “OK” and then select DNS Tab:


Add below entries and then select “Devices” tab.



  On "Devices" tab, click “Activate”.  Once it is done, select eth1

Select “eth1″ and then select Edit. 


Then select “Devices” tab and Click “Activate” and then do the “service network restart”


Oracle Clusterware Installation Prerequisites:

1) Install the following RPMs with using ROOT user:

bash# cd /media/OL5.7\ x86_64\ dvd\ 20110728/Server/

rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh oracleasm-support-2.1.7-1.el5.x86_64.rpm
rpm -Uvh kernel-debug-2.6.18-274.el5.x86_64.rpm
rpm -Uvh kernel-xen-2.6.18-274.el5.x86_64.rpm
rpm -Uvh oracleasm-2.6.18-274.el5*

2) umount tmpfs

bash# mount -t tmpfs shmfs -o size=3000m /dev/shm

3) Make sure setting permanent by amending the "tmpfs" setting of the "/etc/fstab" file 

4) Add below lines to the "/etc/sysctl.conf" file.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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

Run below command to change current kernel parameters.

bash# /sbin/sysctl –p

5) Add the following lines to "/etc/security/limits.conf" file

oracle  soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

6) Add the following lines to the “/etc/pam.d/login” file, if it does not already exist.

session required pam_limits.so

7) Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.

SELINUX=disabled

8) Create the new groups and users.

bash# groupadd -g 1000 oinstall
bash# groupadd -g 1200 dba
bash# useradd -u 1100 -g oinstall -G dba oracle
bash# passwd oracle

9) Create the directory in which the Oracle software will be installed.

bash# mkdir -p /u01/app/11.2.0/grid
bash# mkdir -p /u01/app/oracle/product/11.2.0/db_1
bash# chown -R oracle:oinstall /u01
bash# chmod -R 775 /u01/

10) Deconfigure NTP, the Oracle Cluster Time Synchronization Service (ctssd) can synchronize the times of the RAC nodes.

bash# service ntpd stop
Shutting down ntpd: [ OK ]
bash# chkconfig ntpd off
bash# mv /etc/ntp.conf /etc/ntp.conf.orig
If you want to use NTP, you must add the "-x" option into the following line in the “/etc/sysconfig/ntpd” file.

##############################################
Drop root to id 'ntp:ntp' by default.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
##############################################

# mv /etc/ntp.conf.orig /etc/ntp.conf

# service ntpd restart

bash# service ntpd status
ntpd (pid 6815) is running…
bash#

11)Login as "oracle" user and add the following lines at the end of the "/home/oracle/.bash_profile" file.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=rac1.oracle.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME
DB_HOME=$ORACLE_BASE/product/11.2.0/db_1; export DB_HOME
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Create a file called "/home/oracle/grid_env" with the following contents.

ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_HOME=$GRID_HOME; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Create a file "/home/oracle/db_env" with the following contents.

ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Just reboot the VM, and make sure all the changes has been effected.

Create Shared Disks:

Shutdown the "rac1.oracle.com" virtual machine using the following command.

bash# shutdown -h now

On RAC1, create 4 sharable virtual disks.

Click on Sata Controller second + button and select "Create New Disk"


Select VDI and click Next


Select Fixed Size


Select Location and size for asm disk


Select Create


Go to File menu and select Virtual Media Manager


Select asm1.vdi and select modify


 Select "Shareable"  and click ok


Do the same and add asm2.vdk,asm3.vdk, and asm4.vdk disks to virtual box


Start "RAC1" virtual machine. Once started the machine, log in as root user. Now you can configure the shared disks. The current disks can be seen by issuing the following commands.

bash# cd /dev
bash# ls sd*
sda sda1 sda2 sdb sdc sdd sde sdf
bash# 

Use the "fdisk" command to partition the disks sdb to sdf. The following output shows the expected fdisk output for the sdb disk.

bash# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.

The number of cylinders for this disk is set to 1305.
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)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):
Using default value 1305

Command (m for help): p

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
bash#

In each case, the sequence of answers is "n", "p", "1", "Return", "Return", "p" and "w".

Once all the disks are partitioned, the results can be shows by repeating the previous "ls" command.

bash# cd /dev
bash# ls sd*
sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1 sde sde1 sdf sdf1
bash#

Configure ASMLib using the following command:

bash# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
bash#

Load the kernel module using the following command.

bash# /usr/sbin/oracleasm init
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
bash#

If you have any problems, run the following command to make sure you have the correct version of the driver.

bash# /usr/sbin/oracleasm update-driver
Mark the five shared disks as follows.

bash# /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
bash# /usr/sbin/oracleasm createdisk DISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
bash# /usr/sbin/oracleasm createdisk DISK3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
bash# /usr/sbin/oracleasm createdisk DISK4 /dev/sde1
Writing disk header: done
Instantiating disk: done
bash#

It is unnecessary, but we can run the "scandisks" command to refresh the ASM disk configuration.

bash# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks…
Scanning system for ASM disks…
bash#

We can see the disks are now visible to ASM using the "listdisks" command.

bash# /usr/sbin/oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
bash#

The shared disks are now configured for the grid infrastructure.

Clone the Virtual Machine:

Shutdown the VM.

Manually clone the vboxrac1.vdi disk using the following commands.

cd C:\Program Files\Oracle\VirtualBox
VBoxManage clonehd E:\vboxrac1\vboxrac1.vmdk E:\vboxrac2\vboxrac2.vmdk

Create the "vboxrac2" virtual machine in VirtualBox in the same way as you did for "vboxrac1", with the exception of using an existing "vboxrac2.vdi" virtual hard drive.


Remember to add the second network adaptor as you did on the "vboxrac1" VM. When the VM is created, attach the shared disks to this VM.

cd C:\Program Files\Oracle\VirtualBox

VBoxManage storageattach vboxrac2 –storagectl "SATA Controller" –port 1 –device 0 –type hdd –medium E:\vboxrac1\asm1.vdi –mtype shareable
VBoxManage storageattach vboxrac2 –storagectl "SATA Controller" –port 2 –device 0 –type hdd –medium E:\vboxrac1\asm2.vdi –mtype shareable
VBoxManage storageattach vboxrac2 –storagectl "SATA Controller" –port 3 –device 0 –type hdd –medium E:\vboxrac1\asm3.vdi –mtype shareable
VBoxManage storageattach vboxrac2 –storagectl "SATA Controller" –port 4 –device 0 –type hdd –medium E:\vboxrac1\asm4.vdi –mtype shareable

Start the "vboxrac2" virtual machine and Ignore any network errors during the startup.

Log in to the "vboxrac2" virtual machine as the "root" user so we can reconfigure the network settings to match the following.

HOSTNAME: rac2.oracle.com
IP Address eth1: 192.168.1.109 (public address)
Default Gateway eth1: 192.168.1.1 (public address)
IP Address eth0: 192.168.0.102 (private address)
Default Gateway eth0: none

Edit the "/home/oracle/.bash_profile" file on the "vboxrac2" node to correct the ORACLE_SID and ORACLE_HOSTNAME values.

ORACLE_SID=RAC2; export ORACLE_SID
ORACLE_HOSTNAME=rac2.oracle.com; export ORACLE_HOSTNAME

Also, change the ORACLE_SID setting in the "/home/oracle/db_env" and "/home/oracle/grid_env" files.

Restart the "vboxrac2" virtual machine and start the "vboxrac1" virtual machine. Once both nodes are started, check they can both ping all the public and private IP addresses using the following commands.

ping -c 3 rac1
ping -c 3 rac1-priv
ping -c 3 rac2
ping -c 3 rac2-priv

At this point the virtual IP addresses defined in the "/etc/hosts" file will not work, so don't bother testing them.

Check the candidate ASM disks are visible on the second node using the "listdisks" command. If you are not able to see the DISKS then you may need to repeat the ASMLib configuration on the second node if the output of the following command is not consistent on both nodes.

bash# /usr/sbin/oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
bash#

The virtual machine setup is completed.

Before going to next steps, shutdown your VM's and take backup of them. If any failures happen beyond this point it is probably better to switch back to those backups.

Install the Grid Infrastructure:

Make sure the "rac1" and "rac2" virtual machines are started, then login to "rac1" or switch the user to oracle and start the Oracle installer.

bash$ cd /home/oracle/sw/grid
bash$ ./runInstaller

Select the "Install and Configure Grid Infrastructure for a Cluster" option, then press the "Next" button.


Select the "Typical Installation" option, then click the "Next" button:


On the "Cluster Configuration" screen, click the "Add" button. Enter the details of the second node in the cluster, then click the "OK" button.

Click the "SSH Connectivity..." button and enter the password for the "oracle" user. Click the "Setup" button to configure SSH connectivity, and the "Test" button to test it once it is complete.

Then press "Next".




Specify Installation Locations and select "Automatic Storage Management" as Cluster registry storage type and Exter SYSASM password. Then click "Next".




Enter disk group name as "DATA" and redundancy as "External" ans select all candidate disks. Then click "Next".


Give oraInventory location


The results of prerequisite checks are shown on the next screen. You should see one warning. The failure was caused by NTP and that should be expected. Check "Ignore All" box and press "Next".


Click "Finish" on the Summary screen.


Installation is in progress.


When prompted, run the configuration scripts on each node. Execute scripts as root user, first in rac1, then in rac2.


Then click close.

Install the Database:

Make sure the "rac1" and "rac2" virtual machines are started, then login to "rac1" or switch the user to oracle and start the Oracle installer.

bash$ cd /u01/database
bash$ ./runInstaller

Uncheck the "I wish to receive security updates..." checkbox and press the "Next" button:

Click "Yes"


Select the "Create and configure a database" option and press the "Next" button:


Select the "Server Class" option and press the "Next" button:


Make sure "Real Application Cluster database installation" is chosen and both nodes are selected, and then press the "Next" button.


Select the "Typical install" option and press the "Next" button:


Enter required information and click "Next"



Wait for the prerequisite check to complete. If there are any problems, either fix them, or check the "Ignore All" checkbox and click the "Next" button.


If you are OK with the summary information, click the "Finish" button.


Wait while the installation takes place. Once the software installation is complete the Database Configuration Assistant (DBCA) will start automatically. 

Once the Database Configuration Assistant (DBCA) has finished, click the "OK" button.

When prompted, run the configuration scripts on each node. When the scripts have been run on each node, click the "OK" button.

Execute scripts as root user in both nodes:

Click the "Close" button to exit the installer. Finally check the Status of the RAC.


Here you can find some useful RAC commands.


Hope this will help you :) 

Thanks,
Chowdari

Some Most Popular Articles