Posts for: #Rhcsa

Time and Date Concepts and Configuration

relevant terminology

NTP internet server 

Public time servers that can be used as time sources by anyone.

NTP server 

== the server that provides time to the enterprise NTP clients  usually connects to an internet time server 

NTP peer 

An NTP node that receives time from an NTP server  When it loses its connection to the NTP server, it requests time from the other available NTP peer(s). 

[Read]

Domain Name Resolution

name resolution in Linux

Name resolution in Linux is a pipeline of verification jobs, not a single file: a process consults the Name Service Switch, which has a configuration file at /etc/nsswitchconf. This file contains a list of entries. Each entry describes a database and the list of sources to refer to in the order of their appearance in the entry.

An entry is written in this format: DatabaseName NameService1 [Status=Action] NameService2

[Read]

SELinux

SELinux is an implementation of the Mandatory Access Control security model in the Linux kernel. It bears more weight than the Discretionary Access Control security model, implemented as the Unix-based file permissions (ugo, rwx); To illustrate the power of SELinux, a Linux user, even the root account, gets denied access to his own files if the result of the SELinux authorization chain is a deny.

SELinux assigns a context (aka label) to every Linux user, process, file, directory, port, socket, hardware device, etc. These are considered as either subjects (Linux users and processes) or objects (files, directories, ports, …).

[Read]

Deploying RHCSA home labs

RHEL VMs guests on a Rocky Linux host with kvm

#TBC

RHEL VM guests on a Windows host with VirtualBox

Target is to build two RHEL VMs on in Virtualbox on a Windows machine.

Virtualbox must always be executed as administrator.

The installation of the extension pack might fail many times. What worked for me is patience and repetition, until I saw the green tick in the menu.

Shared clipboard and shared folder features will not work even if you activate them from the Virtualbox menu. What helped is to mount the VboxGuestAdditions.iso file from the GUI, check it in the shell terminal with lsblk, register the VM to Red Hat CDN with sudo subscription-manager register and provide my registration account details, reboot the machine, issue a dnf repolist to refresh the DNF repos, install the kernel headers with dnf install kernel-devel-$(uname -r) and reboot the VM again.

[Read]

mounting and unmounting network filesystems in Linux

definitions

NFS is one of the network filesystems available on Linux. An NFS server has the NFS service installed and enabled. It hosts the mounted filesystem that shall be made available to remote systems. This action is called export and involves these files:

  • /etc/exports: where I configure the mounted filesystems that need to be remotely available to the defined machines,
  • /var/lib/nfs/etab: is called the master export table. It is populated as soon as an entry, in a correct format, is recorded in the /etc/exports file and exportnfs -a is run. The exportnfs -a command reads the entries of /etc/exports to do its job. I am simplifying these steps with the expression create an NFS share.

establish a NFS export

Here is my lab topology: rhel10-vm1 (192.168.122.216): NFS server <—> rhel10-vm2 (192.168.122.6): NFS client.

[Read]

local filesysytems and swap in Linux

filesystem concepts

A filesystem (aka filesystem) is the software structure (the formatting) that is located on a storage device or in memory, and dictates how data is organized there.

When a filesystem is located on a storage device, like a disk or DVDROM, then it is called a physical filesystem. When it is located in memory, like for example when the Linux kernel loads the proc filesystem in RAM, then it is called a virtual filesystem.

[Read]

Linux Storage Concepts

units of measurement in storage

When referring to storage capacities, there are two units of measurements:

  • the multiples of 1024, where capacities are written using the IEC notation:
    • 1 kiB = 1 K, one kibibyte
    • 1 MiB = 1 M, one mebibyte
    • 1 GiB = 1 G, one gibibyte
    • 1 TiB = 1 T, one tebibyte
    • etc.
  • the multiples of 1000, which is also used in IT networking for communication speed, throughput or bandwidth. In this case, capacity values are written using this notation:
  • 1 kB: one kilobyte
  • 1 MB: one megabyte
  • 1 GB: one gigabyte
  • 1 TB: one terabyte
  • etc.

Commands that use units of 1024 bytes: fdisk, lsblk, sfdisk, etc.

[Read]

Linux Learning Map

Exam Objectives

  • Understand and use essential tools
    • Access a shell prompt and issue commands with correct syntax
    • Use input-output redirection (>, », |, 2>, etc.)
    • Use grep and regular expressions to analyze text
    • Access remote systems using SSH
    • Log in and switch users in multi-user targets
    • Archive, compress, unpack, and uncompress files using tar, gzip, and bzip2
    • Create and edit text files
    • Create, delete, copy, and move files and directories
    • Create hard and soft links
    • List, set, and change standard ugo/rwx permissions
    • Locate, read, and use system documentation including man, info, and files in /usr/share/doc

Manage software

- Configure access to RPM repositories
- Install and remove RPM software packages
- Configure access to Flatpak repositories
- Install and remove Flatpak software packages

Create simple shell scripts

- Conditionally execute code (use of: if, test, [], etc.)
- Use Looping constructs (for, etc.) to process file, command line input
- Process script inputs ($1, $2, etc.)
- Processing output of shell commands within a script

Operate running systems

- Boot, reboot, and shut down a system normally
- Boot systems into different targets manually
- Interrupt the boot process in order to gain access to a system
- Identify CPU/memory intensive processes and kill processes
- Adjust  process scheduling
- Manage tuning profiles
- Locate and interpret system log files and journals
- Preserve system journals
- Start, stop, and check the status of network services
- Securely transfer files between systems

Configure local storage

  • List, create, and delete partitions on GPT disks

[Read]