
Create an RHN account and obtain a redhead login ID to download RHEL 9.4, install Oracle VirtualBox, create a RHEL 9 virtual machine, and access it from Windows with Mobaxterm.
Create a Red Hat login ID, selecting personal or corporate account, provide a unique ID, email, and password, then confirm email to access product evaluations, purchasing, knowledge content, and certifications.
Discover how to download the latest Red Hat Enterprise Linux 9.4 ISO for x86_64 from developers.redhat.com or access.redhat.com, including authentication and a download of about 10.3 GB.
Download and install Oracle VirtualBox on a Windows machine to create a virtual machine for RHEL 9.
Install Oracle VirtualBox on your Windows host, then navigate the dashboard to manage, create, or add virtual machines. Prepare the next lecture by templating RHEL 9.
Create a RHEL 9 VM template in Oracle VirtualBox Manager, set name, folder, and ISO image, and configure 2 GB RAM, 2 processors, and 20 GB disk for unattended installation.
Demonstrates configuring a RHEL 9 template, booting from the optical iso, and guiding installation on a 20 gb VDI with 2 gb memory.
Install Red Hat Enterprise Linux 9.4 by selecting English India, configuring keyboard, choosing a 20 GB installation destination, using local media, creating user techstart with password redhat, and begin installation.
Reboot the system after installation, log in as the installed user, and adjust the virtual machine boot order in Oracle VirtualBox to boot from hard disk before the ISO image.
Learn how to access a RHEL 9 system from Windows using MobaXterm by configuring a bridged network adapter and adjusting boot priority, and how to mount an ISO for installations.
Install and set up MobaXterm to access a Red Hat system from a Windows host via SSH, using IP 192.168.1.6, user techstart, and password redhat.
Learn how to grant a non-root user in RHEL 9 the ability to run admin tasks by editing the sudoers file with visudo, enabling sudo before commands like sudo dnf install.
Use sudo to perform admin tasks by adding a sudoers entry, then set up a local yum server from the RHEL 9 ISO to handle dependencies.
Set up a local yum server for RHEL 9 by mounting the ISO and creating a .repo under /etc/yum.repos.d. Then use sudo dnf to install vsftpd after enabling the repositories.
Learn to execute a bash shell script by granting execute permission with chmod, then run via ./script or sh script and verify with ls -ltr.
Learn how to use the echo command to display text, print messages in scripts and batch files, and explore options like -e, -n, -t, and -b.
Explore lab techniques to redirect script errors to a file using 2> and >>, learn standard error handling, and practice appending error output with echo in a Linux shell.
Explore bash script exit codes, where 0 signals success and non-zero values indicate errors; use exit with a code from 0 to 225 and check the exit status.
Explore exit codes by running pwd and mkdir, check status with echo $?, and interpret 0, 1, 126, 127 for success, missing operands, permission denied, or command not found.
Master test logic for strings and directories, including exit status, pwd usage, and test and extended test syntax to compare values.
Practice bash test logic by using a variable abc, with empty and non-empty checks via -z and -n, and observe exit status.
Demonstrates if and else in shell scripting with test logic and double square brackets, and checks for /etc/resolv.conf, printing results via echo.
Explore a lab on using if, elif, and else to classify numbers as positive, negative, or zero. Practice with a numeric variable and interactive input, printing results with echo.
Master the grep command to search files for patterns using regular expressions, print matching lines, and pipe command output for practical examples like locating chrony processes or text files.
Learn to match the start and end of a line with ^ and $ in regular expressions, using grep to find lines starting or ending with specific characters.
Practice scheduling tasks with the at command, verify jobs with atq or at -l, and save command outputs to files using date and uptime, while checking atd status.
Practice using the at command to schedule a one-time future task, with examples like tomorrow at 10 am or now plus one hour, and note that crontab handles recurring tasks.
Schedule recurring tasks with crontab and the cron daemon. Learn per-user crontab files, common commands like crontab -l, -r, -e, and the five scheduling fields.
Create a bash script, make it executable, and schedule it with crontab to run every two minutes using */2, then verify output in logs.
Schedule a script via crontab and configure stdout to a useful output file and stderr to an error file using the two greater-than sign operator, and verify file creation.
Learn to schedule recurring system jobs with system wide crontab files, using /etc/crontab or /etc/cron.d, and place scripts in hourly, daily, weekly, or monthly folders, specifying the executing user.
Learn to configure anacron to run daily, weekly, and monthly jobs via run-parts and the anacron tab. See how it keeps tasks running when the system isn't on, unlike cron.
Systemd timer runs a data-collection script every ten minutes, updates the log file, and uses sar to review cpu and iowait metrics.
Configures system temp file cleanup by copying the default config to /etc and setting files to delete after four days; the local file wins, run systemd-tempfiles --clean.
Configure systemd temp files to purge idle files from a directory, creating the abc directory via abc.conf with 15-second idle age, then run --create and --clean to remove test files.
Learn to manage RHEL 9 tuning profiles from the command line by installing tuned, listing profiles, and switching between virtual -guest and throughput -performance.
Enable the cockpit web console to manage performance profiles, switch to power save, and verify changes with tune -adm active, using the dashboard to view logs, storage, and networking.
Explore the fundamentals of SELinux security concepts, including enforcement mode, file context, booleans, and MAC policies, to protect Linux servers from misconfigurations and compromised daemons.
Protect web servers with SELinux by replacing DAC with MAC policies that restrict Apache access to designated directories, defend against privilege escalation, and enforce SELinux contexts.
Practice verifying SELinux context for the Apache process and its directories, focusing on httpd_t and httpd_sys_content_t. See how SELinux confines the process to its directory to enhance security.
Learn how to toggle SELinux modes temporarily using setenforce and echo methods, switching between enforcing and permissive, with practical lab demonstrations.
Learn to configure SELinux with Apache by installing httpd, enabling enforcing mode, and restricting the web server to the /var/www/html directory, with a live demonstration of access control.
Examine SELinux policy in action as Apache access fails from mismatched httpd_t and default_t contexts. Learn to adjust configurations, create aliases, and restart httpd to test permissions.
Demonstrate how SELinux enforcing versus permissive modes affect website access located outside /var/www. Show how to switch modes with setenforce 0 and verify access using audit logs.
Learn to change the SELinux context with chcon -R to httpd_sys_content_t for a directory and its contents, and verify website access while SELinux is enforcing.
Learn to create SELinux file context policies with semanage and update the _context.local file for a directory. Apply contexts with restorecon to relabel files and make changes permanent across reboots.
Learn how SELinux booleans act as on or off switches to tune policy, using getsebool and setsebool, with permanent changes via -P and the booleans directory.
Explore configuring SELinux booleans to let Apache serve content from a user's home directory. Install and start httpd, enable user_dir, create public_html, and adjust permissions to publish the site.
Explore how to partition disks, add partitions, and set up file systems and persistent mounts. Understand swap space and the benefits of separating OS and program files from user data.
Explain the four-primary-partition limit of the MBR scheme, show how to use an extended partition with logical partitions, and describe reserved sectors in MBR.
Explore the gpt partition scheme and how it replaces mbr to overcome the two-terabyte limit, enabling 128 partitions, 64-bit lba, and guid-based disk identification in uefi systems.
Learn to persistently mount file systems by editing /etc/fstab, using device or uuid, a mount point, xfs and defaults options, and set fsck and dump fields; apply with mount -a.
Learn to use the lsblk command to scan block devices and obtain UUIDs, configure persistent fstab entries, reload systemd with daemon-reload, and mount changes with mount -a.
Learn to create a swap partition using parted, format it with mkswap, and activate swap, including adding a new disk and increasing swap as memory grows.
Activate the swap space with swapon, providing the swap partition block device since there is no fstab entry. Free -m shows swap growing from about 2 GB to 7 GB.
Learn to set swap space priority in Linux by editing the fstab file and assigning priorities to multiple swap spaces with the pri option, and verify with swapon --show.
Discover how LVM enables flexible storage by pooling disks into a single volume group and resizing logical volumes and their file systems online without downtime.
Learn how physical volumes combine into a volume group to form a shared pool of storage, from which logical volumes are allocated and extended by adding disks.
Explore the LVM architecture from raw disks to a mounted XFS or ext4 file system, covering physical volumes, volume groups, logical volumes, and mounting steps.
Learn to build lvm storage by creating physical volumes from two disks, combining them into a volume group, and then creating and formatting a logical volume to mount as storage.
Learn to create logical volumes from a volume group with lvcreate, specify size or physical extents, and understand the PE size and lv vs L naming.
Learn to create a filesystem on a logical volume in Red Hat Linux by formatting with mkfs (ext4 or xfs), mounting to /mnt/data, and enabling persistence via fstab.
Extend a Red Hat LVM volume group by adding physical volumes with vgextend, and prepare disks, create physical volumes, and pvcreate to increase vg size.
this lab demonstrates extending a volume group by preparing a new disk as a physical volume and using vgextend to grow vg01 from about 5 gb to 5.94 gb.
Practice extending an xfs file system by creating a logical volume, formatting with xfs, mounting, then resizing the LV with lvextend and xfs_growfs to reach a larger size.
Move data between physical volumes in the volume group with pv move. Then reduce the volume group with vg reduce and remove the physical volume with pvremove.
Learn to safely remove a logical volume by unmounting the file system, updating fstab, and using lvremove (and later vgremove) to clean up LVM components.
Unmount the logical volume in vg ext4, then remove the logical volume and the volume group with vgremove. Finally, remove the associated physical volume with pvremove to complete the removal.
Learn to manage file systems with Stratis by installing Stratis CLI and stratisd, enabling the stratisd service, and creating a Stratis pool from available block devices using stratis pool create.
Create a stratis pool named pool one from three disks, then add another disk to expand to 20 gb, and verify the pool with status pool list.
Create a Stratis file system snapshot for fs1 in pool1 using the Stratis file system snapshot command. Note snapshots are independent and Stratis allocates storage, with a 560 MB journal.
Verify the file system, create a 2 gb file with dd in Stratis pool, and observe thin provisioning as used space grows, setting up a snapshot in the next lab.
Create and verify a stratis filesystem snapshot in stratispool1 to back up files. Mount the snapshot to retrieve a file, and check availability with stratis filesystem list.
Explore access to network attached storage with NFS and Samba on Linux, showing how NFS provides remote file access for Linux and Unix, while Samba shares folders with Windows systems.
Install and configure an NFS server and client on RHEL 9 by setting up a local yum server, installing nfs-utils and rpcbind, and exporting shared directories via /etc/exports.
Create a 1 gb logical volume in vg01, format it as xfs, mount it for nfs sharing, and set chmod 777 -R to grant read, write, and execute access.
Edit the main configuration file to export a mount point for the file system to the 192.168.1.0 network with read write and no_root_squash, then run exportfs -rv and showmount -e.
Edit the fstab file to persist an nfs share on the client, specifying the nfs server ip, exported file system, and mount point, so it mounts after reboot.
Unmount the exported nfs file system from the nfs client, edit the server exports to remove the share, and run exportfs -rv to confirm no exports.
Install autofs on the nfs client, configure /etc/auto.master.d with a .fs map, define the base directory /Linux and indirect map /etc/auto.indirect, and set a 90s timeout.
Demonstrate autofs by accessing the /linux/data mount point on the NFS client to trigger automatic mounting of the exported file system, with unmount after inactivity.
Explore how autofs automatically mounts a file system on demand and unmounts it after inactivity in Linux, demonstrating immediate mounting upon access and the benefits of on-demand mounting.
Create and format a new logical volume, mount it at /database/docs, and build a three-subdirectory file system (west, central, east) with a file in each, then export the nfs share.
Log into the NFS client, verify exports with showmount, create the master map under auto.master.d, and configure an indirect wildcard autofs map to mount /promo and /west/promo/east, then restart autofs.
This lab demonstrates mounting exported NFS file systems on demand using indirect wild card maps, showing separate mount points for east, west, and central subdirectories via autofs.
Disclaimer: This module is not accredited by Red Hat.
The Red Hat System Administration II (RH134) course focuses on essential tasks required to become a full-time Linux administrator and to validate those skills through the Red Hat Certified System Administrator exam.
This course goes deeper into Enterprise Linux administration, including file systems, partitioning, logical volumes, SELinux, firewalls, and troubleshooting.
Course Content:
Section 1: Introduction
-> Introduction about the course module
Section 2: Lab Setup for Practice - RHCSA
-> Standard Installation of RHEL 9
-> Create a Red Hat Network (RHN) account - Red Hat Login ID
-> Download the Latest Version of RHEL 9.4
-> Download and Install Oracle VirtualBox
-> Overview of Oracle VirtualBox
-> Create a template of RHEL9 VM
-> Create a template for a RHEL 9 virtual machine
-> Adjust Settings using the RHEL9 Template
-> Install Red Hat Enterprise Linux 9.4
-> Continue - Installation of RHEL 9
-> Access RHEL 9 from a Windows machine
-> Install and set up MobaXterm software
-> Allow a user to execute any commands using visudo.
-> sudo access
-> Set up a local Yum server
Section 2: Improve command-line productivity
-> Write simple bash scripts
-> Execute a bash shell script
-> Quote special characters
-> Lab- variable & special characters
-> echo command
-> Lab- echo command
-> Lab- redirection operator ">"
-> Lab- redirection stderr, append "2>", ">>"
-> Loops to iterate commands
-> Exit codes in bash script
-> Lab- exit code number
-> Lab- exit code in bash script
-> Test logic
-> Conditional structure-if, else, elif..
-> Lab- if, else
-> Lab- if, elif
-> Grep command
-> Regular expressions
-> Lab- Match the start and end of a line using "^" & "$"
Section 3:Schedule future tasks
-> Schedule deferred user tasks
-> Inspect and manage deferred user jobs
-> Lab1- at command
-> Lab2- at command
-> Recurring user jobs
-> Examples- Recurring user jobs
-> Lab- crontab(Recurring user jobs)
-> Lab 1- Schedule a script via crontab
-> Lab 2- Schedule a script via crontab
-> Recurring system jobs
-> Run periodic commands with Anacron
-> System timer
-> Lab- system timer
-> Managing temporary files
-> Cleaning temporary files with a systemd timer
-> Lab 1- Managing temp files
-> Lab 2- Managing temp files
Section 4: Tune system performance
-> Adjust tuning profiles
-> Managing Profiles from the command line
-> Manage profile with the command line
-> Linux process scheduling
Section 5: Managing SElinux security
-> SELinux security concepts
-> SELinux protection (DAC vs MAC)
-> SELinux context
-> Lab- SELinux context
-> Practical approach to understand SELinux security
-> SELinux modes
-> Toggling the SELinux modes temporarily
-> Toggling the SELinux modes permanently
-> Lab- SELinux security
-> Industrial project on SELinux security-1
-> Industrial project on SELinux security-2
-> Industrial project on SELinux security-3
-> Industrial project on SELinux security-4
-> Lab- change the SELinux context
-> Define SELinux default file context policies
-> Lab- SELinux default file context policies
-> SELinux Booleans
-> Lab 1- SELinux Booleans
-> Lab 2- SELinux Booleans
Section 6: Manage basic storage
-> Overview of partition disk
-> MBR partition scheme
-> MBR- Master Boot Record
-> Limitation of MBR partition scheme
-> GPT partition scheme
-> Manage partitions
-> Lab- create partition using parted command
-> Lab- create partition using single command
-> Lab- create file systems
-> Lab- persistently mount file system
-> lsblk command to scan the block devices
-> Swap space concepts
-> Create a swap partition
-> Activate swap space
-> Activate swap space persistently
-> Set swap space priority
Section 7: Manage storage stack-LVM
-> Overview of LVM- Logical volume manager
-> Features of LVM
-> Architectural overview of LVM
-> Architectural overview via diagram
-> Lab- create PV(Physical Volume)
-> Lab- create VG(Volume Group)
-> Lab- create LV(Logical Volume)
-> Lab- create a FS and LV
-> Lab- Display information about PV,VG, and LV
-> Extend a volume Group size
-> Lab- Extend a volume Group size
-> Extend a logical volume size
-> Lab- Extend an XFS file system
-> Lab- Extend an EXT4 file system
-> Extend swap space logical volumes
-> Reduce volume group storage
-> Remove a logical volume
-> Remove the volume group
Section 8: Manage layered storage
-> Overview of stratis storage management
-> Install and enable stratis
-> Create stratis pools
-> Manage stratis file system
-> Create a stratis file system snapshot
-> Persistently mount stratis file systems
-> Industrial Project- Lab 1
-> Industrial Project- Lab 2
-> Industrial Project- Lab 3
-> Industrial Project- Lab 4
-> Industrial Project- Lab 5
-> Industrial Project- Lab 6
Section 9: Access network-attached storage
-> Overview of NFS in Linux
-> Accessing exported NFS directories
-> Query a server's exported NFS directories
-> Create local yum server to install NFS package
-> Lab- Install NFS package
-> Lab- Create a NFS file system
-> Lab- Export the file system
-> Lab- Configure NFS client
-> Lab- Mount the exported FS on client
-> Lab- Unmount the exported FS
-> Mount NFS exports with the Automounter
-> Lab 1- Setup automount using Indirect Map
-> Lab 2- Setup automount using Indirect Map
-> Lab 3- Check the Autofs working
-> Lab 4- Automatically unmount the file system if it is not being accessed.
-> Lab 1- Industrial project on Indirect Wildcard Maps
-> Lab 2- Industrial project on Indirect Wildcard Maps
-> Lab 3- Industrial project on Indirect Wildcard Maps
-> Lab 4- Industrial project on Indirect Wildcard Maps
-> Lab 5- Industrial project on Indirect Wildcard Maps
Section 10: Control the boot process
-> Booting process of RHEL 9 system
-> Reboot and Shutdown
-> System Target
-> Select a target at runtime
-> Set a default target
-> Select a target at boot time
-> Reset the root passwd using Rd.Break
-> Reset the root password using RHEL9 ISO
-> Repairing System boot Issues- Rescue mode
-> Boot RHEL 9 into Emergency mode
-> Enabling the early debug Shell
-> Repair file system issues at boot
-> Repair file system- Misconfiguration in the /etc/fstab
-> Repair file system- Root FS corruption
Section 11: Run Containers
-> Introducing container technology
-> Container images and registries
-> Authenticate to registry- Podman login
-> Conf file of container registries
-> Container files to Build container Images
-> The Podman Utility
-> Install Container Utilities
-> Search a container Image
-> Examine container image- skopeo inspect
-> Create a container image using containerfile
-> Inspect the container image
-> Run containers
-> Create and start container
-> Run a container from a remote repository
-> Run a ubuntu container
-> Run an Apache webserver container on port 8080
-> Environment isolation in containers
-> Podman exec- executes a command inside a running container
-> Remove containers and images
-> Manage container resources
-> Environment variable for containers
-> Run a MariaDB container while passing environment variables
-> Ephemeral nature of container storage
-> Container Persistent storage
-> Attach the persistent storage to a container
-> Assign a port mapping to containers
-> Map the container host port on the container (MariaDB)
-> Last Lecture