Image for Linux Installation at 9to5ml.com
Image for Linux Installation at 9to5ml.com

Linux Installation | Learning from Alnafi DCCS track

Let’s talk about the Linux installation, but first of all why Linux is a great OS as compared to others in most of the scenarios.

Why Linux:

Linux is open source, which means its code is available, for anyone to inspect, modify and distribute and most of its distributions are free of cost. It has a reputation for being more secure as compared to other operating systems because of its open-source nature, where the community can quickly identify and patch vulnerabilities.

Linux is versatile and can run on a wide range of hardware devices, from embedded systems to IOT devices to supercomputers to mobile devices and it’s also well-known for its efficient resource management and performance.

When it comes to customization there’s no end, it allows for the customization of user-experience from the choice of desktop environment to kernel-level modifications. Its distributions generally place high emphasis on user privacy, so we can check how it handles our data.

Linux is also known as the backbone of the internet, as most web servers, including those running major services like Google, Facebook, and Amazon, are Linux-based. Many enterprises use Linux for its reliability, scalability, and cost-efficiency.

At this stage, we have an idea about why its important to learn Linux OS. Now comes to its installation, we’ll talk about it in our own context where we will install it for learning purposes.

Linux Distributions:

So first of all, we have to choose the Linux distribution for installation and here we have several options:

  1. Ubuntu: It is one of the most user-friendly and widely used distributions and has a large community and excellent support.
  2. Fedora: Known for cutting-edge features and strong support from the open-source community.
  3. Linux Mint: Based on Ubuntu, with a more familiar interface similar to Windows.
  4. Red Hat Enterprise Linux (RHEL): It is a commercial distribution widely used in enterprises for servers, cloud environments, and mission-critical applications and also offers special support and services that are paid.
  5. CentOS: That was used to be a very popular free, open-source alternative to Red Hat Enterprise Linux (RHEL) with its stability, compatibility with RHEL, and long-term support, without the cost associated with RHEL’s commercial licenses. But recently in 2020, The CentOS Project, in coordination with Red Hat, announced that it would shift full investment to CentOS Stream, the upstream development platform for upcoming Red Hat Enterprise Linux releases. As a result, CentOS Linux updates and releases were discontinued between 2021 and 2024, finishing when CentOS Linux 7 reached EOL on June 30, 2024. [ Check over here ]
  6. CentOS Stream: After the EOL of CentOS linux, Red Hat introduced CentOS Stream, an upstream version of RHEL. This means it sits between Fedora (the cutting edge) and RHEL (stable), and it serves as a testing platform for features that will later be included in RHEL.

So, what we have studied during the courses ( RHEL Intensive + ) was about CentOS, so did we waste our time with CentOS 6, 7, & 8? No, everything we learned to do on CentOS, can be done exactly the same way on RHEL. Likewise, if you switch to CentOS Stream, you take all that knowledge and experience with you.

So, we will learn about the installation of centOS Stream and even can we upgrade to CentOS stream from centOS Linux (7, 8 ) with 3 simple commands; no painful migration is required.

Linux Installation Platforms:

As per our purpose, we have two options:

  • Desktops/Laptops: The most common option for running Linux, allowing you to replace or dual boot with an existing OS.
  • Servers: This is often used for web, database, and file servers.

So our focus will be the servers.

Installation options for Linux server:

We have 5 different options:

  1. Single Boot: Directly on the server’s physical hardware, replacing any existing operating system.
  2. Dual Boot: Install Linux alongside another operating system. Not ideal for servers.
  3. Headless Installation: Means only command-line installation no GUI is available.
  4. Virtualization: Installing Linux on a virtual machine (VM) using hypervisors like VMware, KVM, VirtualBox, Parallels Desktop, and UTM. [ We will utilize this method ]
  5. Containers: Instead of full virtual machines, containers are lightweight, isolated environments that run on the same kernel as the host OS. Tools like Docker, Podman, or LXC are used to manage these containers. [ Also a good option for our user case ]

As the lecture ( Linux Primer 100c installation process) under the course of Linux Deep Dive, has covered the installation of Ubnut/centos using VirtualBox, we will learn how to install CentOS 9 [ aka stream ] using Virtualbox on Windows and UTM on Mac:

Installing CentOS-Stream 9 on windows using VirtualBox

So if you are using Windows and want a free virtualization option then Virtualbox is a good option. So, here’s the steps to follow for that:

  1. Download the CentOS 9 ISO: You can download the CentOS-Stream 9 ISO from this link.
  2. Download VirtualBox from the official site: https://www.virtualbox.org/ and run the installer.
  3. Create a New Virtual Machine for CentOS Stream 9:
    1. Open VirtualBox and click New to create a new VM.
    2. Name the VM (e.g., “CentOS Stream 9”).
    3. Type: Select Linux.
    4. Version: Choose Red Hat (64-bit) (CentOS Stream is derived from Red Hat).
    5. Memory Size: Allocate at least 2 GB of RAM (2048 MB). For better performance, you may allocate more if your system allows.
    6. Hard Disk:
      1. Select Create a virtual hard disk now.
      2. Choose VDI (VirtualBox Disk Image).
      3. Set storage to Dynamically allocated (this allows the disk to grow as needed).
      4. Specify at least 20 GB for the virtual hard disk.
  4. Configure VM Settings: Before starting the VM, you should adjust a few settings:
    1. System:
      1. Go to the System tab.
      2. Under the Processor tab, allocate at least 2 CPU cores (if available).
      3. Under the Motherboard tab, ensure Enable EFI is checked if CentOS requires UEFI.
    2. Display:
      1. Allocate at least 16 MB of Video Memory (increase if using a GUI).
    3. Storage:
      1. Under Controller: IDE, click Empty, then click the CD icon and choose Choose a disk file.
      2. Select the CentOS Stream 9 ISO you downloaded earlier.
    4. Network:
      1. Ensure Adapter 1 is attached to NAT for internet access.
      2. You can change this to Bridged Adapter if you want the VM to be accessible on the same network as your host.
  5. Boot the Virtual Machine: Click on Start to boot the VM and then select Install CentOS Stream 9 from the menu.
  6. Installing CentOS Stream 9: First, choose language, leave the selection of automatic partitioning, select Server with GUI for software selection, also set a root password, and finally click on Begin Installation.
  7. Post-Installation Setup
    1. After installation is complete, the system will prompt you to reboot.
    2. Before rebooting, remove the CentOS Stream ISO from the virtual CD drive in VirtualBox by going to Devices > Optical Drives > Remove Disk from Virtual Drive.
    3. Reboot the system.

Installing CentOS-Stream 9 on Mac using UTM

Now let’s come to the MacOS, so if you are using MacOS then in my experience the UTM is the best option as it uses QEMU under the hood. I’ll include a video for that later.

So let’s see how we can install cetnOS 9 on macOS using UTM:

  1. Download CentOS Stream 9 ISO: Follow the above-mentioned method to download the CentOS Stream 9 ISO file.
  2. Install UTM on macOS:
    1. Download UTM for Mac from its official website
    2. Install UTM by dragging it to the Applications folder.
  3. Create a New Virtual Machine in UTM
    1. Open UTM and click the + button to create a new VM
    2. Select Virtualize for better performance, especially if you’re using an Apple Silicon Mac
  4. Configure the Virtual Machine for CentOS Stream 9:
    1. Provide a name for your VM
    2. Under Architecture, select x86_64 if you are using intel mac and choose aarch64 for apple silicon.
  5. Allocate at least 2 GB of RAM, allocate more RAM for better performance if you have.
  6. In hardware: Allocate 2 CPU cores ( or more if you have), and add a new hard disk with at least 20 GB of storage for the installation.
  7. Under the CD/DVD Drive section, select the CentOS Stream 9 ISO you downloaded earlier ( click browse locate the ISO file on your system, and select it).
  8. For Network, Use the default Emulated Network Adapter to provide internet access for the VM through your host machine.
  9. Start the VM and Install CentOS Stream 9 ( by following the steps as we discussed earlier )

Finally here are three commands to upgrade to CentOS-Stream from centOS linux,run these commands with root privileges to perform the migration ( its always recommended to take a backup of your system):

dnf install -y centos-release-stream

dnf swap -y centos-{linux,stream}-repos

dnf distro-sync -y

Key Takeaways:

We are done with the installation of Linux. Here are the key takeaways:

Linux Advantages: Open source, secure, versatile, customizable, privacy-focused, and widely used in enterprise environments.

Popular Distributions: Ubuntu (user-friendly), Fedora (cutting-edge), Linux Mint (Windows-like), RHEL (commercial), CentOS (formerly free RHEL alternative, now CentOS Stream).

Installation Platforms: Desktops/laptops (replace or dual boot), servers, and virtual environments.

Server Installation Options:

  1. Single Boot
  2. Dual Boot
  3. Headless
  4. Virtualization (e.g., VirtualBox, UTM)
  5. Containers (e.g., Docker)

CentOS Stream 9 Installation:

  • Windows (VirtualBox): Download ISO, create VM (2 GB RAM, 20 GB disk), configure settings, install CentOS, remove ISO post-install.
  • macOS (UTM): Download ISO, install UTM, create VM (2 GB RAM, 20 GB disk, x86_64 or aarch64), configure settings, install CentOS.

Upgrading from CentOS Linux:

dnf install -y centos-release-stream
dnf swap -y centos-{linux,stream}-repos
dns distro-sunc -y

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *