How to Install the Operating System CentOS

Introduction

Welcome, intrepid explorer! You’re about to embark on a grand adventure: installing CentOS, one of the sturdier, enterprise-grade Linux distributions out there. Whether you’re setting up a development server, a testing sandbox, or simply indulging your inner sysadmin, CentOS is your trusted companion. Brace yourself for a comprehensive, step-by-step guide—complete with humor to keep you entertained when (not if) things get a bit hairy.

What Is CentOS?

CentOS (Community ENTerprise Operating System) is a free, community-supported computing platform functionally compatible with its upstream source, Red Hat Enterprise Linux (RHEL). It offers stability, security patches, and long-term support—ideal for servers and mission-critical environments.
Fun fact: CentOS was originally created in 2004, back when “cloud” meant “your rack of 19-inch servers under a desk.

Prerequisites System Requirements

  • 64-bit compatible CPU (x86_64). CentOS dropped 32-bit support after version 7.
  • Minimum 1 GB RAM (2 GB recommended for GUI installations).
  • At least 10 GB of free disk space (20 GB or more for comfortable room to breathe).
  • Stable internet connection (for package updates and optional repos).
  • USB stick (4 GB ) or blank DVD for installation media.
  • Patience and a sense of humor—errors have been known to laugh at you.

1. Downloading the CentOS ISO

  1. Navigate to the official CentOS download page: https://www.centos.org/download/.
  2. Choose your version (CentOS 7 or CentOS 8/Stream). Note that CentOS 8 is now CentOS Stream CentOS 7 remains a stable legacy option.
  3. Select a mirror close to your location, and download the DVD ISO for a complete package set. The minimal ISO is smaller but requires internet access during install.
  4. Save the ISO to your local drive.

2. Verifying the ISO Checksum

Never skip this! It ensures your download isn’t corrupted or tampered with.

  • Find the checksum file on the mirror (SHA256SUMS).
  • Run in a terminal:
sha256sum CentOS-8-x86_64-dvd.iso

Compare the output with the SHA256SUMS entry. If they match, you’re golden if not, redownload and blame the network gremlins.

3. Creating Bootable Media

USB Stick (Recommended)

  1. Plug in your USB (4 GB or larger).
  2. Identify its device name (e.g., /dev/sdb) using lsblk or fdisk -l.
  3. Issue the dangerous but effective command:
sudo dd if=CentOS-8-x86_64-dvd.iso of=/dev/sdX bs=4M status=progress  sync

Replace sdX with your USB device, not a partition number. One typo here, and you’ll wipe your backup drive (yikes!).

DVD Burn

  1. Insert a blank DVD.
  2. Use your favorite burning tool (Brasero, K3b, Xfburn).
  3. Select Burn Image, choose the CentOS ISO, and burn at a moderate speed (4× or 8×) to avoid write errors.

4. BIOS/UEFI Configuration

Reboot your machine and enter the BIOS/UEFI setup (usually F2, DEL or F12). Ensure:

  • Boot Order: USB (or DVD) first, then HDD/SSD.
  • Secure Boot: Disabled for CentOS 7 CentOS 8 Stream can work with Secure Boot on some hardware.
  • Legacy/CSM Mode: Use UEFI or Legacy depending on your hardware and preferences.

5. Starting the Installation Wizard

Boot Menu

After selecting your media, you’ll be greeted by the CentOS installer menu:

Option Description
Install CentOS 8 Standard graphical installation.
Test this media install Verify the ISO integrity before installing.
Troubleshooting Rescue mode, boot in basic video mode, etc.

Language Keyboard

Choose your language and preferred keyboard layout. If you pick Klingon, expect unpredictable outcomes.

Installation Summary Screen

This is your control center—configure:

  • Time Date: Select your region/time zone.
  • Keyboard: Add any extra layouts if needed.
  • Language Support: Choose additional languages.
  • Software Selection: Minimal, Server with GUI, Development Tools, etc.
  • Installation Destination: Partitioning settings.
  • Network Hostname: Enable network interfaces and set your hostname.

6. Partitioning Schemes

Automatic partitioning is safest for newbies manual gives you full control. Typical layout:

  • / (root): 10–20 GB
  • /home: Remaining space for user data
  • swap: Equal to RAM size (up to 8 GB) optional if you use zram.

If you’re bold, experiment with LVM, RAID or software Btrfs.

7. Software Selection

Out of the box, you can choose:

  • Minimal Install: Command-line only, ~1 GB footprint.
  • Server with GUI (GNOME): For those who can’t resist a desktop.
  • Development Creative Workstation: Developer tools multimedia.
  • Custom environment: Pick individual packages.

8. Setting Root Password Creating a User

  1. Enter a strong root password. No “password123.”
  2. Create an unprivileged user for daily tasks. Grant them sudo rights in the checkbox.

9. Begin Installation Monitor Progress

Hit Begin Installation. Go brew some coffee while files copy and packages install. The installer will show a progress bar and log messages (if you’re feeling adventurous, switch to Ctrl Alt F2 to tail /tmp/anaconda.log).

10. First Boot Post-Installation Tasks

Initial Login

Remove installation media, reboot, and log in as your new user or root. If you chose a GUI, GNOME’s login screen awaits.

System Update

sudo yum update -y

This fetches the latest patches. Reboot if the kernel was updated:

sudo reboot

Enable EPEL Repository

sudo yum install -y epel-release

EPEL (Extra Packages for Enterprise Linux) provides hundreds of additional packages.

Basic Security

  • Firewalld: sudo systemctl enable --now firewalld
  • SELinux: Stay in enforcing mode unless you really know what youre doing.
  • OpenSSH: sudo systemctl enable --now sshd. Edit /etc/ssh/sshd_config to harden.

User Permission Management

  • Add a user: sudo adduser alice amp sudo passwd alice.
  • Grant sudo: sudo usermod -aG wheel alice.
  • Lock root SSH login: set PermitRootLogin no in /etc/ssh/sshd_config.

11. Handy Post-Install Tips Tricks

Enable Snapshots (Btrfs/ZFS)

Protect configurations by enabling filesystem snapshots. For Btrfs:

sudo yum install -y snapper

Install Common Tools

sudo yum install -y vim git wget curl net-tools htop

Set Up a LAMP Stack

  • Apache: sudo yum install -y httpd sudo systemctl enable --now httpd
  • MySQL/MariaDB: sudo yum install -y mariadb-server sudo systemctl enable --now mariadb
  • PHP: sudo yum install -y php php-mysqlnd

Host File DNS

Edit /etc/hosts or configure /etc/resolv.conf for custom DNS.

Virtualization (KVM/QEMU)

sudo yum install -y @virtualization  sudo systemctl enable --now libvirtd

Use virt-manager for a GUI or virsh for command-line magic.

Conclusion

You’ve successfully installed and configured CentOS—cheers! From here, you can tailor your system to specific roles: web server, database node, container host (Docker or Kubernetes), CI/CD runner, or your very own Tux playground. Remember to keep your system updated, backup regularly, and never underestimate the power of the man pages. Now go forth and conquer the command prompt!

“Why did the sysadmin cross the road? To patch the chicken on the other side.”

Official Website of CentOS

Download TXT




Leave a Reply

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