Advertisement

Thursday, March 2, 2017

Oracle Database - Grid Infrastructure / RAC 12c Installation - Part 2 - Linux Configuration (OEL 7.1)

 

In this blog we are going to continue from Part 1 and are going to make configuration changes to Linux machine we just installed.

In this blog you will be logged in as root user only throughout.

Step 1 - Change the default Boot Kernel
The first thing is to change the boot kernel from the UEK kernel to Kernel 3.10 
I am going to grep the grub configuration to verify how the entries are located in the grub.cfg
Here entries start with 'zero'. So the first entry is 0, and I am going to set it as default to which my Linux boots, finally am going to make the config changes.

[root@rac1 grub2]# grep ^menuentry grub.cfg
menuentry 'Oracle Linux Server 7.1, with Linux 3.10.0-229.el7.x86_64' --class ol --class gnu-linux --class gnu --class os --unrestricted $menuentry_id
_option 'gnulinux-3.10.0-229.el7.x86_64-advanced-cd23e1f1-4b26-45df-972c-443ddaf10d20' {
menuentry 'Oracle Linux Server 7.1, with Unbreakable Enterprise Kernel 3.8.13-55.1.6.el7uek.x86_64' --class ol --class gnu-linux --class gnu --class o
s --unrestricted $menuentry_id_option 'gnulinux-3.8.13-55.1.6.el7uek.x86_64-advanced-cd23e1f1-4b26-45df-972c-443ddaf10d20' {
menuentry 'Oracle Linux Server 7.1, with Linux 0-rescue-70c91ec1c32541bdbc7f40a6411edb28' --class ol --class gnu-linux --class gnu --class os --unrest
ricted $menuentry_id_option 'gnulinux-0-rescue-70c91ec1c32541bdbc7f40a6411edb28-advanced-cd23e1f1-4b26-45df-972c-443ddaf10d20' {


[root@rac1 grub2]# grub2-set-default 0


[root@rac1 grub2]# grub2-mkconfig -o grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.8.13-55.1.6.el7uek.x86_64
Found initrd image: /boot/initramfs-3.8.13-55.1.6.el7uek.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-70c91ec1c32541bdbc7f40a6411edb28
Found initrd image: /boot/initramfs-0-rescue-70c91ec1c32541bdbc7f40a6411edb28.img
done
[root@rac1 grub2]# cat grubenv | grep saved

saved_entry=0

Reboot here to test the changes you have made have been successful or not

Step 2 - Install Guest Additions
The second thing to do is have Guest Additions Installed in VBox, this helps me in copying data (clipboard), to and fro and mounting the shared folder from my base machine.

Guest Additions requires few additional packages to be installed before getting started. 
These include kernel headers, kernel-uek, kernel source code, debug and devel
If you are unsure, here is a small script I keep in handy to install everything so that Guest Additions Installation becomes easy.
For this we will have to first mount the OEL 7.1 Disk and then go to packages directory.

See Screenshot below how to mount the Disk



[root@rac1 Packages]# pwd
/run/media/root/OL-7.1 Server.x86_64/Packages

[root@rac1 Packages]# ls -lrth kernel* | awk '{print "rpm -Uvh " $9}' > /tmp/myfile.bash

[root@rac1 Packages]# bash /tmp/myfile.bash 

Once done, umount this dvd manually from the prompt, then click on 'Remove disk from Virtual Drive' (screenshot above)

Finally click on 'Insert Guest Additions CD Image...' (above screenshot)
It will automatically start installing the Guest Additions upon user confirmation. 

Once that is done successfully, you can reboot and finally make one small change to have a shared clipboard, drag & drop facility across the VM's
 Auto-mount of the shared file system you created during install time is done on reboot as well.

At this point my Linux machine is ready with Guest Additions for further Configuration

Step 3 - RPM Configuration
Install required RPM's
You can either - 
  1. Use Public Yum Server
  2. Local Repository Yum Server
  3. Do manual Install of all the rpms
For Manual Install run following in OEL 7.1
However, other OS will have different version of rpms available then these.

rpm -Uvh binutils-2.23.52.0.1-30.el7.x86_64.rpm
rpm -Uvh compat-libcap1-1.10-7.el7.x86_64.rpm 
rpm -Uvh rpm -Uvh compat-libcap1-1.10-7.el7.x86_64.rpm 
rpm -Uvh gcc-4.8.3-9.el7.x86_64.rpm 
rpm -Uvh libstdc++-devel-4.8.3-9.el7.x86_64.rpm
rpm -Uvh gcc-c++-4.8.3-9.el7.x86_64.rpm
rpm -Uvh glibc-2.17-78.0.1.el7.x86_64.rpm 
rpm -Uvh glibc-devel-2.17-78.0.1.el7.x86_64.rpm
rpm -Uvh libaio-devel-0.3.109-12.el7.x86_64.rpm 
rpm -Uvh libaio-0.3.109-12.el7.x86_64.rpm 
rpm -Uvh ksh
rpm -Uvh ksh-20120801-22.el7.x86_64.rpm 
rpm -Uvh make-3.82-21.el7.x86_64.rpm 
rpm -Uvh libXi-1.7.2-2.1.el7.x86_64.rpm 
rpm -Uvh libXt-1.1.4-6.1.el7.x86_64.rpm 
rpm -Uvh libXtst-1.2.2-2.1.el7.x86_64.rpm 
rpm -Uvh libgcc-4.8.3-9.el7.x86_64.rpm 
rpm -Uvh libstdc++-4.8.3-9.el7.x86_64.rpm 
rpm -Uvh libstdc++-devel-4.8.3-9.el7.x86_64.rpm 
rpm -Uvh sysstat-10.1.5-7.el7.x86_64.rpm 
rpm -Uvh libgcc-4.8.3-9.el7.i686.rpm
rpm -Uvh libaio-devel-0.3.109-12.el7.i686.rpm libaio-0.3.109-12.el7.i686.rpm
rpm -Uvh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm


Step 4 - System Configuration
Make the changes to sysctl.conf file. 
Add / modify the below parameters in the sysctl.conf file and run  sysctl -p

[root@rac1 ]# vi /etc/sysctl.conf
[root@rac1 ]# sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
kernel.panic_on_oops = 1

Step 5 - limits.conf file changes. These changes are required for Oracle/Grid user to have correct number of file descriptors

[root@rac1 ]# cat /etc/security/limits.conf | egrep 'oracle|grid'
grid   soft   nofile    1024
grid   hard   nofile    65536
grid   soft   nproc    2047
grid   hard   nproc    16384
grid   soft   stack    10240
grid   hard   stack    32768
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    2047
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768

Step 6 - User and Groups

Add Oracle User, Grid User and corresponding User Groups

groupadd -g 1001 oinstall
groupadd -g 1002 dba
groupadd -g 1003 asmdba

useradd -u 1001 -g 1001 -G dba,asmdba oracle
useradd -u  1002 -g 1001 -G asmdba,dba grid

passwd oracle
passwd grid


[root@rac1 ]# id oracle

uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba),1003(asmdba)

[root@rac1 ]# id grid

uid=1002(grid) gid=1001(oinstall) groups=1001(oinstall),1003(asmdba)

[root@rac1 Packages]# 

Disable avahi-daemon from autostart
systemctl disable avahi-daemon.service


Add the below line in network file
vi /etc/sysconfig/network
Add --> NOZEROCONF=yes

Add below entry in /etc/fstab
tmpfs           /dev/shm        tmpfs   size=5000m         0 0
(Linux 7: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm (Doc ID 2065603.1) 

Index
Part 3 - Network Configuration
Part 4 - Disk Configuration
Part 5 - Machine Clone
Part 6 - Installation 1 of 2
Part 6 - Installation 2 of 2

No comments:
Write comments