Install Guest Additions
Continue through the Oracle Linux 6 installation as you would for a basic server. A general pictorial guide to the installation can be found here . More specifically, it should be a server installation with a minimum of 4G+ swap, firewall disabled, SELinux set to permissive and the following package groups installed:
- Base System > Base
- Base System > Compatibility libraries
- Base System > Hardware monitoring utilities
- Base System > Large Systems Performance
- Base System > Network file system client
- Base System > Performance Tools
- Base System > Perl Support
- Servers > Server Platform
- Servers > System administration tools
- Desktops > Desktop
- Desktops > Desktop Platform
- Desktops > Fonts
- Desktops > General Purpose Desktop
- Desktops > Graphical Administration Tools
- Desktops > Input Methods
- Desktops > X Window System
- Applications > Internet Browser
- Development > Additional Development
- Development > Development Tools
To be consistent with the rest of the article, the following information should be set during the installation:
- hostname: ol6-121-rac1.localdomain
- eth0: DHCP (Connect Automatically)
- eth1: IP=192.168.56.101, Subnet=255.255.255.0, Gateway=192.168.56.1, DNS=192.168.56.1, Search=localdomain (Connect Automatically)
- eth2: IP=192.168.1.101, Subnet=255.255.255.0, Gateway=<blank>, DNS=<blank>, Search=<blank> (Connect Automatically)
You are free to change the IP addresses to suit your network, but remember to stay consistent with those adjustments throughout the rest of the article.
Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.
If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all your prerequisite setup, issue the following command.
Earlier versions of Oracle Linux required manual setup of the Yum repository by following the instructions at http://public-yum.oracle.com .
It is probably worth doing a full update as well, but this is not strictly speaking necessary.
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all prerequisites, you will need to manually perform the following setup tasks.
Add or amend the following lines to the "/etc/sysctl.conf" file.
Run the following command to change the current kernel parameters.
Add the following lines to the "/etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf" file.
In addition to the basic OS installation, the following packages must be installed whilst logged in as the root user. This includes the 64-bit and 32-bit versions of some packages.
Create the new groups and users.
Uncomment the extra groups you require.
The following steps must be performed, whether you did the manual or automatic setup.
Perform the following steps whilst logged into the "ol6-121-rac1" virtual machine as the root user.
Set the password for the "oracle" user.
Apart form the localhost address, the "/etc/hosts" file can be left blank, but I prefer to put the addresses in for reference.
The SCAN address is commented out of the hosts file because it must be resolved using a DNS, so it can round-robin between 3 addresses on the same subnet as the public IPs. The DNS can be configured on the host machine using BIND or Dnsmasq , which is much simpler. If you are using Dnsmasq, put the RAC-specific entries in the hosts machines "/etc/hosts" file, with the SCAN entries uncommented, and restart Dnsmasq.
Make sure the "/etc/resolv.conf" file includes a nameserver entry that points to the correct nameserver. Also, if the "domain" and "search" entries are both present, comment out one of them. For this installation my "/etc/resolv.conf" looked like this.
The changes to the "resolv.conf" will be overwritten by the network manager, due to the presence of the NAT interface. For this reason, this interface should now be disabled on startup. You can enable it manually if you need to access the internet from the VMs. Edit the "/etc/sysconfig/network-scripts/ifcfg-eth0" file, making the following change. This will take effect after the next restart.
There is no need to do the restart now. You can just run the following command.
At this point, the networking for the first node should look something like the following. Notice that eth0 has no associated IP address because it is disabled.
With this in place and the DNS configured the SCAN address is being resolved to all three IP addresses.
Change the setting of SELinux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here . The following is an example of disabling the firewall.
Either configure NTP, or make sure it is not configured so the Oracle Cluster Time Synchronization Service (ctssd) can synchronize the times of the RAC nodes. If you want to deconfigure NTP do the following, which is what I did for this installation.
If your RAC is going to be permanently connected to your main network and you want to use NTP, you must add the "-x" option into the following line in the "/etc/sysconfig/ntpd" file.
Then restart NTP.
Create the directories in which the Oracle software will be installed.
Log in as the "oracle" user and add the following lines at the end of the "/home/oracle/.bash_profile" file.
Create a file called "/home/oracle/grid_env" with the following contents.
Create a file called "/home/oracle/db_env" with the following contents.
Once the "/home/oracle/.bash_profile" has been run, you will be able to switch between environments as follows.
We've made a lot of changes, so it's worth doing a reboot of the VM at this point to make sure all the changes have taken effect.
Click on the "Devices > Install Guest Additions" menu option at the top of the VM screen. If you get the option to auto-run take it. If not, then run the following commands.
Add the "oracle" user into the "vboxsf" group so it has access to shared drives.
Unzip the grid and database software on the host machine.
Create a shared folder (Devices > Shared Folders) on the virtual machine, pointing to the directory on the host where the Oracle software was unzipped. Check the "Auto-mount" and "Make Permanent" options before clicking the "OK" button.
