Saturday, August 24, 2024

Oracle Linux 8 - Quick guide

 


Oracle linux

Oracle linux boot sequence:

  • The computer performs a power-on-self-test and invokes firmware code.
  • Firmware (Bios or UEFI) code locate the boot instructions on the disk.
  • The boot instructions start the grub 2 bootloader.
  • Grub 2 boot loader loads the vmlinuz kernel image.
  • Vmlinuz is a compressed kernel image and initrd provides a temporary root file system to facilitate the kernel in loading necessary modules to access the root file system.
  • Grub 2 extract the contents of the initramfs image.
  • The kernel loads driver modules from initramfs.
  • Kernel starts the system process. Systemd

Basic input/output system (BIOS)

  • Only support booting from legacy MS-DOS labelled disk upto 2tb.

Unified Extensible firmware interface (UEFI)

  • Boots from GPT labelled disk
  • Include a secure boot mode which validates against the boot.

efibootmgr utility:

  • Efibootmgr is manage the boot order.

  • Secure boot is option feature with UEFI. Boot proces must be signed and authenticate in order to loaded and excited if not enabled the secure boot.

  • grub2-mkconfig command created the configuration file using template scripts in the /etc/grub.d/ directory and configuration variables in the /etc/default/grub

  • Boot loader specification (BLS) is a new way to define each kernel available to boot. Blscfg command in grub.cfg process the boot loader entry. Each boot loader entry file contains details of one kernel.
  • Setting a default kernel through command:

grub2-set+default or grubby —set-default

The value of Grub_default should be set to saved in /etc/default/grub. The commands update thr saved entry in the grubenv file.

  • The initial ram dial image preloads the block device modules so that root file system can be mounted.

Oracle announced the unbreakable enterprise kernel (UEK) in September 2010.

  • It is used by Exadata and Exalogic for extreme performance.
  • Btrfs file system : no volume manager needed with built-in RAID support

Systemd:

  • Speed up the booting ny loading services concurrently.
  • Provide a backward compatibility for the applications still using init script.
  • Forking service have a main process that forks another to do the work and exits.

#systemctl list-units —type mount

Cheony

  • chrony provides a client and server implementation of NTP.
  • Oracle linux can run tasks automatically, and comes with automated task utilities such as cron, anacron and systemd timers.
  • Anacron can run a job once a day. Scheduled a job are remembered and run the next time the system is up.
  • The main configuration file is /etc/anacrontab.
  • Chronyc tracking
  • Chronyc waitsync (synchronized the time)
  • chronyc -n sourcestats -v

Kernel module:

  • Kernel modules are dynamically loaded and unloaded. Kernel modules are store under /lib/modules/kernel_version

Modinfo module_name

Sysctl utility:

  • The sysctl utility is used to assign values to writable files in /proc/sys.
  • Added a change in /etc/sysctl.d and use sysctl -p filename to make a change immediately.

Device link:

Create a rule fils - /etc/udev/rules.d/20-local.rules

Run a udevadm trigger to proces the rule files.

Sysctl -w net. Ipv4.ip_forward=0

Package management:

  • Errata - bug fixing , security fix and enhancement
  • Rpm -qc package name (file associated with package)

Cves - common vulnerable and explicit

DNF automatic tool :

  • Providing a automatic notification, download and install of upgrades
  • Systemctl enable —now dnf-automatic.timer

Network security:

  • Linux kernel has builtin packet filtering function. Netfilter provide a framework inside the linux kernel.
  • Zone defines a set of firewalld configuration that should be applied. A zone can be associated with any number and combination of interfaces and source addresses.

  • The firewalld software package includes a set of predefined network zones on the following directory - /usr/lib/firewalld/zones
  • The default firewalld configuration file - /etc/firewalld/firewalld.conf
  • Change the default zone through command line:

#firewall-cmd —set-default-zone=work

Ksplice:

  • Updates the kernel and select space libraries on a running system.
  • Rollback updates without any reboot.
  • Patches going into new kernel or user space releases are tested by Oracle. They are then applied as Ksplice updates from Oracle Linux packages.
  • Install available user space updates:

#ksplice -y user upgrade

  • Linux shared memory:

#ls /proc/sys/kernel/sh*

Set a shared memory kernel parameters in /etc/sysctl.d/97-oracle-database-sysctl.conf.

  • Network Tuning : ip ports is assigned to a server process when it starts.

TCPDUMP:

  • To display for a network device on port 80.

#tcpdump -i eth1 port 80

  • To display packets without resolving host names.

#tcpdump -i eth1 —nnn port 80

  • For saving captured packets.

#tcpdump -i eth1 —nn port 80 -w caturefile.pcap

#tshark -D (To view a list of available network interfaces)

Partition devices are listed in the /proc/paritions.

To have the kernel re-read the partition

#partprobe device_name

  • Sd - scsi disk, hd-IDE disk, xvd- virtual disk, vd - Virtual disk

File system type:

  • ext2 - High performance for fixed disk and removable media.
  • ext3 - Journaling version of ext2
  • ext4 - supports larger files and file system sizes.
  • vfat - Ms-Dos file system useful when sharing a files between Windows and Linux.
  • Xfs - High performance journaling file system.
  • Btrfs - Addresses scalability requirements of large storage system.

Add a user into secondary group.

#usermod -aG groupID user name

No comments:

Post a Comment