PLEASE NOTE:

This is a 12c standard cluster using asm installation on my test VBox nodes and I know there were some issues on swapspace etc but as these were minimal I didn’t care, I just wanted to make sure I got my grin install documented.

If you don’t like this then feel free to go elsewhere.

Not using GNS, Not using Leaf Nodes, Using local ASM

Configure the hosts file

edit /etc/hosts

127.0.0.1 localhost localhost.localdomain

::1 localhost localhost.localdomain

192.168.0.25 ambari-RAC1 ambari-RAC1.localdomain

192.168.0.26 ambari-RAC2 ambari-RAC2.localdomain

192.168.0.67 ambari-cluster ambari-cluster.localdomain

192.168.0.25 ambari-RAC1-vip ambari-RAC1-vip.localdomain

192.168.0.26 ambari-RAC2-vip ambari-RAC2-vip.localdomain

10.1.1.5 ambari-RAC1-priv ambari-RAC1-priv.localdomain

10.1.1.6 ambari-RAC2-priv ambari-RAC2-priv.localdomain

Set up the hostname

For ambari-rac1

$ hostname

e.g.

hostname ambari-rac1.localdomain

$ domainname

(none)

$ vi /etc/hostname

e.g.

ambari-rac1.localdomain

$ hostnamectl set-hostname ambari-rac1.localdomain

$ nmcli general hostname

Create Groups

oinstall, dba, oper, bckpdba, asmdba, dgdba, kmdba, asmadmin, asmoper

Create Users

grid – member of wheel, oinstall, asmadmin, asmdba, asmoper, dba,bckpdba

oracle – member of wheel, oinstall, dba, oper, bckpdba, asmdba, dgdba kmdba

Profiles

Grid /home/grid/.bash_profile

GRID_BASE=/u01/app/grid

ORACLE_BASE=/u01/app/grid

CRS_HOME=/u01/app/12.1.0/grid

GRID_HOME=/u01/app/12.1.0/grid

ORACLE_HOME=/u01/app/12.1.0/grid

ORA_CRS_HOME=/u01/app/12.1.0/grid

ORACLE_SID=+ASM??

ORA_ENV=12102

export EDITOR ORACLE_BASE ORACLE_HOME GRID_BASE GRID_HOME ORACLE_SID ORA_ENV ORACLE_HOSTNAME CRS_HOME

PATH=$PATH:/usr/sbin:$ORACLE_BASE/dba/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch

export PATH

Oracle /home/oracle/.bash_profile

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/12102/dbhome_1

ORACLE_SID=orcl

ORA_ENV=dbhome_1

export EDITOR ORACLE_BASE ORACLE_HOME ORACLE_SID ORA_ENV ORACLE_HOSTNAME

NLS_DATE_FORMAT=’YYYYMMDD.HH24MISS’

NLS_LANG=american_america.al32utf8

export NLS_DATE_FORMAT NLS_LANG

PATH=$PATH:/usr/sbin:$ORACLE_BASE/dba/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatchexport PATH

Ulimits

edit /etc/security/limits.conf and add the following lines:

grid hard nofile 65536

oracle hard memlock 4335826

SWAPFILE

for a 4 gig memory system that already has a 2 gig swapfile:

# dd if=/dev/zero of=/swapfile bs=1024 count=2097152

# mkswap /swapfile

# chmod 0600 /swapfile

# swapon /swapfile

# vi /etc/fstab                                  ## to make permanent on reboot

/swapfile swap swap defaults 0 0

# cat /proc/swaps                            ## to check swap space

# free ## to check swap space

SSH

Not strictly necessary as the installer can do this

ORACLE DIRECTORIES AND ORAINST

mkdir -p /u01/app/grid

mkdir -p /u01/app/12.1.0/grid

mkdir -p /u01/app/oraInventory

chmod -R grid:oinstall /u01/app/grid

chmod -R grid:oinstall /u01/app/12.1.0

mkdir -p /u01/app/oracle/product/12102

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

Install packages

get the oracle public yum

from http://public-yum.oracle.com/public-yum-ol7.repo

yum install oracle-rdbms-server-12cR1-preinstall

Install the ASM drivers

kmod-oracleasm

oracleasm-support

Install cvuqdisk from the install kit

rpm -Upv /kit dir/grid/rpm/cvuqdisk-1.0.9-1.rpm

Install asmlib

rpm -Upv oracleasmlib-2.0.12-1.el7.x86_64.rpm

Update OS

yum update -y

Remove NTPD

avahi-deamon

stop and disable

system parameters

create /etc/sysctl.d/ora_params with the following:

# Oracle 11g R2 and 12c R1 kernel tuning
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 1048576

These will be loaded on system reboot.

Configure ASM (if using it)

/etc/init.d/oracleasm configure

grid

oinstall

y

y

/usr/sbin/oracleasm init

/etc/init.d/oracleasm scandisks

/etc/init.d/oracleasm listdisks

initialise the disks.

Assuming sdb and sdc are the disks:

fdisk /dev/sdb

n for new

carriage return

carriage return

carriage return

carriage return

w

fdisk /dev/sdc

n

carriage return

carriage return

carriage return

carriage return

w

/usr/sbin/oracleasm createdisk diskb /dev/sdb1

/usr/sbin/oracleasm createdisk diskc /dev/sdc1

Install GRID

chmod grid:oinstall /u01

chmod grid:oinstall /u01/app

chmod grid:oinstall /u01/app/grid

Unzip the oracl grid software

Run cluvfy

as the grid user

/unzip directory/runcluvfy.sh stage -pre crsinst -n ambari-rac1,ambari-rac2 -fixupnoexec

Run fixup to resolve most issues and manually correct any others.

Run the grid installer

/unzip directory/runInstaller

Install and configure oracle grid infrastructure for a cluster

Configure a standard cluster

Typical Installation

Cluster name: ambari-cluster

Nodes: ambari-rac1, ambari-rac1-vip
Nodes: ambari-rac2, ambari-rac2-vip

SSH Connectivity.

Setup

GO TO install 12c grid Part 2