1
0
forked from DRAM-IT/Wiki
Wiki-By-Syukri/IT Sofware Engineering Training/month-01/week-01/day-01/ComputerSystems-Virtualization-LinuxFundamentals-v2.md

15 KiB
Raw Blame History

Training and Lab Activity: Computer Systems, Virtualization & Linux Fundamentals

Target Audience: Beginners with little to no prior experience in computer systems, virtualization, or Linux.

Duration: 2 * 2 Hours (2 * 120 minutes)

Hour 1: Computer Systems & Virtualization - The Foundation (60 minutes)

Part A: Introduction to Computer System Basics and Network Fundamentals (30 minutes - Lecture/Discussion)

  • Learning Objectives:
    • Understand the fundamental components of a computer system.
    • Grasp basic network concepts and their importance.
    • Appreciate the role of operating systems.
  • Content:
    • What is a Computer System?
      • Hardware:
        • CPU (Processor): The brain what it does.
        • RAM (Memory): Short-term storage, speed.
        • Storage (HDD/SSD): Long-term storage, types and differences.
        • Motherboard: The central hub.
        • Input/Output Devices (Keyboard, Mouse, Monitor, Printer).
      • Software:
        • Operating System (OS): The manager (Windows, macOS, Linux).
        • Applications: Programs for specific tasks.
    • Network Fundamentals (Simplified):
      • What is a network? Why do we need it?
      • Basic components: Routers, Switches, Cables.
      • IP Addresses: Unique identifiers.
      • Client-Server Model (brief overview).
      • The Internet as a global network.
  • Activity:
    • Quick Q&A: "What's the difference between RAM and a hard drive?"
    • Analogy: Compare a computer system to a human body or a factory.

Part B: Bare Metal vs Virtualization vs Containerization (30 minutes - Lecture/Discussion)

  • Learning Objectives:
    • Differentiate between bare metal, virtualization, and containerization.
    • Understand the core benefits and use cases of each approach.
  • Content:
    • Bare Metal:
      • Definition: OS directly on hardware.
      • Pros: Maximum performance, direct hardware access.
      • Cons: Resource underutilization, difficult to manage multiple applications, hardware dependency.
    • Virtualization:
      • Concept: Running multiple virtual machines (VMs) on a single physical host.
      • Hypervisor (Type 1 vs. Type 2 - focus on Type 2 for VirtualBox): The software that manages VMs.
      • Pros: Resource isolation, efficient resource utilization, portability, disaster recovery.
      • Cons: Overhead from hypervisor, slightly lower performance than bare metal.
      • Analogy: An apartment building (bare metal) vs. a shared house with separate rooms (virtualization).
    • Containerization (Brief Overview - for context):
      • Concept: Lightweight, isolated environments sharing the host OS kernel.
      • Examples: Docker.
      • Pros: Even lighter than VMs, faster startup, highly portable.
      • Cons: Less isolation than VMs, shares host kernel.
      • Analogy: Virtualization is a separate house for each family; Containerization is separate apartments within one house.
  • Activity:
    • Interactive poll: "If you had a powerful server, would you prefer bare metal, virtualization, or containerization for running 10 different applications?" (Discuss why).
    • Quick comparison table on whiteboard (Bare Metal | Virtualization | Containerization) with Pros/Cons.

Hour 2: Virtualization with VirtualBox - Hands-On (60 minutes)

Part A: Overview of Virtualization with VirtualBox (20 minutes - Lecture/Demonstration)

  • Learning Objectives:
    • Understand the purpose and benefits of using VirtualBox.
    • Identify key system requirements for running VirtualBox and VMs.
    • Familiarize with the VirtualBox interface.
  • Content:
    • Why VirtualBox?
      • Free, open-source, widely used for personal and small-scale virtualization.
      • Great for learning and testing new OS.
      • Supports a wide range of guest OS.
    • Benefits of Virtualization (reiterate from Hour 1, specifically for VirtualBox):
      • Running multiple OS simultaneously.
      • Testing software in isolated environments.
      • Creating snapshots (rollback points).
      • Portability of VMs.
    • System Requirements for Host Machine:
      • CPU with virtualization extensions (Intel VT-x/AMD-V).
      • Sufficient RAM (min. 4GB for host + 2GB per VM).
      • Ample disk space (min. 20GB per VM).
    • VirtualBox Interface Tour:
      • Main window, toolbar.
      • Global settings.
      • VM settings panes (System, Display, Storage, Network).
  • Demonstration (Trainer):
    • Launch VirtualBox.
    • Show how to create a new VM (without installing OS yet).
    • Walk through basic VM settings (RAM, CPU cores, disk size).
    • Show how to attach an ISO image to a virtual CD/DVD drive.

Part B: Lab Activity: Creating a Virtual Machine in VirtualBox (40 minutes - Hands-On)

  • Learning Objectives:
    • Successfully create a new virtual machine in VirtualBox.
    • Configure basic VM settings (RAM, CPU, storage).
    • Attach an ISO image to the VM.
  • Activity:
    • Step 1: Launch VirtualBox.
    • Step 2: Create a New Virtual Machine.
      • Click "New" to start the VM creation wizard.
      • Name: MyCentOSVM (or MyRHELVM)
      • Type: Linux
      • Version: Red Hat (64-bit) (or CentOS (64-bit))
      • Memory size: Set to at least 2048 MB (2 GB) (adjust based on host RAM).
      • Hard disk: Create a virtual hard disk now.
      • Hard disk file type: VDI (VirtualBox Disk Image).
      • Storage on physical hard disk: Dynamically allocated.
      • File location and size: Default location, set size to 20 GB (minimum).
    • Step 3: Configure VM Settings (Crucial before starting).
      • Select the newly created VM and click "Settings".
      • System > Processor: Enable PAE/NX (if available), adjust CPU cores to 2 (if host has enough).
      • Storage:
        • Under "Controller: IDE", click the empty CD icon.
        • On the right, click the CD icon again and select "Choose/Create a Virtual Optical Disk...".
        • Navigate to and select the downloaded CentOS/RHEL ISO image.
      • Network: (Briefly mention options, keep as NAT for now for simplicity).
    • Step 4: Verify Settings.
  • Troubleshooting Tips (Trainer):
    • "VT-x/AMD-V is not available" error: Explain BIOS/UEFI settings.
    • Insufficient RAM/Disk space messages.
  • Trainer Walk-around: Provide one-on-one assistance.

Hour 3: Linux OS Fundamentals (CentOS/RHEL) - Part 1 (60 minutes)

Part A: Introduction to Linux (30 minutes - Lecture/Discussion)

  • Learning Objectives:
    • Understand the history and philosophy of Linux.
    • Differentiate between various Linux distributions.
    • Explain why CentOS/RHEL is preferred in enterprise environments.
  • Content:
    • What is Linux?
      • Operating system kernel created by Linus Torvalds.
      • Open-source philosophy: Free to use, modify, distribute.
      • Analogy: Linux is the engine, distributions are different car models built around it.
    • Linux Distributions (brief overview):
      • Debian-based: Ubuntu, Mint (user-friendly, desktops).
      • Red Hat-based: RHEL, CentOS, Fedora (enterprise, servers).
      • Other popular ones: SUSE, Arch.
    • Why CentOS/RHEL for Enterprises?
      • Stability and Reliability: Long-term support (LTS) releases.
      • Security: Strong focus on security, regular updates.
      • Scalability: Designed for high-performance servers and large deployments.
      • Support: RHEL offers paid enterprise support; CentOS was a community-supported rebuild (now CentOS Stream).
      • Industry Standard: Widely adopted in data centers and cloud environments.
  • Activity:
    • Discussion: "Based on what we've learned, why would a company choose RHEL over Ubuntu for their critical servers?"
    • Show a picture of the Linux mascot, Tux.

Part B: Lab Activity: Installing CentOS/RHEL in VirtualBox (30 minutes - Hands-On)

  • Learning Objectives:
    • Successfully start the CentOS/RHEL installation process within the VM.
    • Navigate the installation wizard (basic steps).
  • Activity:
    • Step 1: Start the Virtual Machine.
      • Select MyCentOSVM (or MyRHELVM) and click "Start".
    • Step 2: Follow Installation Prompts.
      • When prompted at the boot screen, select Install CentOS Linux 7 (or RHEL equivalent) and press Enter.
      • Language Selection: Choose your preferred language.
      • Installation Summary Screen:
        • DATE & TIME: Set your correct time zone.
        • KEYBOARD: Set your keyboard layout.
        • INSTALLATION SOURCE: Verify it's "Local media".
        • SOFTWARE SELECTION: Choose "Minimal Install" for efficiency (we only need command line for basics).
        • INSTALLATION DESTINATION:
          • Click on the disk icon.
          • Ensure "Automatically configure partitioning" is selected.
          • Click "Done".
        • NETWORK & HOSTNAME: (Optional for this lab, but mention its importance).
      • BEGIN INSTALLATION.
    • Step 3: Set Root Password and Create User (During Installation).
      • While installation is running, click on ROOT PASSWORD and set a strong password (e.g., Pa$$w0rd!).
      • Click on USER CREATION and create a standard user (e.g., student with password password). Make this user an administrator by checking "Make this user administrator".
    • Troubleshooting Tips (Trainer):
      • VM not booting from ISO: Recheck Storage settings.
      • Cursor stuck: Ctrl+Right Alt (or Host key) to release.
  • Trainer Walk-around: Ensure everyone is successfully installing. Note: Installation might take some time.

Hour 4: Linux OS Fundamentals (CentOS/RHEL) - Part 2 & Lab (60 minutes)

Part A: Basic Commands, File System Structure, and User Permission Concepts (30 minutes - Lecture/Demonstration)

  • Learning Objectives:
    • Execute fundamental Linux commands.
    • Understand the hierarchical Linux file system structure.
    • Grasp basic user and file permission concepts.
  • Content:
    • Booting into CentOS/RHEL:
      • First boot after installation.
      • Login screen (text-based for minimal install).
      • Logging in as the student user.
    • The Linux Command Line Interface (CLI):
      • What is a shell? (Bash).
      • Prompt: username@hostname ~$
    • Essential Basic Commands:
      • pwd: Print working directory.
      • ls: List directory contents (ls -l, ls -a).
      • cd: Change directory (cd .., cd ~, cd /).
      • mkdir: Make directory.
      • touch: Create empty file.
      • cat: Display file content.
      • cp: Copy files/directories.
      • mv: Move/rename files/directories.
      • rm: Remove files (rm -rf - caution!).
      • clear: Clear screen.
      • history: Command history.
      • man: Manual pages (e.g., man ls).
    • Linux File System Hierarchy (Simplified):
      • /: Root directory.
      • /bin: Essential user binaries.
      • /etc: Configuration files.
      • /home: User home directories.
      • /var: Variable data (logs, mail).
      • /tmp: Temporary files.
      • /dev: Device files.
      • /proc: Process information.
    • User and File Permissions (Basic Concepts):
      • Users: root (administrator), standard user.
      • Groups.
      • Permissions: Read (r), Write (w), Execute (x).
      • Owner, Group, Others.
      • ls -l output interpretation (e.g., drwxr-xr-x).
      • chmod (brief mention, not for deep dive).
      • sudo: Running commands as root.
  • Demonstration (Trainer):
    • Live demo of each command in a terminal.
    • Navigate through different parts of the file system.
    • Show ls -l output and explain permissions.

Part B: Lab Activity: Basic Linux Commands and Navigation (30 minutes - Hands-On)

  • Learning Objectives:
    • Log in to the CentOS/RHEL VM.
    • Practice common file system navigation commands.
    • Create, modify, and delete files/directories.
    • Use sudo for administrative tasks.
  • Activity:
    • Step 1: Log in to your CentOS/RHEL VM.
      • If the installation finished, reboot the VM.
      • At the login prompt, type student and press Enter, then enter your password (password).
    • Step 2: Explore the File System.
      • pwd (should be /home/student)
      • ls -l
      • cd /
      • ls -l (observe root directory contents)
      • cd /etc
      • ls
      • cd /home/student (or cd ~)
    • Step 3: Create and Manage Files/Directories.
      • mkdir my_first_directory
      • cd my_first_directory
      • touch my_file.txt
      • ls -l
      • echo "Hello Linux!" > my_file.txt (brief intro to redirection)
      • cat my_file.txt
      • mkdir another_dir
      • cp my_file.txt another_dir/
      • cd another_dir
      • ls
      • mv my_file.txt renamed_file.txt
      • ls
      • rm renamed_file.txt
      • cd ..
      • rmdir another_dir (will fail if not empty, good teaching point)
      • rm -rf another_dir (demonstrate, but warn about rm -rf)
      • ls
    • Step 4: Practice with sudo.
      • sudo ls /root (should prompt for student's password, then show root's home directory).
      • sudo touch /testfile.txt (create a file in root, then sudo rm /testfile.txt)
      • ls -l / (verify file creation/deletion).
    • Step 5: Use man pages.
      • man ls
      • Press q to quit the man page.
  • Troubleshooting Tips (Trainer):
    • Command not found errors: Typo, or not installed (unlikely for basic commands).
    • Permission denied: Try with sudo.
  • Wrap-up & Q&A:
    • Review key takeaways from the entire 4 hours.
    • Answer any remaining questions.
    • Provide resources for further learning (online tutorials, books).

Post-Training Resources (Optional Handout/Email):


This structured plan provides a good balance of theoretical knowledge and hands-on experience, essential for beginners to grasp these foundational concepts. Remember to encourage questions and walk around to assist participants during lab activities.