In my previous post I installed Oracle ASM Grid Infrastructure V19 into a VM, and now I've decided to install V12 and do an upgrade to V19, because I have one coming up.
Once again I used OEL7, this ISO: OracleLinux-R7-U9-Server-x86_64-dvd.iso
When installing it into a VM (I use Proxmox, VirtualBox will work), select Server with GUI and make it at least 10GB RAM, 4 CPUs (2 cores, 2 Sockets) and 100GB or more of Disk.
When installed, do a yum update, then shut it down and edit it to add another disk (40GB is fine). The disk won't show up initially but will be added to ASM.
The 12C downloads aren't available on the main Oracle download page any more, so you need to go to edelivery.oracle.com and search for them there. You need to search for Oracle Database Grid Infrastructure and Database 12C.
Once these have been downloaded, move them to /tmp.
Do another yum update, then install (as root), the pre-install packages:
Open a terminal and install the required packages for the database and ASM:
sudo yum -y install oracle-database-server-12cr2-preinstall
sudo yum -y install oracleasm-support oracleasm kmod-oracleasm wget
Change the host name to something meaningful:
vi /etc/hosts
192.168.1.120 oel7asm2 oel7asm2.localdomain
and
vi /etc/hostname
oel7asm1.localdomain
Reboot the VM.
As root, create the groups and users
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
useradd -u 54322 -g oinstall -G dba,asmdba,asmoper,asmadmin,racdba grid
Create the directories and assign ownership
mkdir -p /u01/app/grid/product/12.0.0/grid_home
mkdir -p /u01/app/oracle/product/12.2.0/dbhome_1
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01
chown -R grid:oinstall /u01/app/grid
chown -R grid:oinstall /u01/app/oraInventory
Allow the oracle user access to ASM
usermod -u 500 -g oinstall -G dba,oper,asmdba,asmoper,asmadmin,kmdba,dgdba,backupdba,racdba oracle
Set up asm - run this as root
oracleasm init
oracleasm configure -i
Enter 'grid'
Enter 'oinstall'
Enter 'y'
Enter 'y'
You can now use the disk you added and configure it with ASM:
fdisk -l
look for the 40GB disk you added:
fdisk /dev/sdb
Enter 'n' for a new partition, then enter at the next 3 prompts, then +30G to make the first partition 30GB.
Enter 'n' again and then enter for all the prompts to create the second partition with the rest of the space (10GB).
Finally, enter 'w' to create the partitions
Create the ASM disks
oracleasm createdisk DATA2 /dev/sdb1oracleasm createdisk FRA2 /dev/sdb2
Then scan and list the disks
You can now install the GI software.
Set the password for the grid and oracle users as the root user
passwd grid
passwd oracle
Login as the grid user and install the grid home from the zip file.
export ORACLE_HOME=/u01/app/grid/product/12.0.0/grid_home
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME
pwd
/u01/app/grid/product/12.0.0/grid_home
unzip -oq /tmp/V840012-01.zip
Once extracted, run the installer as the grid user
./gridSetup.sh
Select 'Configure...for Standalone Server'
Rename the Disk Group to DATA2, change the Redundancy to 'External' and check the box next to '/dev/oracleasm/disks/DATA2'
Select 'Use the same password' and enter a suitable one, then click 'Next'
Click 'Next' at the EM screen.
Change the Oracle Base to /u01/app/grid and click 'Next'
Click 'Next' at the Inventory Directory screen.
Select 'Automatically run scripts' and enter the root password.
Fix or ignore any checks and click 'Next'
Click 'Install'export ORACLE_HOME=/u01/app/grid/product/12.0.0/grid_homeexport PATH=$ORACLE_HOME/bin:$PATH
asmca
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1export PATH=$ORACLE_HOME/bin:$PATHcd $ORACLE_HOMEunzip -oq /tmp/V839960-1.zip
./runInstaller
dbca
Now you have a 12C database running on 12C GI ASM; time to upgrade to V19C ASM and then upgrade the database.
mkdir -p /u01/app/grid/product/19.3.0/grid_home
Copy the 19c Grid zip file there and extract it
echo $ORACLE_HOME
echo $ORACLE_BASE
echo $ORACLE_SID
cd /u01/app/grid/product/19.3.0/grid_home
./gridSetup.sh
NOTE: if CRS is running on the host, which it might be at a client site, you can run the upgrade in dry run mode which will simulate the upgrade and let you check for any issues:
./gridSetup.sh -dryRunForUpgrade
Click Next
Skip the Register with OEM screen (click Next)
Click 'Next' at the ORACLE_BASE screen
Check 'Automatically run config scripts' and enter the root password
Click Next
Ignore or fix any checks
Click next
Click Submit
Hopefully you'll see this
If you check /etc/oratab, it should have the new HOME
If you run asmca it will show V19C
The ASM database is now V19C
You might want to remove the oracle install and patch zip files to free up space.