Setting up an Oracle 12c R2 Lab for the Administration Certified Associate Certification – Part 2 – Oracle Database Prerequisites

Hopefully, by now you have a fully functional running VM with Oracle Linux on it – if not, head back to Part 1 and follow the instructions there to get caught up! One would think that the Oracle Database may come preconfigured and setup with something called Oracle Linux but that is just not the case.  In fact, before we can even think about installing Oracle Database there are a number of prerequisites we need to meet – enough to warrant it’s own part in a blog series anyways – so with that, let’s have a look….

Automatic or Manual

If you Google around about the Oracle Database Prerequisites you will see a number of different blog posts outlining a whack of manual steps that need to be taken in order to get things ready. Items like creating groups, setting up users, changing a bunch of permissions on directories. You will also see an rpm package which can be pulled down and installed which will set all of this up for you! I mean, the choice is yours, but I’m never going through all of the manual steps again – here we will just document the automagic way of doing things as it saves us a ton of time and limits our chance of making any errors. First up, ssh into your server as root and run the following command to install the pre-install packages…

This will go through and set a number of different settings as it pertains to the kernel and network settings, as well as set up all of the proper groups and create the ever so important oracle user! Once complete, go ahead and change the oracle users password to something preferred… (Be sure to still be root at this point)

Now it’s time to add some information to our /etc/hosts file. We need to add our hostname, including the FQDN to both the line defining 127.0.0.1 and also adding a new one reflecting our new IP. In the end, it should look something the file shown below, obviously replacing mwp-oracle with your own hostname.

We also need to edit the /etc/selinux/config file ensuring that the SELINUX flag is set to permissive (By default this will be enforcing). Simply change the SELINUX=enforcing line to as follows..

Depending on your paranoia level, configure your firewall properly (see here) or, since this is a lab, I’ll simply stop and disable it with the following commands:

Now we need to create some directories for our Oracle installation to be installed in.  You can choose to change these if you wish, just remember to adjust the environment variables accordingly when we get to that step.

Finally, let’s go ahead and set up some of the environment variables for our Oracle instance. This can be done by adding the following lines to the oracle users bash_profile (/home/oracle/.bash_profile).

Give this bad boy a good reboot and with that, we are all set to begin part 3 of this series which is installing the Oracle Database 12C software – exciting!!!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top