Check out other posts of this Series:
I am glad to see that I have received some interesting comments on the introductory post of this series.
It seems we might be getting some support from other authors/bloggers throughout this Series.
You will also need to download a virtualization software. In this case we will be making use of Oracle VM VirtualBox.
I have downloaded all the software and staged onto a shared location that will be accessible from within the Virtual Machines:
The following is the list of software needed to build the Study Lab apart from Oracle VM VirtualBox:
List of Software Staged on Disk |
Oracle VM VirtualBox Virtual Machine Creation
Oracle VM VirtualBox ocmdb12c Properties |
The initial idea was not to detail the Virtual Machine creation as there are plenty of great materials on the internet. However, for being thorough, I the next steps will detail both the creation of the Virtual Machine as well as the Oracle Linux 6.5 installation.
Select a size for the first Virtual Hard Disk. Since this will be the disk where the OS and all binaries will be located, I recommend a minimum of 30GB.
Also, it is important to have some extra free space as we move will stage some installation software onto disk during both Grid Infrastructure and Database installation.
Once you click Create, the virtual machine will be created and added to the list of Virtual Machines.
Virtual Machine Settings
So right-click on the newly created Virtual Machine to bring up all the properties:
This will bring a new window which will allow us to tailor the Virtual Machine to our needs.
You can optionally set Shared Clipboard to bidirectional so copying and pasting between host and VM becomes easier
Then, move to storage as most of the changes will be made here:
Storage Configuration
We can see that we already have one hard disk which was added during the VM creation. We will now add two extra Virtual Disks that will serve as a Oracle ASM disks.
Highlight the SATA controler and click on the Add hard disk push button that is displayed on the right side when you highlight the Sata controler.
The first disk we will add will be the Oracle ASM disk for the +DATA Disk Group.
Adding Additional Disks
Step 1
Step 2
Click on Create new Disk.
Step 3
For the ASM disks, I have selected Fixed Size:
Step 4
For better performance, my suggestion is that you place the ASM disks on a different hard drive that is attached to the host computer.
For instance, I am creating a new Virtual Disk and placing it on an Lacie 3GB external hard drive that is connected to the host computer via USB3.
Add another disk that will serve as the Oracle ASM disk for the Fast Recovery Area Disk Group. To do this, just repeat steps from here Step 1 to Step 4.
We must know add a DVD image to the DVD drive so that we can boot from the DVD drive and start the Oracle Linux installation process:
Highlight the little CD entry under the IDE Controller where it says “Empty” and click on the CD icon located on the right panel under Attributes:
Locate the Oracle Linux 6.5 Installation image you have downloaded on the first post of this series.
Network Configuration
For the sake of simplicity, we will be creating one Network adaptor and setting it as Host-only Adapter. If you want your guest VM to have access to the internet, you can either choose NAT or Bridged.
Shared Folders
As for the extra software that we will need to install on this VM, I have mounted a shared folder using the Oracle VM Virtualbox:
When adding a Shared Folder, choose Auto-mount.
So, once you have added the VirtalBox Guest Additions to your VM, you will be able to access this shared folders under the /media mount point. I find that doing this makes my life a lot easier as all the Oracle Software we downloaded is staged in a sub-folder located under the shared folder.
Oracle Linux Release 6.5 Installation
As for the Oracle Linux Release 6.5 64 bit installation, I recommend following the following Installation Guide.
I also find Tim Hall's post on Oracle Linux 6 Installation very useful.
I will guide you through the a basic installation in this post.
Starting the Oracle VM
In the previous step, we have added an Oracle Linux 6.5 DVD image to the virtual DVD drive.
We can now start the VM so that it will boot from the DVD drive.
Highlight the VM and click on Start:
Select Install or Upgrade an Existing System
You may choose to test the media. I am skipping this test.
Click Next
Select the Language you want to use for the installation process and click Next.
Choose discard any data.
Enter a hostname for your new virtual server. I have named the server ocmdb12c and added my laptop model as a domain – xps15z.com.
Whilst on this step, click on Configure Network.
Choose the only Network Adapter available, in this case eth0. There could be more network adapters if you had added more NICs when setting up the Virtual Machine.
Once you have highlighted the network adapter, click on edit.
Check the Connect automatically option and set a manual IP address under the IPv4 tab.
Select Method Manual and click on Add to add a fixed IP address.
Type in an IP address and the Netmask.
Since my virtual machine won’t have access to the external world – only to other VMs in the same subnet, I am entering neither the Gateway nor the DNS. For the VM-to-VM communication, the name resolution will happen through the /etc/hosts file for simplicity.
Click Apply. Once you click apply, you are directed back to the initial Network Configuration screen. Click on Close.
Choose your time zone. I am selecting Europe/London because I am a little attached to it.
Enter a root password and confirm it. You may receive a warning saying that your password is not strong enough. You may choose to ignore it since this is just a study lab.
Under Installation type, Select Use All Space and check the option Review and modify partitioning layout.
On the above screen, add only the first device, the one with 20GB or 30GB depending on what size you gave to this virtual disk.
To add, highlight it and click on the arrow pointing to the right, making sure that this Data Storage Device is also marked as having the bootloader installed.
On the above screenshots, I take 2048 Megabytes from the / mount point and give it to the /swap mount point.
Confirm the device where the boot loader will be installed then click Next.
Software Components
Select either Basic Server or Database Server. Make sure you leave both Oracle Linux Server and UEK3 kernel repo selected under the “additional repositories”.
Select Customize now and click Next.
On the following screenshots, I will show you the options I selected for this specific installation. You may or may not select the same options.
Base System
Servers
Web Services
Databases
System Management
Virtualization
Desktops
Applications
Installation Progress
Click on Reboot and wait for the VM to restart. it usually ejects the DVD image from the DVD drive automatically, if that is not the case, you can do it manually via menu Devices>Optical Drives>Remove Disk From Virtual Image.
Once the VM restarted, the Welcome screen appears, click Forward.
The License Agreement.
I have selected No thanks as we won’t need this for our Study Lab.
On the create user screen, I am creating my personal user and not the oracle user. We will let the oracle user to be created by the Oracle Validated RPM later.
Adjust both Time and Date accordingly.
As for the kernel crash dumping mechanism, I have left Kdump unchecked for the purpose of this Study Lab.
Click Next and the system will revert to the logon screen.
Double click on the user you created and enter the password you have typed in during the user setup.
From within the VM, click on System>About this Computer to display the System Monitor Summary Tab.
Once you have installed the Operating System, you can optionally add the Oracle VirtualBox Guest Additions as well mounting the disk ISO as a yum source repository following this guide.
Oracle Linux 6.5 System Monitor Window |
You can open a Terminal Window and run some simple commands as follows:
These are a few details of the VM I have just created:
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_ocmdb12c-lv_root 18G 3.7G 13G 23% / tmpfs 2.0G 80K 2.0G 1% /dev/shm /dev/sda1 477M 55M 397M 13% /boot $ ll /dev/sd* brw-rw----. 1 root disk 8, 0 Nov 25 00:05 /dev/sda brw-rw----. 1 root disk 8, 1 Nov 25 00:05 /dev/sda1 brw-rw----. 1 root disk 8, 2 Nov 25 00:05 /dev/sda2 brw-rw----. 1 root disk 8, 16 Nov 25 00:05 /dev/sdb brw-rw----. 1 root disk 8, 32 Nov 25 00:05 /dev/sdc
|
From the above output, we can see the extra devices – /dev/sdb and /dev/sdc - that we’ve added in previous steps. These will be configured as ASM Disks on subsequent post.
The /dev/sda device is located on my laptop local SSD disk and both /dev/sdb and /dev/sdc are located on an external Lacie hard-drive.
A glimpse of my network configuration:
$ ifconfig eth0 Link encap:Ethernet HWaddr 08:00:27:22:04:15 inet addr:192.168.0.56 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fe22:415/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:215 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:20092 (19.6 KiB) TX bytes:818 (818.0 b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:48 errors:0 dropped:0 overruns:0 frame:0 TX packets:48 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3740 (3.6 KiB) TX bytes:3740 (3.6 KiB)
|
Installing Oracle VM VirtualBox Guest Additions (Recommended)
On the Oracle Virtualbox window, click on Devices>Insert Guest Additions CD image. This will mount a CD image and popup an explorer window on the desktop:
We need to run a shell script located in this CD image named autorun.sh.
To do this, you will need to switch your user to the root user as follows:
cd /media ./VBoxLinuxAdditions.run Installing the Window System drivers Installing graphics libraries and desktop services componen[ OK ]
|
You might run into some trouble installing the Guest Additions. For instance, it mail fail due to lack of some OS libraries or packages. If that is the case, I suggest you follow the steps described in the post 3 – Install Oracle Grid Infrastructure under the section Configure the yum repository. This way, you can install any missing software using the DVD as the repository.
So, now that we have installed the Oracle VirtualBox Guest Additions, we can seemingly navigate the mouse to and from the Virtual Machine as well as many other features which improve the usability of the VM. Take for instance the shared folders. Once we have installed the Guest Additions, such folders become accessible from the VM as follows:
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_ocmdb12c-lv_root 18G 3.7G 13G 23% / tmpfs 2.0G 80K 2.0G 1% /dev/shm /dev/sda1 477M 55M 397M 13% /boot Oracle_Software 2.8T 2.3T 514G 82% /media/sf_Oracle_Software $ cd /media/sf_Oracle_Software/OCM\ 12c\ Upgrade/ root@ocmdb12c OCM 12c Upgrade]# ll total 5450553 drwxrwx---. 1 root vboxsf 40960 Nov 24 22:05 121 -rwxrwx---. 1 root vboxsf 1673544724 Nov 24 01:56 linuxamd64_12102_database_1of2.zip -rwxrwx---. 1 root vboxsf 1014530602 Nov 24 00:08 linuxamd64_12102_database_2of2.zip -rwxrwx---. 1 root vboxsf 499228127 Nov 23 22:50 linuxamd64_12102_examples.zip -rwxrwx---. 1 root vboxsf 1747043545 Nov 24 02:30 linuxamd64_12102_grid_1of2.zip -rwxrwx---. 1 root vboxsf 646972897 Nov 23 23:45 linuxamd64_12102_grid_2of2.zip drwxrwx---. 1 root vboxsf 4096 Nov 24 01:51 Oracle Linux Release 6 Update 5 for x86_64 (64 Bit)
|
How cool is that?
In the next post, we will be covering the prerequisites for installing the Oracle Grid Infrastructure as well as the installation itself.
Please add comments, make corrections and ask questions as I will be happy to try answering them. If I do not know the answer, I am sure someone will know and will kindly answer it.
That's it for this post and...
Até la!
Daniel