How To Install Oracle Database 11g R2 On Oracle Linux 7 With ASM
How To Install Oracle Database 11g R2 On Oracle Linux 7 With ASM
ASM
In this demo we are going to install oracle database 11gR2 with ASM (Automatic Storage Management)
on Oracle Linux 7 virtual machine which we have created in previous post.
First we have shutdown the Oracle Linux 7 VM to create virtual disks for ASM disk groups. we are going
to create three virtual hard disks with following names.
CRSDISK1 ( 2GB) for CRSVOL1 disk where Cluster Ready Services (CRS) files will
be stored. CRS provides many system management services and interacts with the
vendor clusterware to coordinate cluster membership information.
2.
DATADISK1 (10 GB) disk for DATAVOL1 disk. Here database will keep all
datafiles, control files, log files
3.
FRADISK1 (10 GB) disk for FRAVOL1 disk for database Fast Recovery Area
(FRA) files. For example: database backup files, copy of database control files.
1.
Open Virtual machine Settings and create new virtual hard disks.
After
creating
new
virtual
hard
disks
lets
power
on
the
virtual
machine,
Now we have to create recommended groups and user for Grid infrastructure. It is recommended to use a
separate
user
from
an
oracle
user.
[root@OEL7
[root@OEL7
[root@OEL7
~]#
~]#
~]#
groupadd
groupadd
groupadd
-g
-g
-g
1200
1201
1202
asmdba
asmadmin
asmoper
password
for
user
grid.
We have to assign oracle user to asmdba group in order to all oracle user to discover ASM disks during
database creation. oper group will be used by oracle software.
To improve the performance of the software on Linux systems, you must increase the
following resource limits for the Oracle software owner users ( grid).
For oracle user it has been automatically setup by the oracle-validated tool.
To make these changes, run the following as root:
Add the following lines to the /etc/security/limits.conf file
[root@OEL7 ~]# vi /etc/security/limits.conf
Add or edit the following line in the /etc/pam.d/login file, if it does not exist:
[root@OEL7 ~]# cat >> /etc/pam.d/login <<EOF
> session required pam_limits.so
> EOF
Add the following lines to the /etc/profile file by running the following command:
[root@OEL7 ~]# cat >> /etc/profile <<EOF
> if [ \$USER = "oracle" ] || [ \$USER = "grid"] ; then
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> umask 022
> fi
> EOF
Install oracle ASM package and create ASM disk groups:
Check if oracleasm-support package is installed or not by running following command
rpm -qa | grep oracleasm
If installed then go with Next step to install oracleasmlib, otherwise install it
Now Create Oracle ASM Disk Volumes, Check the available disks
We have three disks available for ASM. Now we have to create partitions to be able to use those
partitions as ASM disks.
Reboot the system to apply the changes. To List ASM disk run following.
Now we have to install Oracle Grid Infrastructure, login as grid user browse the path up-to grid extracted
folder and run the installer.
Before Running Root scripts we need to install Opath 18370031. If you have support account download
the patch and install as grid_home Owner which is grid user.
Open a new terminal window change the user to root and run the scripts.
At this moment we have Oracle ASM instance and related services up and
running:
Check sqlplus
Create ASM disk group for Oracle Database Installation (+FRA and +DATA)
As a grid user run asmca (ASM Configuration Assistant)
Now we have to install the Oracle database 11gR2. Logout and login with user root and change
the password for user oracle as we didn't set the password for user oracle:
To set the password run following command
[root@oel7 ~] passwd oracle
Login with user oracle and extract the database archives. and you will see a folder database
Oracle Database 11gR2 software has been installed successfully. Now we have to create the database
using dbca with user oracle.
[oracle@oel7 ~]$ dbca &
Database has been created successfully. Now we can use sqlplus to connect to database or Enterprise
Manager Database Control from a browser.
Lets Check sqlplus and unlock Sample Schema.
That's all. We have successfully installed oracle database 11gR2 11.2.0.4 with ASM on a Stand alone
Oracle Linux 7.1
Cheers:-)