Step by step guide to install Oracle 19c ASM DB on Linux Virtual Machine : Easy 5 steps

Follow the 5 steps to setup oracle 19c grid infrastructure & database on ASM hosted on oracle Linux x86-64 platform 



Step 1 -->  Create & install Oracle Linux Virtual machine
Step 2 --> Additional setting on network , OS & installing dependent packages
Step 3 --> Download Oracle Software's , Install ASM libraries & Configure ASM disk
Step 4 --> Installing & configuring grid infrastructure 19c 
Step 5 --> Installing & configuring oracle 19c container database 

Lets begin ...


1 -->  Create & install Oracle Linux Virtual machine

1.a) create disks for virtual machine 

  click on 'new machine' , supply name of the vm and machine folder location which will hold all virtual disk images & select OS type as Linux 64 bit


we need to create three type of disks boot , u01 & asm. Out of which first one show as follow and rest can be created in same way.


Choose VDI 


Go for Dynamic as it allocates the space when used & takes less time for creation. rest everything is same as fixed size option


Provide over 20 GB sizing for each to avoid any space issues later during installation. 


As boot disk is created repeat the same for creating u01 & asm virtual hdd as follow 



It should look as below with all three disks boot, u01, asm.



1.b) boot the virtual machine with Linux operating system installer  


                             Select the Linux ISO and add to the controller as below 



           Start the machine & choose to install oracle Linux 


           Change the Installation type to infrastructure server & select the component options  as below 




   Proceed with the installation 


--> Additional setting on network , OS & installing dependent packages

2.a) checking X11 xclock for GUI interface 

which xclock

yum install xclock 






2.b) install xauth & DISPLAY setting

which xauth

yum install xauth


 

xclock

cp .Xauthority /tmp

chmod 755 /tmp/.Xauthority

env | grep -i DISPL

DISPLAY=localhost:10.0




For  grid

su - grid

cp /tmp/.Xauthority .

DISPLAY=localhost:10.0

export DISPLAY

xclock




2.c) Network setting to connect from outside VM





vi /etc/sysconfig/network-script/ifcfg-enp0s3

Then change


ONBOOT = yes

And reboot the VM.. IP should be visible 







2.d) Mount the file system /u01 

fdisk –l

mkfs -t ext4 /dev/sdb

mkdir /u01

mount /dev/sdb /u01

df -h /u01

Add to /etc/fstab for persistent across reboot

/dev/sdb        /u01       ext4    defaults        0 0








2.e) Create oracle/grid user and permission 

groupadd oinstall

groupadd dba

useradd -G oinstall oracle

useradd -G oinstall grid

usermod –g oinstall grid

usermod –g oinstall oracle

passwd grid

passwd oracle

chown -R grid:oinstall /u01




--> Download Oracle Software's , Install ASM libraries & Configure ASM disk

3.a) Download Oracle DB software's 


Download oracle grid home & database home from oracle site 


3.b) Download Oracle ASM library 

post download it should look like below  ..



3.c) Install & configure ASM library 

cd /u01/app/grid/software

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

rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm

yum install kmod-oracleasm  


oracleasm configure –i

oracleasm init

oracleasm status



fdisk -l

fdisk /dev/sdc



ASM disk PATH /dev/sdc1 is available now for ASM disk creation 


oracleasm createdisk DATA /dev/sdc1



chmod 777 /dev/sdc*

**Change the permission to that grid installation can detect the disk **


--> Installing & configuring grid infrastructure 19c 

4.a) Pre-requisites grid installation 

cd /u01

mkdir app

chown -R grid:oinstall app

cd app

mkdir grid

mkdir oracle

chown grid:oinstall grid

chown  oracle:oinstall oracle

cd /u01/app/grid

mkdir software

mkdir -p /u01/app/grid/19c

login as grid and copy all software in /u01/app/grid/software and grid home setup in /u01/app/grid/19c


4.b) Grid installation 

cd /u01/app/grid/19c

./gridSetup.sh






Incase ASM disk not visible ..

cd /dev

ls -lrt sd*

chmod 777 sdc*









Incase you face memory error  ..

ORA-00845: MEMORY_TARGET not supported on this system

[grid@localhost dbs]$ df -h /dev/shm

Filesystem      Size  Used Avail Use% Mounted on

tmpfs           697M     0  697M   0% /dev/shm

[grid@localhost dbs]$ pwd

/u01/app/grid/19c/dbs

[grid@localhost dbs]$ cat init.ora | grep -i memory

memory_target=500M

[root@localhost ~]# umount tmpfs

[root@localhost ~]# mount -t tmpfs shmfs -o size=1500m /dev/shm

[root@localhost ~]# df -h /dev/shm

Filesystem           Size  Used Avail Use% Mounted on

shmfs                1.5G     0  1.5G   0% /dev/shm





--> Installing & configuring oracle 19c container database 

mkdir /u01/app/oracle/19c
cd /u01/app/oracle/19c

unzip the db software home 19c as oracle osuser 

./runInstaller 










[oracle@localhost 19c]$ ps -ef | grep -i pmon

oracle  1472  1  0 04:22 ?   00:00:00 ora_pmon_mylab

oracle  2582 13850 0 04:31 pts/1  00:00:00 grep --color=auto -i pmon

grid   7100  1  0 01:16 ?  00:00:01 asm_pmon_+ASM

[oracle@localhost 19c]$ pwd

/u01/app/oracle/19c

[oracle@localhost 19c]$ sqlplus / as sysdba

-bash: sqlplus: command not found

[oracle@localhost 19c]$ ORACLE_HOME=/u01/app/oracle/19c

[oracle@localhost 19c]$ export ORACLE_HOME

[oracle@localhost 19c]$ PATH=$PATH:$ORACLE_HOME/bin

[oracle@localhost 19c]$ export PATH

[oracle@localhost 19c]$ ORACLE_SID=mylab

[oracle@localhost 19c]$ export ORACLE_SID

[oracle@localhost 19c]$ sqlplus / as sysdba





Success !!

Also refer 



No comments:

Post a Comment