Archival Notice
This guide was written for legacy CentOS/RHEL 8 environments. Please note that CentOS 8 has reached End of Life (EOL), and modern RHEL 9 releases utilize updated GNOME session naming conventions and Wayland display managers by default. Please adapt package installations and systemd target configurations to your active environment standards.
When provisioning Linux servers for specialized desktop virtualization, VDI application hosting, or headless document conversion microservices, deploying a heavy, full-featured desktop environment is highly inefficient. Installing dozens of gigabytes of unnecessary games, media players, and browser utilities wastes disk space and RAM.
In this guide, I will walk you through a practical systems administration workflow: provisioning a minimal X11 GUI and GNOME Classic session on CentOS 8, resolving kernel development headers to compile VirtualBox Guest Additions, and deploying headless LibreOffice RPMs for document processing.
Prerequisites
You will need a CentOS/RHEL 8 minimal installation VM with root privileges, alongside internet access to pull EPEL and LibreOffice package archives.
Step 1: Provisioning Minimal X11 GUI and GNOME Classic Session
To establish a lightweight graphical environment without bloatware, install core Xorg display server utilities, essential X11 drivers, and the minimal GNOME Classic session packages.
# Install core Xorg server and session utilities
dnf install -y xorg-x11-server-Xorg xorg-x11-server-utils xorg-x11-server-xinit-session xorg-x11-xinit-session xorg-x11-utils xorg-x11-xauth xorg-x11-drivers xorg-x11-xbitmaps xorg-x11-xkb-utils
# Install minimal GNOME Classic session and terminal
dnf install -y gnome-terminal gnome-terminal-nautilus liberation-mono-fonts gnome-classic-session
Configuring Systemd Boot Targets
Verify your current default boot target and switch the operating system to boot into graphical mode permanently:
# Check current default boot target
systemctl get-default
# Isolate graphical target immediately
systemctl isolate graphical.target
# Enforce graphical target as permanent system default
systemctl set-default graphical.target
Step 2: Compiling VirtualBox Guest Additions (DKMS and Kernel Headers)
If running your VM inside VirtualBox, compiling Guest Additions is critical to enable dynamic screen resizing, shared clipboards, and accelerated video performance. Because CentOS minimal installations lack development tools, you must install kernel headers and compilers first.
# Enable EPEL repository and install DKMS
dnf install -y epel-release
dnf install -y dkms gcc make bzip2 perl
# Install kernel development headers matching active kernel
dnf install -y kernel-devel kernel-headers
Verify that your installed kernel development headers perfectly match your active running kernel:
uname -r
rpm -q kernel-devel
Executing the Guest Additions Installer
Mount your VirtualBox Guest Additions ISO and execute the compilation script:
# Navigate to mounted Guest Additions ISO directory
cd /run/media/root/VBox_GAs_6.0.8/
# Execute Linux additions compilation script
./VBoxLinuxAdditions.run
Step 3: Deploying Headless LibreOffice RPMs
When building microservices that perform automated document conversion (such as converting .docx or .xlsx files to PDF via CLI), you can install LibreOffice headlessly without installing full desktop productivity suites.
# Download official LibreOffice RPM tarball archive
wget --no-proxy https://ftp.kaist.ac.kr/tdf/libreoffice/stable/7.3.5/rpm/x86_64/LibreOffice_7.3.5_Linux_x86-64_rpm.tar.gz --no-check-certificate
# Unpack archive
gunzip LibreOffice_7.3.5_Linux_x86-64_rpm.tar.gz
tar -xvf LibreOffice_7.3.5_Linux_x86-64_rpm.tar
cd LibreOffice_7.3.5.2_Linux_x86-64_rpm/RPMS/
Execute a bulk RPM installation across all base, core, calc, writer, impress, and headless integration packages:
# Install all LibreOffice RPM packages
rpm -ivh *.rpm
Environment Configured
Your Enterprise Linux 8 server is now fully configured with a minimal GUI, accelerated VirtualBox drivers, and headless document processing capabilities!