Wednesday, 20 May 2020

Installing Oracle Linux 8.2 on Virtualbox

This posting is part of my Oracle Database Developer VM Project series. The resulting VM is intended to be an Oracle DB developer all-in-one VM. For different purposes, other settings might be more appropriate.

Most IT people won't need a guide to install Linux in a VM and skip this part. But if you are new to this, I will give a very detailed step-by-step guide. The settings I use are often my personal preferences. Though I work for Oracle, these settings are not always the officially Oracle recommended settings.

First download and install Oracle VM VirtualBox from https://www.virtualbox.org/wiki/Downloads. It is important to use Version 6.1.10 or newer, because the older ones don't have support for the OL 8.2, the guest additions won't compile according to the changelog. You will also need the Oracle Linux ISO image, which is available from https://www.oracle.com/linux/technologies/oracle-linux-downloads.html, following the link to 'Oracle Software Delivery Cloud'. This is NOT a guide on licensing, so please work through that information yourself.

Start Virtual Box.

Select Machine/New to start with a new VM.
Give it a name and choose Linux and Oracle (64-Bit)
Choose the amount of RAM you can afford
You will need a virtual hard disk
Go with the default VDI file type
As long as you don't have more storage than you need or this is very performance sensitive for you, Dynamically allocated should be fine.
Especially when you are using dynamically allocated, make it large even if you don't need it now. This is so much easier than grow your volume in the future in case you will need it. And it does not cost space on your device now.
Here you are, ready to go. But we need to adjust some settings first, so click on the Settings cog
Shared Clipboard works well for many versions, so I don't see any reason to not enable these (for GUI VM's of course).
We don't need the good old Floppy Disk. I always disable it, though it probably doesn't hurt either.
Give it the cores you have.
A little more Video Memory is usefull. I don't know, if we really need 64 MB. I had some problems in the past with only 16 MB. If you are short on memory, you might try out 32 MB. 
We really don't need audio, and I recently learned that VBox audio might interfere with a Zoom session in your host OS (thanks Sören). So better disable it.
Leave the default NAT adapter, but click on Adapter 2 to add another one.
I prefer to have an additional Host-only Adapter for easy networking between my host and guest.
The USB Controller also sometimes interferes with my host, so better switch it off.
A shared folder with your host can make your life much easier. I prefer to have it auto mounted in my users home directory.
The user interface often gets in my way, so I disable it. When I need the VBox menu, I switch from full screen to windowed and back.
Now virtually insert the Oracle Linux ISO image. Select the empty disk and Choose a disk file...
Locate the previously downloaded OL ISO image on your HDD and open it.
Your DVD controller should display the mounted ISO image like this. We are done here, click OK to close the settings.
Click Start to boot the VM and start the OL setup.
Install Oracle Linux 8.2.0
Even if you choose to change the keyboard layout on the next page (like I do), I recommend to leave the system in English.
In the installation summary, you can change the keyboard layout if you need.
I use a German keyboard.
Now for the important part, choose Installation Destination.
Select the ATA VBOX HARDDISK, which is your .vdi file. Then choose Storage Configuration / Custom.
Click on Click here to create them automatically, so you don't have to start from scratch.
OL comes up with a proposal, that could use some fine tuning. It prefers the xfs file system, which gave me some trouble in the past. Though it has some advantages when running OL on a real server, for a single user VM, ext4 is the easier one to handle. Also 50 GB is not so much for the root file system and swap also could get a little bigger. As /home has more than enough space, the sizes could be adjusted accordingly.
  So my changed layout is 100 GB for root, 16 GB for swap, leave boot untouched and give the rest to home with home and root formatted with ext4.
Click Done and Accept Changes.
Enough storyboarding, let's shoot something. Click Begin Installation.
While setup is running, let's care about the users. Set the root password to your like, then klick on User Creation.
We need at least one user for Oracle, typically named oracle. Give it a password and click on Advanced...
Leave the home directory, but add the groups dba and oinstall, then Save Changes.
Wait for the installer to complete, then click on Reboot.
If you want to use Oracle Linux, Oracle requires you to accept their license. Click on License Information.
Read this carefully. If you choose to accept the license agreement, continue with the next step.
We are almost done. Click on Finish Configuration to do some post installation stuff.
If you want system updates (I bet you do), register the system.
Not sure why we need to choose the input method again. But if you want something other than a US-keyboard then choose the one you want.
 Nah, we don't need Location Services in our VM ...
... neither do we need any online accounts.
Ready to go sounds good, click the large blue box to start.
Welcome to Oracle Linux 8.2 with the new Redwood Design background. Lovely, isn't it? So much for the basic installation steps.

Next -> Oracle Linux 8.2 on VirtualBox - basic usability settings