How to install ORACLE 11g ASM and RDBMS software in LINUX 5

How to install ORACLE ASM and RDBMS software in LINUX

Hello, friends in this article I’m going to show you install ORACLE 11g ASM and RDBMS together on the Linux platform step by step.

Software which i’m using

  • VMware 9
  • ORACLE Linux 5.8
  • ORACLE 11g R2 (11.2.0.1.0)
  • ORACLE 11g grid (11.2.0.1.0)

Start ASM Installation

Required Groups

Create required groups for oracle and ASM instances using the below queries.

For Oracle

groupadd dba
groupadd oinstall
groupadd oper

For ASM

groupadd asmadmin
groupadd asmdba
groupadd asmoper

OS Users

Create ORACLE and Grid users using the below queries.

useradd -g oinstall -G dba,oper,asmdba -d /home/oracle oracle
useradd -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid grid
passwd oracle
passwd grid

Required Directories

Create required directories using the following queries.

mkdir -p /u01/app/oracle/product/11.2.0/db_1
mkdir -p /u01/app/grid/product/11.2.0/grid

Privileges

Grant required privileges using the following queries.

chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid/product/11.2.0/grid
chmod -R 775 /u01

.bash_profile

Add below parameters in .bash_profile for ORACLE and Grid users.

For Oracle user

#vi .bash_profile

export ORACLE_SID=orcl
export ORACLE_UNQNAME=orcl
export JAVA_HOME=/usr/local/java
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS11=$ORACLE_HOME/nls/data
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022

How install ASM Linux?

For Grid user

#vi .bash_profile

export ORACLE_SID=+ASM
export JAVA_HOME=/usr/local/java
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
export ORACLE_TERM=xterm
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS11=$ORACLE_HOME/nls/data
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
PATH=${PATH}:/u01/app/common/oracle/bin
export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 022

Edit sysctl.conf

Add below parameters in “/etc/sysctl.conf

#vi /etc/sysctl.conf

# ORACLE PARAMETERS
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586

Apply the above changes.

 /sbin/sysctl -p

Edit limits.conf

Add below parameters in “/etc/security/limits.conf

#vi /etc/security/limits.conf

oracle      soft         nproc      2047
oracle      hard         nproc      16384
oracle      soft         nofile      4096
oracle      hard         nofile      65536
oracle      soft         stack       10240
grid        hard         nofile      65536

Edit global profile ans csh.login

Edit global profile settings and add the below parameters.

#vi /etc/profile

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

#vi /etc/csh.login

if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif

Now adding 3 hard disks using VMware, go into VM settings, add, select harddisk, next, SCSI, independent, persistent, create a new virtual disk, maximum disk size(GB): 10, next, finish, After adding hard drives we need to reboot the pc for mounting the harddisks, alternatively you can avoid rebooting, using below command yo mount disks.

How do I install ASM on standalone?

echo "- - -"> /sys/class/scsi_host/host0/scan

Now create the partition of all three hard disks using the below commands.

fdisk /dev/sdb
fdisk /dev/sdc
fdisk /dev/sdd

Now set the permissions for hard drives using the below commands.

chown grid:asmadmin /dev/sdb1
chmod 660 /dev/sdb1
chown grid:asmadmin /dev/sdc1
chmod 660 /dev/sdc1
chown grid:asmadmin /dev/sdd1
chmod 660 /dev/sdd1

Make sure these RPMs must be installed in your system for configuring ASM Disk.

oracleasm-support-2.0.1-1.i386.rpm
oracleasmlib-2.0.1-1.i386.rpm
oracleasm-2.6.9-34.ELsmp-2.0.1-1.i686.rpm
libaio-devel-0.3.106
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-devel-2.2.11

Configure ASM and create an ASM disk using the below commands.

/etc/init.d/oracleasm configure



Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y

How to create asm disk in linux?

Create ASM DISK run as a root (#)

/etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
/etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
/etc/init.d/oracleasm createdisk VOL3 /dev/sdd1

Make a directory using the below commands and gives appropriate permissions.

mkdir /oracle
chown -R oracle:oinstall /oracle
chmod -R 775 /oracle

Now copy the GRID and RDBMS software in the ORACLE folder and unzip it, run runInstaller firstly for grid user, then after completed it, then run runInstaller for oracle user, for more details watch above video or below video.

Read - Oracle Database Migration from Non-ASM to ASM

Connect with me on:

Instagram: https://www.instagram.com/digitalshripal
Linkedin: 
https://www.linkedin.com/in/shripal-singh
Twitter: 
https://twitter.com/ocptechnology
Facebook: 
https://www.facebook.com/ocptechnology
YouTube:
https://www.youtube.com/ocptechnology

One thought on “How to install ORACLE 11g ASM and RDBMS software in LINUX 5

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top