STEP 1: Create VM
Start Virtual Box -> Machine New: Expert Mode
STEP 2: Name and Operating System
Name : restart01
Folder : F:\Users\oracle\VirtualBox VMs
IDO Image : rhel-server-7.6-x86_64-dvd.iso
Type : Linux
Version : Red Hat (64-bit)
Skip Unattened Installation: Select checkbox
STEP 3: Unattended Install
Ignore
STEP 4: Hardware
Base Memory: 32768 MB
Processors : 8
STEP 5: Hard Disk
Hard Disk File Location and Size :
F:\Users\oracle\VirtualBox VMs\restart01\restart01.vdi
200 GB
Hard Disk File Type and Variant : VDI (VirtualBox Disk Image)
Pre-allocate Full Size: leave unchecked
STEP 6: Finish Creation
Click Finish
STEP 7: Amend restart01 VM settings
select ‘restart01’ -> Settings
STEP 8: Select General
Advanced Tab
Shared Clipboard: Bidirectional
Drag’n’Drop: Bidirectional
STEP 9: Select System
Boot Order: Unselect Floppy
STEP 10: Select Network
Adaptor 1: Internet Access
Enable Network Adaptor
Attached to: Bridged Adaptor
Name: Inter(R) wireless-AC 9260
Adaptor 2: Public Network
Enable Network Adaptor
Attached to: Internal Network
Name: intnet
STEP 11: Select Shared Folders
click (+) Folder icon
Folder Path : <path to s/w for oracle standalone>
Folder Name: STAGING
Mount Point: leave blank
Read-only: leave unchecked
Auto-Mount : Yes
STEP 12: Start VM
select ‘restart01’ -> Start
STEP 13: Boot Selection
use arrow keys to select:
‘Install Red Hat Enterprise Linux 7.6’
press Enter
(note Press right ctrl to leave VM window back to host PC)
STEP 14: WELCOME TO RED HAT ENTERPRISE LINUX 7.6 Screen
Select:
English -> English (United Kingdom) -> Continue
STEP 15: INSTALLATION SUMMARY Screen: LOCALIZATION
DATE & TIME: Europe/London timezone
LANGUAGE SUPPORT: English (United Kingdom)
INSTALLATION SOURCE: Local media
KEYBOARD: English (UK)
STEP 16: INSTALLATION SUMMARY Screen: SOFTWARE
INSTALLATION MEDIA: Local media
SOFTWARE SELECTION:
Server with GUI:
Hardware Monitoring Utilities
KDE
Large Systems Performance
Performance Tools
Compatibility Libraries
Development Tools
System Administration Tools (may not be there)
STEP 17: INSTALLATION SUMMARY Screen: SYSTEM
INSTALLATION DESTINATION:
Other Storage Options-> Partitioning
I will configure partitioning -> Done
You have created any mount points for RH:
click here to create them automatically
Use below values: Select partition amend value-> Modify
/home 20 GiB
swap 20 GiB
/boot 1024 MiB
/ 150 GiB
Done-> Accept Changes
STEP 18: INSTALLATION SUMMARY Screen:
SYSTEM KDUMP
Enable Kdump: uncheck
STEP 19: INSTALLATION SUMMARY Screen:
SYSTEM NETWORK & HOST NAME : use 255.255.0.0 for netmask
enp0s3 : Wifi
-> configure ->
– General: Automatically Connect to this network when its is available
All users may connect to this network
-> Save
enp0s8 : public
– General: Automatically Connect to this network when its is available
All users may connect to this network
– IPv6 Settings : Method Ignore
– IPv4 Settings :
Method : Manual
Address: 192.168.56.101, 255.255.255.0, 0.0.0.0
– Save
set all network cards to ‘ON’ after configuration
Hostname: restart01.localdomain -> Apply
STEP 20: INSTALLATION SUMMARY Screen:
SYSTEM SECURITY POLICY
Apply security polcy: OFF
STEP 21: Install
Click Begin Installation
STEP 22: CONFIGURATION USER SETTINGS
ROOT PASSWORD:
Root Password: oracle
STEP 23: Reboot
Click ‘Reboot’
STEP 24: INITIAL SETUP LICENSING
License Information: I accept the license agreement -> Done
STEP 25: INITIAL SETUP Subscription Manager
Subscription Manager -> next -> <username>/<password> -> Register -> Attach -> Done
STEP 26: Finish Configuration
Click ‘Finish Configuration’
STEP 27: Welcome Screen
STEP 28: About You Screen
Full Name: guest ,
Username:guest
-> Next -> Password: Or4cl3?2023 -> next -> start using RH7
click ‘Start Using Red Hat Enterprose Linux Server’
STEP 29: Install Guest Additions
Log out as guest: Power button Icon-> guest-> Log Out-> Log Out
click ‘Not listed?’
log in as root:
Userame :root
Password: oracle
Welcome -> English/United Kingdom -> Next -> Location Services: OFF -> Next
-> Next -> Skip
Install Guest Additions
Devices -> Insert Guest Addition CD image -> Run -> Return
Devices -> Shared Clipboard -> Bidirectional
Devices -> Drag and Drop -> Bidirectional
right click CD -> eject
STEP 30: Move Terminal App to desktop
Applications -> Drag Terminal to desktop
STEP 31: Disable Screen Saver
click top right -> spanners
Power: blank screen never
Privacy: Screen Lock: Off
STEP 32: reboot VM and log back in as root
Power Icon -> Power Icon ->Restart
STEP 33: Start Terminal as root
set -o vi
STEP 34: create dir to hold scripts/config
mkdir /root/ORACLE_CONFIG
cd /root/ORACLE_CONFIG
STEP 35: update o/s kernel settings: sysctl.conf
vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
type: /sbin/sysctl -p
STEP 36: update oracle ulimits
vi /etc/security/limits.d/oracle-rdbms-server-19c-preinstall.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
grid soft nofile 1024
grid hard nofile 65536
grid soft nproc 16384
grid hard nproc 16384
grid soft stack 10240
grid hard stack 32768
grid hard memlock 134217728
grid soft memlock 134217728
STEP 37: Enable optional rpm installs
subscription-manager repos --enable rhel-7-server-optional-rpms
STEP 37: Install rpms
vi /var/tmp/req-rpm.txt
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
libXmu
libXt
libXv
libXxf86dga
libdmx
libXxf86misc
libXxf86vm
xorg-x11-utils
xorg-x11-xauth
nfs-utils
smartmontools
yum install `awk '{print $1}' /var/tmp/req-rpm.txt` -y
STEP 39: add user and groups: oracle
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
groupadd -g 54330 racdba
STEP 40: add user oracle user
useradd -u 54321 -g oinstall -G dba,oper,asmdba,asmadmin,racdba,vboxsf oracle
passwd oracle
STEP 41: add user grid
useradd -u 54322 -g oinstall -G dba,asmadmin,asmdba,asmoper,racdba,vboxsf grid
passwd grid
STEP 42 :update local network resolution as root
vi /etc/hosts
192.168.56.111 restart01.localdomain restart01
STEP 43: update network name server resolution as root
cp /etc/resolv.conf /etc/resolv.conf.bak
vi /etc/resolv.conf
nameserver 192.168.0.4
nameserver 194.168.4.100
nameserver 194.168.8.100
search localdomain
chattr +i /etc/resolv.conf
STEP 44: Relax Linux security Permissions
vi /etc/selinux/config
SELINUX=disabled
remove: SELINUXTYPE=targeted
rm /etc/selinux/targeted/policy/policy.31
semodule -B
#if issue booting, press e , add selinux=0 to -> cntrl x end of line with Linux in it
yum reinstall selinux-policy-targeted -y
STEP 45: Disable Firewall
systemctl stop firewalld
systemctl disable firewalld
STEP 46: Stop ntpd
systemctl stop ntpd
systemctl disable ntpd
#configured so the Oracle Cluster Time Synchronization Service (ctssd)
STEP 47: Create s/w dir for grid install
mkdir -p /u01/app/19.3.0/grid
chown -R grid:oinstall /u01/app/19.3.0/grid
chmod -R 775 /u01/app/19.3.0/grid
STEP 48: install cvuqdisk-1.0.10-1.rpm
see : Installing the cvuqdisk RPM for Linux (oracle.com)
CVUQDISK_GRP=oinstall;
export CVUQDISK_GRP
rpm -iv cvuqdisk-1.0.10-1.rpm
STEP 49: Stop and Disable Avahi Daemon
systemctl status avahi-daemon
systemctl stop avahi-daemon
systemctl disable avahi-daemon
STEP 50: Edit Network Config
vi /etc/sysconfig/network
NOZEROCONF=yes
STEP 51: Run cluster verify utility
# as root user
mkdir -p /u01/SOFTWARE
chown grid:oinstall /u01/SOFTWARE
chmod 775 /u01/SOFTWARE
# as grid user
cd /u01/SOFTWARE
cp <location> .
unzip -d cvupack_Linux_x86_64 cvupack_Linux_x86_64.zip
cd /u01/SOFTWARE/cvupack_Linux_x86_64/bin
./cluvfy stage -pre crsinst -n `hostname`
Ignore below issue: Failures were encountered during execution of CVU verification request “stage -pre crsinst”.
Verifying resolv.conf Integrity …FAILED rac01-c: Check for integrity of file “/etc/resolv.conf” failed
Verifying /dev/shm mounted as temporary file system …FAILED rac01-c: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm
STEP 52: Update Transparent pages
grep PageTables /proc/meminfo
grep Huge /proc/meminfo
vi /etc/sysctl.conf
vm.nr_hugepages = 2388
sysctl -p
grep Huge /proc/meminfo
STEP 53: Update user limits
vi /etc/security/limits.conf
* soft memlock 8192000
* hard memlock 8192000
#hugepages * Hugepage_size setting= 4000 * 2048 = 8192000
STEP 54: Disable transparent huge pages
cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never <<—- THP is enabled
cp /usr/lib/tuned/throughput-performance/tuned.conf /usr/lib/tuned/throughput-performance/tuned.conf.bkp_original
vi /usr/lib/tuned/throughput-performance/tuned.conf
[vm]
transparent_hugepages=never
reboot now
Disable it on active tuned profile
tuned-adm active
cp /usr/lib/tuned/virtual-guest/tuned.conf /usr/lib/tuned/virtual-guest/tuned.conf.bkp_original
vi /usr/lib/tuned/virtual-guest/tuned.conf
[vm]
transparent_hugepages=never
reboot now
cat /sys/kernel/mm/transparent_hugepage/enabled
grep Huge /proc/meminfo
shutdown -h now
Step 56: Create Disk LUNs for VM ASM Storage
type CMD to open DOS prompt: (update file locations as needed)
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\data_01.vdi" --size 20480 --format VDI --variant Fixed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\data_02.vdi" --size 20480 --format VDI --variant Fixed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\fra_01.vdi" --size 10240 --format VDI --variant Fixed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\fra_02.vdi" --size 10240 --format VDI --variant Fixed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\redo_01.vdi" --size 5120 --format VDI --variant Fixed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\redo_02.vdi" --size 5120 --format VDI --variant Fixed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename "F:\VirtualBox_VMs\New group\restart01\acfs_01.vdi" --size 10240 --format VDI --variant Fixed
Attach the disks to the VM (note VM must be down for this or it will error) amending file names if changed
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 1 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\data_01.vdi" --mtype normal
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 2 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\data_02.vdi" --mtype normal
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 3 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\fra_01.vdi" --mtype normal
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 4 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\fra_02.vdi" --mtype normal
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 5 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\redo_01.vdi" --mtype normal
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 6 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\redo_02.vdi" --mtype normal
"c:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach restart01 --storagectl "SATA" --port 7 --device 0 --type hdd --medium "F:\VirtualBox_VMs\New group\restart01\acfs_01.vdi" --mtype normal
Start VM resaret01 again now before next step also if you look under Storage in Virtualbox for restart01 you will see all the attached disks now.
STEP 58: startup VM and format disk partitions
as root user
cd /dev
ls sd*|grep -v [12]|grep -v a
for each disk partition sdb to sdh (not sdba) run below command example below starting with sdb
fdisk /dev/sdb
In each case, the sequence of answers is “n”, “p”, “1”, “Return”, “Return” and “w”.
ls sd*|grep -v 1|grep -v a
vi /etc/scsi_id.config
options=-g
cd /root/ORACLE_CONFIG
vi disk.lst
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
/dev/sdf
/dev/sdg
/dev/sdh
for disk in `cat disk.lst`; do echo ${disk}; /usr/lib/udev/scsi_id -g -u -d ${disk}; done
cat /proc/partitions
output like below we need to update /etc/udev/rules.d/99-oracle-asmdevices.rules with this information
/dev/sdb
1ATA_VBOX_HARDDISK_VBd2703de3-a0952d2c
/dev/sdc
1ATA_VBOX_HARDDISK_VBb45928b9-e8fddc57
/dev/sdd
1ATA_VBOX_HARDDISK_VBd08455cf-88b6ea6a
/dev/sde
1ATA_VBOX_HARDDISK_VB3384a50b-2a633b66
/dev/sdf
1ATA_VBOX_HARDDISK_VB25fde9b3-13c8dd68
/dev/sdg
1ATA_VBOX_HARDDISK_VBc53fab7b-0d6a35e9
/dev/sdh
1ATA_VBOX_HARDDISK_VB5b63fa36-3a6437cf
STEP 59: update: “/etc/udev/rules.d/99-oracle-asmdevices.rules”
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
example below of updates, All parameters for a single entry must be on the same line.
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VBd2703de3-a0952d2c”, SYMLINK+=”oracleasm/asm-disk01″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VBb45928b9-e8fddc57″, SYMLINK+=”oracleasm/asm-disk02″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VBd08455cf-88b6ea6a”, SYMLINK+=”oracleasm/asm-disk03″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VB3384a50b-2a633b66″, SYMLINK+=”oracleasm/asm-disk04″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VB25fde9b3-13c8dd68″, SYMLINK+=”oracleasm/asm-redo01″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VBc53fab7b-0d6a35e9″, SYMLINK+=”oracleasm/asm-redo02″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
KERNEL==”sd?1″, SUBSYSTEM==”block”, PROGRAM==”/usr/lib/udev/scsi_id -g -u -d /dev/$parent”, RESULT==”1ATA_VBOX_HARDDISK_VB5b63fa36-3a6437cf”, SYMLINK+=”oracleasm/asm-acfs01″, OWNER=”grid”, GROUP=”dba”, MODE=”0660″
STEP 60: Load updated block device partition tables
/sbin/partprobe /dev/sdb1
/sbin/partprobe /dev/sdc1
/sbin/partprobe /dev/sdd1
/sbin/partprobe /dev/sde1
/sbin/partprobe /dev/sdf1
/sbin/partprobe /dev/sdg1
/sbin/partprobe /dev/sdh1
STEP 60: Test the rules are working as expected
/sbin/udevadm test /block/sdb/sdb1
/sbin/udevadm test /block/sdc/sdc1
/sbin/udevadm test /block/sdd/sdd1
/sbin/udevadm test /block/sde/sde1
/sbin/udevadm test /block/sdf/sdf1
/sbin/udevadm test /block/sdg/sdg1
/sbin/udevadm test /block/sdh/sdh1
STEP 61: Reload Disk Rules
/sbin/udevadm control --reload-rules
ls -al /dev/oracleasm/*
STEP 62: Copy Grid s/w to VM
log on to restart01 as oracle from GUI needs to be a new login not a su
grid/oracle
#login as root
su -
mkdir -p /u01/app/19.3.0/grid
chown grid:oinstall /u01/app/19.3.0/grid
chmod 755 /u01/app/19.3.0/grid
mkdir /u01/app/grid
chown grid:oinstall /u01/app/grid
chmod 755 /u01/app/grid
mkdir /u01/app/oraInventory
chown grid:oinstall /u01/app/oraInventory
chmod 755 /u01/app/oraInventory
exit
back as grid user
#back as grid user
cd /u01/app/19.3.0/grid
cp <path to s/w>/LINUX.X64_193000_grid_home.zip /u01/app/19.3.0/grid
ls
unzip LINUX.X64_193000_grid_home.zip
rm LINUX.X64_193000_grid_home.zip
STEP 63:Install GI
./gridSetup.sh
Configuration Option: Configure Oracle Grid Infrastructure for a Standalone Server (Oracle Restart)
Create ASM Disk Group:
Disk rgoup name: DATA
Redundancy: External
Allocation Unit Size: 4Mb
Select Disks: /dev/sdb1, /dev/sdc1 (20479MB disks)
Configure Oracle ASM Filter Driver: Select this option
ASM Password:
Use same passwords for these accounts:
specify Password: oracle
Confirm you are ok with using ‘oracle’ as a password
Management Options:
Leave unchecked
Operating System Groups:
Oracle ASM Administrator (OSASM) Group: asmadmin
Oracle ASM DBA (OSDBA for ASM) Group : asmdba
Oracle ASM Operator (OSOPER for ASM) Group: amsoper
Installation Location:
Oracle Base : /u01/app/grid
Create Inventory:
Inventory Directory: /u01/app/oraInventory
Root script execution:
Select: Automatically run configuration scripts
Use “root” user credential
Password: oracle
Prerequisite Checks: review any failures and run fixit scripts if needed
Summary: Save Response File
Click Install
Note you will be prompted to acknowledge running of root scripts even though you don’t need to provide a password
STEP 65: Add DG for FRA
. oraenv <<< +ASM
asmca
Disk Groups-> right click-> Create…
Disk Group Name: FRA
Redundancy: External (None)
Allocation Unit Size: 4Mb
Select Disks: /dev/sdd1, /dev/sde1 (10239MB disks)
click OK
STEP 65: Add DG for Redo using SQL
. oraenv <<< +ASM
sqlplus / as sysasm
col path for a30
set lines 220
select HEADER_STATUS, OS_MB, NAME, PATH from v$asm_disk
where HEADER_STATUS='CANDIDATE'
order by PATH;
!asmcmd afd_label REDO1 /dev/sdf1
!asmcmd afd_label REDO1 /dev/sdg1
select HEADER_STATUS, OS_MB, NAME, PATH from v$asm_disk
where HEADER_STATUS='PROVISIONED'
order by PATH;
CREATE DISKGROUP REDO EXTERNAL REDUNDANCY DISK 'AFD:REDO1' SIZE 5119M
DISK 'AFD:REDO2' SIZE 5119M
ATTRIBUTE 'compatible.asm'='19.0.0.0','compatible.advm'='19.0.0.0','au_size'='4M';
select HEADER_STATUS, OS_MB, NAME, PATH from v$asm_disk
where HEADER_STATUS='MEMBER'
order by PATH;
-- DG will auto mount
select group_number, name, free_mb, total_mb from v$asm_diskgroup order by 1;