
Overview of CentOS
CentOS, short for Community ENTerprise Operating System, is a widely used Linux distribution derived from the sources of Red Hat Enterprise Linux (RHEL). It aims to provide a free, enterprise-class, community-supported computing platform that is functionally compatible with its upstream source, RHEL. Since its inception, CentOS has become a cornerstone for servers, workstations, and cloud-based deployments due to its stability, security, and long-term support model.
History and Evolution
Origins
CentOS was first released in May 2004 by Gregory Kurtzer. The distribution was created to fill a gap in the market for a free, RHEL-compatible distribution without the Red Hat branding, subscription fees, or accompanying support contracts.
Major Milestones
- CentOS 2/3 Series (2004–2007): Early builds closely mirrored RHEL 2.1 and 3.0, establishing the community-driven approach.
- CentOS 4 Series (2005–2011): Introduced improved hardware support and additional architectural builds.
- CentOS 5 Series (2007–2017): Adopted more modern kernels and extended lifecycle support.
- CentOS 6 Series (2011–2020): Strengthened virtualization support and introduced systemd alternatives.
- CentOS 7 Series (2014–2024): Standardized on the systemd init system, provided Docker container options.
- CentOS 8 and Stream (2019–Present): Shifted to CentOS Stream, a rolling-release mechanism serving as a prelude to the next RHEL minor release.
How CentOS Works
CentOS is built directly from the publicly available RHEL source code, ensuring that every package aligns with its enterprise counterpart. The distribution incorporates the following mechanisms:
Source Reconstruction
- Downstream Compilation: Sources are retrieved from RHEL’s SRPM (Source RPM) files.
- Branding Removal: Red Hat trademarks and branding are replaced or removed to comply with licensing.
- Repackaging: The modified sources are recompiled into binary RPMs, forming CentOS repositories.
Package Management
CentOS employs the YUM (Yellowdog Updater, Modified) package manager on versions 7 and earlier, and DNF in CentOS 8/Stream:
- YUM: Offers dependency resolution, group installations, and plugin support.
- DNF: Enhanced performance, tighter dependency solving, and a stable API for integration.
Software Repositories
CentOS hosts multiple repositories:
- Base: Core packages reconstructed from RHEL sources.
- Updates: Security patches and bug fixes.
- Extras: Additional packages not present in RHEL but deemed beneficial.
- CentOSPlus: Pre-release features to align with future RHEL minor versions.
Architecture and Design
Monolithic Kernel
CentOS uses a monolithic Linux kernel, enabling efficient communication between hardware and software modules. The kernel integrates drivers, file systems, and networking stacks in a single address space for performance.
Init System
- SysVinit (CentOS 6 earlier): Script-based startup and shutdown processes.
- systemd (CentOS 7 beyond): Parallel service startup, socket activation, and cgroup management.
Filesystem Hierarchy
CentOS adheres to the Filesystem Hierarchy Standard (FHS), organizing files as follows:
- /bin, /sbin: Essential binaries and system administration tools.
- /etc: Configuration files.
- /var: Variable data like logs and spool files.
- /usr: Secondary hierarchy for read-only user data.
- /home: User home directories.
- /opt: Optional third-party software.
Primary Orientations and Use Cases
CentOS caters to diverse populations in both enterprise and community contexts. The key orientations include:
Enterprise Servers
- Web Hosting: Apache, NGINX, and Tomcat deployments.
- Database Servers: MySQL, MariaDB, PostgreSQL, and Oracle.
- Virtualization: KVM, Xen, and container orchestration with Docker and Kubernetes.
Development Platforms
- Software Development: GCC, LLVM toolchains, and Python, Ruby, Java environments.
- Testing and CI/CD: Jenkins, GitLab CI, and Travis alternatives.
- Containerized Applications: Podman, Buildah, and atomic host images.
Scientific and High-Performance Computing
CentOS is often chosen for clusters and supercomputers due to its predictable performance and broad support for HPC libraries:
- OpenMPI, MPICH
- CUDA, OpenCL
- SLURM workload manager
Installation and Configuration
Minimum Requirements
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 1 GHz (x86_64) | 2 GHz multi-core |
| RAM | 1 GB | 4 GB |
| Disk Space | 10 GB | 20 GB |
| Network | Ethernet | Gigabit Ethernet |
Installation Steps
- Download the ISO image from the official CentOS website.
- Create a bootable USB or mount the ISO in a virtual machine.
- Boot the target machine and select Install CentOS from the GRUB menu.
- Configure localization, keyboard, and time zone settings.
- Partition disks manually or use the automatic option.
- Select software packages and server roles (e.g., LAMP, minimal install).
- Set root password and create a user account.
- Complete installation and reboot into CentOS.
Package Management and Updates
Keeping CentOS systems up to date is vital for security and stability.
YUM Commands (CentOS 7 earlier)
- yum update: Update all packages.
- yum install ltpackagegt: Install a new package.
- yum remove ltpackagegt: Uninstall a package.
- yum search lttermgt: Search for packages.
- yum groupinstall ltgroupgt: Install package groups.
DNF Commands (CentOS 8/Stream)
- dnf upgrade: Upgrade installed packages.
- dnf install ltpackagegt: Add a package.
- dnf remove ltpackagegt: Delete a package.
- dnf search lttermgt: Find packages.
- dnf module install ltmodulegt: Stream-specific modules.
Community and Support
CentOS thrives on community participation and offers multiple support channels:
Mailing Lists and Forums
- centos-devel@lists.centos.org – Development discussions.
- centos-users@lists.centos.org – User support and troubleshooting.
- CentOS Forums – Interactive community threads.
Official Documentation
- CentOS Wiki – Guides, how-tos, and best practices.
- CentOS Documentation – Versioned manuals and installation notes.
Third-Party Resources
- Books: CentOS Bible, Mastering CentOS.
- Online Courses: Linux Academy, Udemy, Pluralsight.
- Blogs and YouTube channels dedicated to CentOS tutorials.
Security and Maintenance
Maintaining a secure CentOS environment involves multiple layers:
SELinux
- Security-Enhanced Linux (SELinux) enforces mandatory access control policies.
- States: enforcing, permissive, disabled.
- Tools: semanage, setenforce, audit2allow.
Firewalls
CentOS 7 uses firewalld with zones and services:
- firewall-cmd –zone=public –add-service=http
- firewall-cmd –reload
Automated Updates
- yum-cron or dnf-automatic for unattended patching.
- Configuration: /etc/yum/yum-cron.conf or /etc/dnf/automatic.conf.
Curiosities and Interesting Facts
CentOS Stream
CentOS Stream, introduced in late 2019, functions as the upstream development branch for RHEL. It receives updates prior to their inclusion in RHEL, allowing developers and system administrators to test new features and changes ahead of time.
Rebuild Automation
The CentOS project uses the Koji build system for automated package compilation. Koji tracks builds, dependencies, and ensures reproducibility across architectures.
Modularity
CentOS 8 introduced the concept of Modular Streams, offering multiple versions of software stacks (e.g., Node.js, Python) concurrently. This flexibility enables selecting the most appropriate runtime environment for applications.
SIGs (Special Interest Groups)
CentOS hosts SIGs focused on niche areas:
- cloud: Cloud images and tools (OpenStack, AWS).
- storage: Ceph, GlusterFS.
- virt: Virtualization enhancements and tooling.
Comparison of Major CentOS Versions
| Feature | CentOS 6 | CentOS 7 | CentOS 8/Stream |
|---|---|---|---|
| Init System | SysVinit | systemd | systemd |
| Default File System | ext4 | XFS | XFS |
| Package Manager | YUM | YUM | DNF |
| Modularity | No | No | Yes |
| Container Tools | Docker (EPEL) | Docker | Podman, Buildah |
Conclusion
CentOS stands as a testament to the power of open source collaboration, delivering a stable, enterprise-grade Linux distribution without licensing costs. Its alignment with RHEL ensures long-term support, robust security, and compatibility with a vast ecosystem of software. From web servers and virtualization hosts to scientific clusters and cloud environments, CentOS continues to serve as a reliable foundation for organizations worldwide. Whether you are a system administrator, developer, or hobbyist, CentOS offers the tools and community support to build, deploy, and maintain critical infrastructure with confidence.
Leave a Reply