Академический Документы
Профессиональный Документы
Культура Документы
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.
1. 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.
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.
Copy and paste following and save the .bash_profile. You may skip lines in red color
#---------------------------------------------------------------------------------------------------------
# .bash_profile
# ---------------------------------------------------
# OS User: oracle
# Application: Oracle Database Software Owner
# Version: Oracle 11g Release 2.4
# ---------------------------------------------------
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_HOME
NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
export NLS_DATE_FORMAT
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
export TEMP=/tmp
export TMPDIR=/tmp
umask 022
#-----------------------------------------------------------------------------------------------------------------
Copy and paste following and save the .bash_profile. You may skip lines in red color
#.bash_profile
# ---------------------------------------------------
# OS User: grid
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
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
#----------------------------------------------------------------------------------------------------------
For oracle user it has been automatically setup by the oracle-validated tool.
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
> else
> ulimit -u 16384 -n 65536
> fi
> umask 022
> fi
> EOF
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.
ORACLE_HOME is grid users ORACLE_HOME and /home/Downloads is the directory where we
extracted the patch 18370031
Open a new terminal window change the user to root and run the scripts.
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:
Login with user oracle and extract the database archives. and you will see a folder database
You may face error like following.
In /u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk
Look for the line $(MK_EMAGENT_NMECTL)
Oracle Database 11gR2 software has been installed successfully. Now we have to create the database
using dbca with user oracle.
Cheers:-)