Monday, October 10, 2016

Silent Installation/Configuration of Grid & Oracle (RDBMS) with ASM 11.2.0.4.0 on OracleLinux 6.4

Silent Installation/Configuration of Grid & Oracle (RDBMS) 11.2.0.4.0 on OracleLinux 6.4

******************************************************


In this session, we are performing silently install Oracle 11.2.0.4.0 64-bit on OracleLinux 6.0 using Virtualbox.

This install demonstration is going to use the silent install mode for all components. At least within the guest VM, at no point will we use a GUI for the install. We will need to use the Virtualbox GUI to create the VM, install the OS and add disks.

Time Required: 70 minutes
*****************

Demo Materials:
*****************

-> An x86 64-bit computer at least 2GB RAM and 15GB of hard disk space.
-> Virtualbox.
-> Whatever OS Virtualbox needs to run on. In my case I run it on Windows 10 Home.
-> Oracle Grid and Database software version 11.2.0.4.0


Steps to perform silent Installation of Grid & Oracle
Step I Create the OracleLinux VM.
Step II Add Required RPMs.
Step III Configure the Kernel.
Step IV Create directories, Add groups.
Step V Create Grid & Oracle Users and give permissions.
Step VI Make the primary partition for added disk to use for ASM.
Step VII Install RPM for ASM, Configure ASM, Create ASM disks.
Step VIII Copy grid binary on server , Unzip & Create responce file for grid. (With Grid user).
Step IX We are ready to install grid in silent mode :)
Step X Copy oraclebinary on server , Unzip & Create responce file for oracle. (With Oracle user)
Step XI We are ready to install oracle in silent mode :)
Step XII Create Listener in silent mode
Step XIII Create ASM Instance & Disk group
Step XIV Create database on created diskgroup
Step XV Create 1 more disk group for FRA



Step I – Create the OracleLinux VM.


Install the Virtualbox and create one VM for OracleLinux. I created a new VM using the Virtualbox. Virtualbox recognizes the OracleLinux 6.0 install ISO image as OracleLinux 64-bit and allows Easy Installer to do most of the work.

I created  VM with 2GB RAM and a single 100GB disks.

Step II – Add Required RPMs.


Oracle 11.2.0.4.0 requires extra RPMs from the install media.

The following command should load all needed RPMs for 11.2.0.4.0 Grid and Database.

rpm -Uvh  binutils-2*x86_64*
rpm -Uvh  glibc-2*x86_64*
rpm -Uvh  glibc-2*i686*
rpm -Uvh  nss-softokn-freebl-3*x86_64*
rpm -Uvh  nss-softokn-freebl-3*i686*
rpm -Uvh  elfutils-libelf-0*x86_64*
rpm -Uvh  elfutils-libelf-devel-0*x86_64*
rpm -Uvh  gcc-4*x86_64*
rpm -Uvh  gcc-c++-4*x86_64*
rpm -Uvh  ksh-*x86_64*
rpm -Uvh  numactl-devel-2*x86_64*
rpm -Uvh  sysstat-9*x86_64*
rpm -Uvh  compat-libcap*
rpm -Uvh  binutils-2.*
rpm -Uvh  compat-libstdc++-33*
rpm -Uvh  elfutils-libelf-0.*
rpm -Uvh  libaio-0.*
rpm -Uvh  libaio-devel-0.*
rpm -Uvh  sysstat-9.*
rpm -Uvh  glibc-2.*
rpm -Uvh  glibc-common-2.*
rpm -Uvh  glibc-devel-2.*
rpm -Uvh  glibc-headers-2.*
rpm -Uvh  ksh-2*
rpm -Uvh  make-3.*
rpm -Uvh  libgcc-4.*
rpm -Uvh  libstdc++-4.*
rpm -Uvh  libstdc++-4.*.i686*
rpm -Uvh  libstdc++-devel-4.*
rpm -Uvh  libcap-2.16-5.2.el6.i686.rpm
rpm -Uvh  libattr-2.4.44-4.el6.i686.rpm
rpm -Uvh  --allfiles elfutils-libelf-0*x86_64* elfutils-libelf-devel-0*x86_64*
rpm -Uvh  elfutils-libelf-0*i686* elfutils-libelf-devel-0*i686*
rpm -Uvh  libtool-ltdl*i686*
rpm -Uvh  ncurses*i686*
rpm -Uvh  readline*i686* 
rpm -Uvh  unixODBC*


Step III – Configure the Kernel.


Next we need to configure the OracleLinux 6.0 Linux kernel to support Oracle 11gR2 11.2.0.4.0.

Before we can install Oracle 11.2.0.4.0 on our new VM, we need configure the Linux kernel and some others setting. The following steps modify key settings to allow Oracle to execute. We will also disable the NTP time synchronization configuration file which will confuse the Oracle installer.


(i)   If you are not using DNS, the "/etc/hosts" file must contain the following information.


          192.168.56.101    dell.localdomain       dell

(ii)   Add or amend the following lines to the "/etc/sysctl.conf" file.

          fs.aio-max-nr = 1048576
          fs.file-max = 6815744
          kernel.shmall = 2097152 
          kernel.shmmax = 1054504960
          kernel.shmmni = 4096
     #semaphores: semmsl, semmns, semopm, semmni
          kernel.sem = 250 32000 100 128
          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=1048586


(iii)   Run the following command to change the current kernel parameters.

          /sbin/sysctl -p


(iv)   Add the following lines to the "/etc/security/limits.conf" file.

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

          grid soft nofile 65536
          grid hard nofile 65536
          grid soft nproc 16384
          grid hard nproc 16384


(v)   Add the following lines to the "/etc/pam.d/login" file, if it does not already exist.

          session    required     pam_limits.so

(vi)  Make the following changes to the default shell startupfile, add the following lines to the "/etc/profile" file:

            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

(vii)   Amend the "/etc/security/limits.d/90-nproc.conf" file as described below. See MOS Remark [ID 1487773.1]

           # Change this
               *          soft    nproc    1024

            # To this
                * - nproc 16384

(viii)   Just modify entry in “/etc/fstab” to have persistent settings between reboot of your machine

              tmpfs   /dev/shm   tmpfs  size=2500M  0 0

                 #  Remount it #

                       mount -o remount tmpfs

                 # And verify #

                         mount | grep tmpfs

                   # Out Put #

                          tmpfs on /dev/shm type tmpfs (rw,size=2500M)


(ix)   Change the setting of SELinux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

                 SELINUX=disabled

(x)    If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here. The following is an example of disabling the firewall.

                # service iptables stop
                # chkconfig iptables off

(xii)     Disable the NTP configuration file

               # service ntpd stop
                  Shutting down ntpd:                                        [  OK  ]
               # chkconfig ntpd off
               # mv /etc/ntp.conf /etc/ntp.conf.orig
               # rm /var/run/ntpd.pid



Step IV - Create directories, Add groups


       For oracle user
       ++++++++++++++

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

       For grid user
       ++++++++++++++

            mkdir -p /u01/app/grid
            mkdir -p /u01/app/grid/11.2.0/grid_home
           mkdir -p /u01/app/oraInventory




Step V - Create Grid & Oracle Users and give permissions.


groupadd -g 200 oinstall
groupadd -g 201 dba
groupadd -g 202 oper
groupadd -g 203 asmdba
groupadd -g 204 asmoper
groupadd -g 205 asmadmin


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

[root@DBA01 Packages]# passwd oracle
[root@DBA01 Packages]# passwd grid

chown -R oracle:oinstall /u01/
chown -R oracle:oinstall /u01/app/oracle/oraInventory
chown -R grid:oinstall /u01/app/grid/
chown -R grid:oinstall /u01/app/oraInventory/
chown -R grid:oinstall /u01/app/grid/11.2.0/grid_home
chown -R oracle:dba /opt
chown -R grid:oinstall /opt
chmod -R 775 /u01/
chmod -R 777 /opt



Step VI - Make the primary partition for added disk to use for ASM



(i) List of partition disk in my machine.

[root@dell ~]# fdisk -l

Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dc25a

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Stepition 1 does not end on cylinder boundary.
/dev/sda2              64       13055   104344576   8e  Linux LVM

Disk /dev/sdb: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdc: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sdd: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_dell-lv_root: 100.5 GB, 100520689664 bytes
255 heads, 63 sectors/track, 12220 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_dell-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_dell-lv_home: 2097 MB, 2097152000 bytes
255 heads, 63 sectors/track, 254 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000




(ii) Making primary partition into added Disk


[root@dell ~]# fdisk /dev/sdb
Device contains neither a valid DOS Stepition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x16019d1e.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of Stepition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
Command action
e   extended
p   primary Stepition (1-4)
p
Stepition number (1-4): 1
First cylinder (1-783, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-783, default 783):
Using default value 783

Command (m for help): w
The Stepition table has been altered!

Calling ioctl() to re-read Stepition table.
Syncing disks.
[root@dell ~]#

[root@dell ~]# fdisk /dev/sdc
Device contains neither a valid DOS Stepition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x7cf7c573.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of Stepition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
Command action
e   extended
p   primary Stepition (1-4)
p
Stepition number (1-4): 1
First cylinder (1-783, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-783, default 783):
Using default value 783

Command (m for help): w
The Stepition table has been altered!

Calling ioctl() to re-read Stepition table.
Syncing disks.


[root@dell ~]# fdisk /dev/sdd
Device contains neither a valid DOS Stepition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xfd250332.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of Stepition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): n
Command action
e   extended
p   primary Stepition (1-4)
p
Stepition number (1-4): 1
First cylinder (1-1566, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1566, default 1566):
Using default value 1566

Command (m for help): w
The Stepition table has been altered!

Calling ioctl() to re-read Stepition table.
Syncing disks.
[root@dell ~]#


(iii) Heare list of partitions, We have made.

[root@dell Packages]# ls -lrth /dev/sd*
brw-rw----. 1 root disk 8,  0 Sep 11 00:30 /dev/sda
brw-rw----. 1 root disk 8,  2 Sep 11 00:30 /dev/sda2
brw-rw----. 1 root disk 8,  1 Sep 11 00:30 /dev/sda1
brw-rw----. 1 root disk 8, 16 Sep 11 01:09 /dev/sdb
brw-rw----. 1 root disk 8, 17 Sep 11 01:09 /dev/sdb1
brw-rw----. 1 root disk 8, 32 Sep 11 01:09 /dev/sdc
brw-rw----. 1 root disk 8, 33 Sep 11 01:09 /dev/sdc1
brw-rw----. 1 root disk 8, 48 Sep 11 01:10 /dev/sdd
brw-rw----. 1 root disk 8, 49 Sep 11 01:10 /dev/sdd1



Step VII - Install RPM for ASM, Configure ASM, Create ASM disks


(i) Install ASM RPM which I downloaded from web acording to my linux. 

[root@dell sf_Shared_folder_1]# ls -lrth *asmlib*

-rwxrwx--- 1 root vboxsf 13K Oct 18  2015 oracleasmlib-2.0.4-1.el6.x86_64.rpm

[root@dell sf_Shared_folder_1]# ls -lrth *support*

-rwxrwx--- 1 root vboxsf 74K Jun  7 01:15 oracleasm-support-2.1.8-1.el6.x86_64.rpm

[root@dell sf_Shared_folder_1]# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm

warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
1:oracleasm-support      ########################################### [100%]

[root@dell sf_Shared_folder_1]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm

warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
1:oracleasmlib           ########################################### [100%]

(ii) Configure the oracleasm

[root@dell sf_Shared_folder_1]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

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

Writing Oracle ASM library driver configuration: done


(iii) After installing start oracleasm software 

[root@dell sf_Shared_folder_1]# oracleasm status
Checking if ASM is loaded: no
Checking if /dev/oracleasm is mounted: no

[root@dell sf_Shared_folder_1]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm

[root@dell sf_Shared_folder_1]# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes


(iv) Create ASM disk


[root@dell sf_Shared_folder_1]# ls -lrth /dev/sd*
brw-rw---- 1 root disk 8,  0 Sep  8 02:26 /dev/sda
brw-rw---- 1 root disk 8,  2 Sep  8 02:26 /dev/sda2
brw-rw---- 1 root disk 8,  1 Sep  8 02:26 /dev/sda1
brw-rw---- 1 root disk 8, 16 Sep  8 02:38 /dev/sdb
brw-rw---- 1 root disk 8, 17 Sep  8 02:38 /dev/sdb1
brw-rw---- 1 root disk 8, 32 Sep  8 02:39 /dev/sdc
brw-rw---- 1 root disk 8, 33 Sep  8 02:39 /dev/sdc1
brw-rw---- 1 root disk 8, 48 Sep  8 02:39 /dev/sdd
brw-rw---- 1 root disk 8, 49 Sep  8 02:39 /dev/sdd1


[root@dell sf_Shared_folder_1]# ls -lrth /dev/oracleasm/disk*
total 0


[root@dell sf_Shared_folder_1]# oracleasm createdisk ASM_DISK01 /dev/sdb1
Writing disk header: done
Instantiating disk: done

[root@dell sf_Shared_folder_1]# oracleasm createdisk ASM_DISK02 /dev/sdc1
Writing disk header: done
Instantiating disk: done

[root@dell sf_Shared_folder_1]# oracleasm createdisk ASM_FRA01 /dev/sdd1
Writing disk header: done
Instantiating disk: done

[root@dell sf_Shared_folder_1]# ls -lrth /dev/oracleasm/disk*

brw-rw---- 1 grid asmdba 8, 17 Sep 11 03:42 ASM_DISK01
brw-rw---- 1 grid asmdba 8, 33 Sep 11 03:43 ASM_DISK02
brw-rw---- 1 grid asmdba 8, 49 Sep 11 03:43 ASM_FRA01


Step VIII - Copy grid binary on server , Unzip & Create responce file for grid. (With Grid user)

Click Here to see response file


Step IX -We are ready to install grid in silent mode :)


(i) Hit the command to install grid.

[grid@dell grid]$ ./runInstaller -silent -showProgress -ignoreSysPrereqs -ignorePrereq -responseFile /home/grid/grid_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 84891 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4031 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-09-11_08-20-06AM. Please wait ...[grid@dell grid]$ [WARNING] [INS-32022] Grid infrastructure software for a cluster installations must not be under an Oracle base directory.
CAUSE: Grid infrastructure for a cluster installations assign root ownership to all parent directories of the Grid home location. As a result, ownership of all named directories in the software location path are changed to root, creating permissions errors for all subsequent installations into the same Oracle base.
ACTION: Specify software location outside of an Oracle base directory for grid infrastructure for a cluster installations.
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2016-09-11_08-20-06AM.log

Prepare in progress.
..................................................   9% Done.

Prepare successful.

Copy files in progress.
..................................................   14% Done.
..................................................   23% Done.
..................................................   28% Done.
..................................................   33% Done.
..................................................   38% Done.
..................................................   45% Done.
..................................................   52% Done.
..................................................   60% Done.
..................................................   65% Done.
..................................................   70% Done.
..................................................   75% Done.
..............................
Copy files successful.

Link binaries in progress.
..........
Link binaries successful.
..........
Setup files in progress.
..................................................   80% Done.
..................................................   94% Done.

Setup files successful.
The installation of Oracle Grid Infrastructure 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2016-09-11_08-20-06AM.log' for more details.

Execute Root Scripts in progress.

As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/grid/11.2.0/grid_home/root.sh


..................................................   100% Done.

Execute Root Scripts successful.
Successfully Setup Software.


(ii) Run the orainstRoot.sh & root.sh script with root user

[root@dell ~]# /u01/app/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

[root@dell ~]# /u01/app/grid/11.2.0/grid_home/root.sh

Check /u01/app/grid/11.2.0/grid_home/install/root_dell.localdomain_2016-09-11_08-25-45.log for the output of root script

[root@dell ~]# cat /u01/app/grid/11.2.0/grid_home/install/root_dell.localdomain_2016-09-11_08-25-45.log
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/grid/11.2.0/grid_home/perl/bin/perl -I/u01/app/grid/11.2.0/grid_home/perl/lib -I/u01/app/grid/11.2.0/grid_home/crs/install /u01/app/grid/11.2.0/grid_home/crs/install/roothas.pl


To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/grid/11.2.0/grid_home/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.

login as: root
root@192.168.56.103's password:
Last login: Sun Sep 11 08:25:15 2016 from 192.168.56.1

[root@dell ~]# /u01/app/grid/11.2.0/grid_home/perl/bin/perl -I/u01/app/grid/11.2.0/grid_home/perl/lib -I/u01/app/grid/11.2.0/grid_home/crs/install /u01/app/grid/11.2.0/grid_home/crs/install/roothas.pl                                                                                             /11.2.0/grid_home/crs/install/roothas.pl
Using configuration parameter file: /u01/app/grid/11.2.0/grid_home/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node dell successfully pinned.
Adding Clusterware entries to upstart

dell     2016/09/11 08:31:14     /u01/app/grid/11.2.0/grid_home/cdata/dell/backup_20160911_083114.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server





Step X - Copy oraclebinary on server , Unzip & Create responce file for oracle. (With Oracle user)

Click Here to see response file


Step XI -We are ready to install oracle in silent mode :)


(i) Hit the command to install oracle in silent mode

[oracle@dell database]$ ./runInstaller -silent -showProgress -ignoreSysPrereqs -ignorePrereq -responseFile /home/oracle/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 79776 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4026 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-09-11_09-22-20AM. Please wait ...[oracle@dell database]$ You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2016-09-11_09-22-20AM.log

Prepare in progress.
..................................................   9% Done.

Prepare successful.

Copy files in progress.
..................................................   14% Done.
..................................................   20% Done.
..................................................   26% Done.
..................................................   31% Done.
..................................................   36% Done.
..................................................   41% Done.
..................................................   46% Done.
..................................................   51% Done.
..................................................   56% Done.
..................................................   63% Done.
..................................................   68% Done.
..................................................   73% Done.
..................................................   78% Done.
..................................................   83% Done.
..............................
Copy files successful.

Link binaries in progress.
..........
Link binaries successful.

Setup files in progress.
..................................................   88% Done.
..................................................   94% Done.

Setup files successful.
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2016-09-11_09-22-20AM.log' for more details.

Execute Root Scripts in progress.

As a root user, execute the following script(s):
1. /u01/app/oracle/product/11.2.0/db_1/root.sh


..................................................   100% Done.

Execute Root Scripts successful.
Successfully Setup Software.




(ii) Run root.sh script

[root@dell ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh

Check /u01/app/oracle/product/11.2.0/db_1/install/root_dell.localdomain_2016-09-11_09-29-01.log for the output of root script

[root@dell ~]# cat /u01/app/oracle/product/11.2.0/db_1/install/root_dell.localdomain_2016-09-11_09-29-01.log

Performing root user operation for Oracle 11g

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME=  /u01/app/oracle/product/11.2.0/db_1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
Finished product-specific root actions.

Step XII -Create Listener in silent mode



(i) Create Listener via grid user

[grid@dell bin]$ pwd
/u01/app/grid/11.2.0/grid_home/bin

[grid@dell bin]$ ./netca -silent -responsefile /u01/app/grid/11.2.0/grid_home/assistants/netca/netca.rsp

Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /u01/app/grid/11.2.0/grid_home/assistants/netca/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0


(ii) Check Listner status

[grid@dell bin]$ ./lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 11-SEP-2016 09:57:36

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                11-SEP-2016 09:51:41
Uptime                    0 days 0 hr. 5 min. 54 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid/11.2.0/grid_home/network/admin/listener.ora
Listener Log File         /u01/app/grid/diag/tnslsnr/dell/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dell.localdomain)(PORT=1521)))
The listener supports no services
The command completed successfully


Step XIII -Create ASM Instance & Disk group



asmca -silent -configureASM \
-sysAsmPassword asm \
-asmsnmpPassword asm \
-diskGroupName PROD_DATA_01 \
-diskList '/dev/oracleasm/disks/ASM_DISK01','/dev/oracleasm/disks/ASM_DISK02' \
-redundancy NORMAL \
-au_size 1 \
-compatible.asm '11.2.0.4.0' \
-compatible.rdbms '11.2.0.4.0' \
-diskString '/dev/oracleasm/disks*'


ASM created and started successfully.

Disk Group PROD_DATA_01 created successfully.



[grid@dell bin]$ ps -ef | grep pmon

grid     27603     1  0 10:08 ?        00:00:00 asm_pmon_+ASM
grid     27839 26648  0 10:22 pts/1    00:00:00 grep pmon


GROUP_NUMBER NAME            ALLOCATION_UNIT_SIZE STATE           TYPE   Totalspace(GB) Freespace(GB) Pct_FREE_% OFFLINE_DISKS
------------ --------------- -------------------- --------------- ------ -------------- ------------- ---------- -------------
           1 PROD_DATA_01                 1048576 CONNECTED       NORMAL     11.9960938      7.984375 66.5581244             0


Step XIV - Create database on created diskgroup


dbca -silent \
-createDatabase \
-asmsnmpPassword asm \
-characterSet WE8MSWIN1252 \
-continueOnNonFatalErrors false \
-disableSecurityConfiguration ALL \
-diskGroupName PROD_DATA_01 \
-emConfiguration NONE \
-gdbName prod.local \
-listeners LISTENER \
-memoryPercentage 40 \
-recoveryAreaDestination PROD_DATA_01 \
-sid prod \
-SysPassword sys \
-SystemPassword sys \
-storageType ASM \
-sampleSchema true \
-templateName General_Purpose.dbc

Copying database files
1% complete
3% complete
10% complete
17% complete
24% complete
31% complete
35% complete
Creating and starting Oracle instance
37% complete
42% complete
47% complete
52% complete
53% complete
56% complete
58% complete
Registering database with Oracle Restart
64% complete
Completing Database Creation
68% complete
71% complete
75% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/prod/prod.log" for further details.


[oracle@dell bin]$ ps -ef | grep pmon
grid     27603     1  0 10:08 ?        00:00:00 asm_pmon_+ASM
oracle   29030     1  0 10:45 ?        00:00:00 ora_pmon_prod
oracle   29156 22688  0 10:46 pts/0    00:00:00 grep pmon


NAME            INSTANCE_NAME    HOST_NAME                           DATABASE_R LOG_MODE        LOGINS     OPEN_MODE       FLASHBACK_ON       STARTUP_TIME         VERSION
--------------- ---------------- ----------------------------------- ---------- --------------- ---------- --------------- ------------------ -------------------- ----------
PROD            prod             dell.localdomain                    PRIMARY    ARCHIVELOG      ALLOWED    READ WRITE      YES                2016:09:11 22:49:24  11.2.0.4.0



Step XV - Create 1 more disk group for FRA


SQL> CREATE DISKGROUP PROD_FRA01 EXTERNAL REDUNDANCY DISK '/dev/oracleasm/disks/ASM_FRA01';

Diskgroup created.


SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +PROD_DATA_01
db_recovery_file_dest_size           big integer 4182M
recovery_parallelism                 integer     0

SQL> alter system set db_recovery_file_dest='+PROD_FRA01';

System altered.

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +PROD_FRA01
db_recovery_file_dest_size           big integer 4182M
recovery_parallelism                 integer     0




Happy To Share, Happy Learning :)

Pradeep Kumar
+919972201100

5 comments:

  1. That very clear and nice document. It's very helpful.

    will you please share manual rac installation....

    ReplyDelete
    Replies
    1. Thanks Rupesh,

      Yeah Sure, I will provide you the steps and will send you e-mail notification for RAC Configuration.

      Delete
  2. Hey Pradeep,

    Nice Docs!! In addition can u provide Cloning and Standby docs??

    ReplyDelete
    Replies
    1. Hi Vishwanath B,

      Below is the link of configure Duplicate Active Standby link

      https://oraerrors.blogspot.in/2016/10/creating-physical-standby-with-rman.html

      Delete
  3. This looks to be an excellent document bro :) Can you send me the RAC configuration as well please? valiantvimal@gmail.com

    Cheers

    ReplyDelete