Linux Articles, Oracle December 2, 2015 0

Installing Oracle Linux 7 for Oracle software deployments

This demo shows installation process of Oracle Linux 7 in virtual machine (VirtualBox) and basic OS configuration for further Oracle software deployments e.g., Oracle Databases, WebLogic Servers.


1. Download Oracle Linux ISO image from Oracle Software Delivery Cloud

2. Download and install VirtualBox software, create new virtual machine and mount Oracle Linux ISO image.

3. Boot the virtual machine and install Oracle Linux.

4. Set SELinux to permissive mode

If the OS is to be used for an Oracle installation, it is easier if Secure Linux (SELinux) is disabled or switched to permissive. To do this edit the /etc/selinux/config file, making sure the SELINUX flag is set as follows.


If SELinux is configured after installation, the server will need a reboot for the change to take effect.

5. Stop the firewall

[[email protected] ~]#
systemctl stop firewalld
systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/

6. Install oracle-rdbms-server-12cR1-preinstall and execute oracle-rdbms-server-12cR1-preinstall-verify

[[email protected] ~]# yum install oracle-rdbms-server-12cR1-preinstall
[[email protected] ~]# oracle-rdbms-server-12cR1-preinstall-verify

By installing oracle-rdbms-server-12cR1-preinstall package we automate the following:

  • installation of required software packages needed for database installation, with all dependencies
  • oracle account creation and groups: oinstall, dba
  • kernel parameters modification in /etc/sysctl.conf
  • settings for hard and soft shell resource limits in /etc/security/limits.conf
  • set of numa=off in the kernel boot parameters (for x86_64)

Let’s take a look and verify oracle user account:

[[email protected] ~]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)

Create additional groups and user account “grid”

[[email protected] ~]# 
groupadd -g 54323 oper
groupadd -g 54324 grid
groupadd -g 54325 asmdba
groupadd -g 54326 asmoper
groupadd -g 54327 asmadmin

#user account grid (ASM admin and grid software owner)
[[email protected] ~]# useradd -m -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash grid

Alter oracle account for Job Role Separation (JRS) environments (Doc ID 1177483.1)

[ro[email protected] ~]# usermod -m -u 54321 -g oinstall -G asmdba,dba oracle

We run Virtual Machine. Let’s set the x86 as the default boot kernel:

Display the menu entries that are defined in the configuration file, for example:

# grep '^menuentry' /boot/grub2/grub.cfg
menuentry 'Oracle Linux Server 7.1, with Linux 3.10.0-229.el7.x86_64' ...
menuentry 'Oracle Linux Server 7.1, with Unbreakable Enterprise Kernel 3.8.13-55.1.6.el7uek.x86_64' ...
menuentry 'Oracle Linux Server 7.1, with Linux 0-rescue-...

In this example for a BIOS-based system, the configuration file is /boot/grub2/grub.cfg, which contains menu entries 0, 1, and 2 that correspond to the x86, UEK, and the rescue kernel respectively.

Enter the following commands to make the x86 (entry 0) the default boot kernel:

# grub2-set-default 0
# grub2-mkconfig -o /boot/grub2/grub.cfg

Allow regular users to switch to oracle account by issuing sudo command as it has been described in this article Oracle user account – Linux good practice

Our existing regular user account is “neo”

[roo[email protected] ~]# id neo
uid=500(neo) gid=500(users) groups=500(users)

Assign user “neo” to the following groups; “dba” and “wheel”

[[email protected] ~]# usermod -g users -G dba,wheel,asmdba neo
[[email protected] ~]# id neo
uid=500(neo) gid=500(users) groups=500(users),10(wheel),54322(dba),54325(asmdba)

Now we have to modify /etc/sudoers file to allow users in dba and wheel groups (optional) to use sudo (do not edit that file manually, use visudo tool instead):

[[email protected] ~]# visudo
visudo: /etc/sudoers.tmp unchanged

#Add the following lines and save changes

Cmnd_Alias ASMDBALIMIT = /bin/su - grid, !/bin/su *root*
Cmnd_Alias DBALIMIT = /bin/su - oracle, !/bin/su *root*

#wheel (optional)
%wheel ALL = /bin/su -

Login again as “neo” and test switching between oracle, grid and root accounts:

#Sudo to oracle account
[[email protected] ~]$ sudo su - oracle
[sudo] password for neo:******* 
[[email protected] ~]$ logout
[[email protected] ~]$

#sudo to grid account:
[[email protected] ~]$ sudo su - grid
[[email protected] ~]$ logout

#sudo to root account

[[email protected] ~]$ sudo su -
[[email protected] ~]# logout
[[email protected] ~]$

Create directory structure for future Oracle software deployments:

[[email protected] ~]# 
mkdir -p /u01/app/oracle/product
chown -R oracle:oinstall /u01
chmod -R 775 /u01

We are ready to go. At this moment we have pretty decent Oracle Linux 7 server “seed” ready to be cloned and used for Oracle software installations.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.