<<Back to DB Administration Main Page
Installing Oracle 18c Grid Infrastructure for a Standalone Server in Silent Mode
The Installation of oracle database is little complicated as compare to other database systems therefore for better understanding I will divide the post in 3 sections
Section1: Preparing OS for Oracle GI Installation
Section2: Preparing Storage for Oracle DB Installation
Section3: Installing Oracle and Configuring Oracle grid Infrastructure for Standalone Environment
Section1: Preparing OS for Oracle GI Installation
Steps to Install OEL7 is provided in post Installing Oracle Enterprise Linux 7 for Oracle RAC Installation
Steps to Install OEL7 is provided in post Installing Oracle Enterprise Linux 7 for Oracle RAC Installation
- create required OS group and OS user
login as root and create following OS groups and user. This OS user will be the owner of oracle grid infrastructure binaries and ASM instance
#groupadd asmadmin
#groupadd oinstall
#useradd -g oinstall -G asmadmin oragrid
- Create required directories and assign the ownership to oragrid:oinstall
#chown -R oragrid:oinstall /u01/oragrid
#mkdir -p /u01/oragrid/18c/grid
#mkdir -p /u01/oragrid/18c/grid
#chmod -R 755 /u01/oragrid
- Modify Kernel Parameters
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
Run following command to bring the changes in effect
#/sbin/sysctl -p
- Configure limit for oragrid User
oragrid soft nofile 2048
oragrid hard nofile 65536
oragrid soft nproc 4096
oragrid hard nproc 16384
oragrid soft stack 10240
oragrid hard stack 32768
- Install OS Packages for Oracle
binutils
compat-libcap1
compat-libstdc++-33
gcc
gcc-c++
glibc
glibc-devel
ksh
libgcc
libstdc++
libstdc++-devel
libaio
libaio-devel
libXext
libXtst
libX11
libXau
libxcb
libXi
make
sysstat
unixODBC
unixODBC-devel
- Disable SELINUX
"SELINUX=disabled
- Disable Linux Firewall
# chkconfig iptables off
Section2: Preparing Storage for Oracle GI Installation
- Prepare the Disks for ASM
To Configure and provision the shared disks for use with Oracle ASM using oracleasmlib I have already prepared the disks partitions.
Refer Step11: Prepare ASM Disks for Shared Storage from post Step by Step Oracle RAC 12c Release 2 (12c R2) installation on Oracle VirtualBox with OEL7 in case you want the steps to partition a disk. I am using disk partitions xvdc[11-15] in this example
Refer Step11: Prepare ASM Disks for Shared Storage from post Step by Step Oracle RAC 12c Release 2 (12c R2) installation on Oracle VirtualBox with OEL7 in case you want the steps to partition a disk. I am using disk partitions xvdc[11-15] in this example
In this post I will prepare the disks using asmlib packages. You can also use AFD if it is supported on your OS.
- Download oracleASMLib packages
You can download the packages from here for RHEL7
- copy the packages on the server
copy both the packages on the server using scp or winscp
oracleasmlib-2.0.12-1.el7.x86_64.rpm
oracleasm-support-2.1.11-2.el7.x86_64.rpm
oracleasm-support-2.1.11-2.el7.x86_64.rpm
- Install the oracleasmlib packages
login as root user
$sudo su - root
# rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:oracleasmlib-2.0.12-1.el7 ################################# [100%]
# rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:oracleasm-support-2.1.11-2.el7 ################################# [100%]
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/oracleasm.service to /usr/lib/systemd/system/oracleasm.service
Preparing... ################################# [100%]
Updating / installing...
1:oracleasmlib-2.0.12-1.el7 ################################# [100%]
# rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:oracleasm-support-2.1.11-2.el7 ################################# [100%]
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/oracleasm.service to /usr/lib/systemd/system/oracleasm.service
- Configure oracleasm
# oracleasm configure -i
Configuring the Oracle ASM library driver.
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.
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 []: oragrid
Default group to own the driver interface []: oinstall
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
Default group to own the driver interface []: oinstall
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
- load oracleasm module
# 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
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
- Verify oracleasmlib configuration
# df -ha |grep -i oracleasm
oracleasmfs 0 0 0 - /dev/oracleasm
# lsmod | grep oracleasm
oracleasm 61440 1
oracleasmfs 0 0 0 - /dev/oracleasm
# lsmod | grep oracleasm
oracleasm 61440 1
- Create the disk for ASM diskgroup
# oracleasm createdisk DATA1 /dev/xvdc11
Writing disk header: done
Instantiating disk: done
# oracleasm createdisk DATA2 /dev/xvdc12
Writing disk header: done
Instantiating disk: done
Writing disk header: done
Instantiating disk: done
# oracleasm createdisk DATA2 /dev/xvdc12
Writing disk header: done
Instantiating disk: done
Section3: Installing Oracle and Configuring Oracle grid Infrastructure for Standalone Environment
- Download GI Binary
Download oracle database clusterware binaries from here.
- Transfer the GI Software
Transfer the binaries to the server where you want to install it, using winscp or tool you prefer
- Unzip the GI Software in GRID_HOME
unzip the file LINUX.X64_180000_grid_home.zip in GRID_HOME, you need minimum 20G space to complete the installation.
$unzip /u01/oragrid/18c/grid/LINUX.X64_180000_grid_home.zip
- Perform Installation PreCheck
Login as grid user and run runcluvfy.sh to perform the pre installation check.
$/u01/oragrid/18c/grid/runcluvfy.sh stage -pre hacfg
==================================================================
Verifying Physical Memory ...FAILED (PRVF-7530) <==Minimum 8GB required
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...FAILED (PRVF-7573) <==Minimum 8GB required
Verifying Free Space: test:/usr,test:/var,test:/etc,test:/sbin,test:/tmp ...PASSED
Verifying User Existence: oragrid ...
Verifying Users With Same UID: 1001 ...PASSED
Verifying User Existence: oragrid ...PASSED
Verifying Group Existence: dba ...FAILED (PRVG-10461) <== I am not using default dba group
Verifying Group Membership: dba ...FAILED (PRVG-10460)<== I am not using default dba group
Verifying Run Level ...PASSED
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: semmsl ...PASSED
Verifying OS Kernel Parameter: semmns ...PASSED
Verifying OS Kernel Parameter: semopm ...PASSED
Verifying OS Kernel Parameter: semmni ...PASSED
Verifying OS Kernel Parameter: shmmax ...PASSED
Verifying OS Kernel Parameter: shmmni ...PASSED
Verifying OS Kernel Parameter: shmall ...PASSED
Verifying OS Kernel Parameter: file-max ...PASSED
Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
Verifying OS Kernel Parameter: rmem_default ...PASSED
Verifying OS Kernel Parameter: rmem_max ...PASSED
Verifying OS Kernel Parameter: wmem_default ...PASSED
Verifying OS Kernel Parameter: wmem_max ...PASSED
Verifying OS Kernel Parameter: aio-max-nr ...PASSED
Verifying OS Kernel Parameter: panic_on_oops ...PASSED
Verifying Package: binutils-2.23.52.0.1 ...PASSED
Verifying Package: compat-libcap1-1.10 ...PASSED
Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
Verifying Package: sysstat-10.1.5 ...PASSED
Verifying Package: ksh ...PASSED
Verifying Package: make-3.82 ...PASSED
Verifying Package: glibc-2.17 (x86_64) ...PASSED
Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
Verifying Package: nfs-utils-1.2.3-15 ...PASSED
Verifying Package: smartmontools-6.2-4 ...PASSED
Verifying Package: net-tools-2.0-0.17 ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...PASSED
Verifying Swap Size ...FAILED (PRVF-7573) <==Minimum 8GB required
Verifying Free Space: test:/usr,test:/var,test:/etc,test:/sbin,test:/tmp ...PASSED
Verifying User Existence: oragrid ...
Verifying Users With Same UID: 1001 ...PASSED
Verifying User Existence: oragrid ...PASSED
Verifying Group Existence: dba ...FAILED (PRVG-10461) <== I am not using default dba group
Verifying Group Membership: dba ...FAILED (PRVG-10460)<== I am not using default dba group
Verifying Run Level ...PASSED
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: semmsl ...PASSED
Verifying OS Kernel Parameter: semmns ...PASSED
Verifying OS Kernel Parameter: semopm ...PASSED
Verifying OS Kernel Parameter: semmni ...PASSED
Verifying OS Kernel Parameter: shmmax ...PASSED
Verifying OS Kernel Parameter: shmmni ...PASSED
Verifying OS Kernel Parameter: shmall ...PASSED
Verifying OS Kernel Parameter: file-max ...PASSED
Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
Verifying OS Kernel Parameter: rmem_default ...PASSED
Verifying OS Kernel Parameter: rmem_max ...PASSED
Verifying OS Kernel Parameter: wmem_default ...PASSED
Verifying OS Kernel Parameter: wmem_max ...PASSED
Verifying OS Kernel Parameter: aio-max-nr ...PASSED
Verifying OS Kernel Parameter: panic_on_oops ...PASSED
Verifying Package: binutils-2.23.52.0.1 ...PASSED
Verifying Package: compat-libcap1-1.10 ...PASSED
Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
Verifying Package: sysstat-10.1.5 ...PASSED
Verifying Package: ksh ...PASSED
Verifying Package: make-3.82 ...PASSED
Verifying Package: glibc-2.17 (x86_64) ...PASSED
Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
Verifying Package: nfs-utils-1.2.3-15 ...PASSED
Verifying Package: smartmontools-6.2-4 ...PASSED
Verifying Package: net-tools-2.0-0.17 ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...PASSED
Pre-check for Oracle Restart configuration was unsuccessful.
Failures were encountered during execution of CVU verification request "stage -pre hacfg".
Verifying Physical Memory ...FAILED
test: PRVF-7530 : Sufficient physical memory is not available on node
"test" [Required physical memory = 8GB (8388608.0KB)]
test: PRVF-7530 : Sufficient physical memory is not available on node
"test" [Required physical memory = 8GB (8388608.0KB)]
Verifying Swap Size ...FAILED
test: PRVF-7573 : Sufficient swap size is not available on node "test"
[Required = 7.0505GB (7392968.0KB) ; Found = 4GB (4194300.0KB)]
test: PRVF-7573 : Sufficient swap size is not available on node "test"
[Required = 7.0505GB (7392968.0KB) ; Found = 4GB (4194300.0KB)]
Verifying Group Existence: dba ...FAILED
test: PRVG-10461 : Group "dba" selected for privileges "OSDBA" does not
exist on node "test".
test: PRVG-10461 : Group "dba" selected for privileges "OSDBA" does not
exist on node "test".
Verifying Group Membership: dba ...FAILED
test: PRVG-10460 : User "oragrid" does not belong to group "dba" selected
for privileges "OSDBA" on node "test".
test: PRVG-10460 : User "oragrid" does not belong to group "dba" selected
for privileges "OSDBA" on node "test".
CVU operation performed: stage -pre hacfg
Date: Feb 12, 2019 1:12:26 PM
CVU home: /u01/oragrid/18c/grid/
User: oragrid
==================================================================
NOTE:-Although I can safely ignore the above known failures. It is recommended that you must verify and fix the failures reported by runcluvfy prechek before you proceed ahead
- Prepare Response File for Silent Installation
Oracle provides response file templates for each product and installation type, and for each configuration tool.
Edit the response file templates located in the
Grid_home
/install/response
directory. Change the following parameters according to your environment. Backup the responsefile before modifying it
$ cp /u01/oragrid/18c/grid/install/response/gridsetup.rsp /u01/oragrid/18c/grid/install/response/gridsetup.rsp.orig
INVENTORY_LOCATION=/u01/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/u01/oragrid/oraBase
oracle.install.asm.OSDBA=oinstall
oracle.install.asm.OSASM=asmadmin
oracle.install.asm.storageOption=ASM
oracle.install.asm.SYSASMPassword=******
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/*
oracle.install.asm.monitorPassword=*******
oracle.install.asm.configureAFD=false
oracle.install.option=HA_CONFIG
ORACLE_BASE=/u01/oragrid/oraBase
oracle.install.asm.OSDBA=oinstall
oracle.install.asm.OSASM=asmadmin
oracle.install.asm.storageOption=ASM
oracle.install.asm.SYSASMPassword=******
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/*
oracle.install.asm.monitorPassword=*******
oracle.install.asm.configureAFD=false
Caution:When you modify a response file template and save a file for use, the response file may contain plain text passwords. Ownership of the response file should be given to the Oracle software installation owner only, and permissions on the response file should be changed to 600.
NOTE:- The installer or configuration assistant fails if you do not correctly configure the response file. Also, ensure that your response file name has the
.rsp
suffix- Change response file permission
$ chmod 600 /u01/oragrid/18c/grid/install/response/gridsetup.rsp
- Perform the Installation in Silent Mode using response file
$ /u01/oragrid/18c/grid/gridSetup.sh -silent -ignorePrereqFailure -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...
Launching Oracle Grid Infrastructure Setup Wizard...
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/oragrid/18c/grid/install/response/grid_2019-02-13_03-00-44PM.rsp
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/oragrid/18c/grid/install/response/grid_2019-02-13_03-00-44PM.rsp
You can find the log of this install session at:
/u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log
/u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log
As a root user, execute the following script(s):
1. /u01/oragrid/18c/grid/root.sh
1. /u01/oragrid/18c/grid/root.sh
Execute /u01/oragrid/18c/grid/root.sh on the following nodes:
[test]
[test]
Successfully Setup Software with warning(s).As install user, execute the following command to complete the configuration.
/u01/oragrid/18c/grid/gridSetup.sh -executeConfigTools -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp [-silent]
/u01/oragrid/18c/grid/gridSetup.sh -executeConfigTools -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp [-silent]
- As root use execute root.sh
# /u01/oragrid/18c/grid/root.sh
Check /u01/oragrid/18c/grid/install/root_wdtest16_2019-02-13_15-02-14-091873818.log for the output of root script
Check /u01/oragrid/18c/grid/install/root_wdtest16_2019-02-13_15-02-14-091873818.log for the output of root script
- As Grid Owner execute ConfigTools script
$ /u01/oragrid/18c/grid/gridSetup.sh -executeConfigTools -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp -silent
Launching Oracle Grid Infrastructure Setup Wizard...
You can find the logs of this session at:
/u01/orainventory/logs/GridSetupActions2019-02-13_03-03-58PM
/u01/orainventory/logs/GridSetupActions2019-02-13_03-03-58PM
Successfully Configured Software.
- Verify the Installation
$ /u01/oragrid/18c/grid/bin/cluvfy stage -post hacfg
Verifying Oracle Restart Integrity ...PASSED
Verifying OLR Integrity ...PASSED
Verifying OLR Integrity ...PASSED
Post-check for Oracle Restart configuration was successful.
CVU operation performed: stage -post hacfg
Date: Feb 13, 2019 3:21:14 PM
CVU home: /u01/oragrid/18c/grid/
User: oragrid
Date: Feb 13, 2019 3:21:14 PM
CVU home: /u01/oragrid/18c/grid/
User: oragrid
$ crsctl check has
CRS-4638: Oracle High Availability Services is online
$ crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE test STABLE
ora.LISTENER.lsnr
ONLINE ONLINE test STABLE
ora.asm
ONLINE ONLINE test Started,STABLE
ora.ons
OFFLINE OFFLINE test STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE test STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE test STABLE
--------------------------------------------------------------------------------
CRS-4638: Oracle High Availability Services is online
$ crsctl status res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE test STABLE
ora.LISTENER.lsnr
ONLINE ONLINE test STABLE
ora.asm
ONLINE ONLINE test Started,STABLE
ora.ons
OFFLINE OFFLINE test STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE test STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE test STABLE
--------------------------------------------------------------------------------
$ asmcmd
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 512 4096 1048576 102400 102266 0 51133 0 N DATA/
ASMCMD> lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED NORMAL N 512 512 4096 1048576 102400 102266 0 51133 0 N DATA/
why are we not using AFD feature here
ReplyDeleteHi,
DeleteThe demonstration is based on ASMLib intentionally to provide the steps for ASMLib configuration, however you can of course choose AFD over ASMLib and enjoy its advantages.
To use AFD instead of ASMLib after unzipping the grid binaries set ORACLE_HOME and ORACLE_BASE and then initialize the disks using AFD as below
$ORACLE_HOME/bin/asmcmd afd_label DG_DATA /dev/xvdc11 --init
$ORACLE_HOME/bin/asmcmd afd_label DG_FRA /dev/xvdc12 --init
…………………
…………………
Hopes this answers your question.
Hi, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam feedback? If so how do you stop it, any plugin or anything you can recommend? I get so much lately it's driving me crazy so any support is very much appreciated. Sea cans for sale near me
ReplyDelete