Hugo install on Redhat Enterprise Linux 9

Installation of Hugo on RHEL 9

Hugo install on Redhat Enterprise Linux 9

Introduction

HUGO is a static website rendering engine. Essentially you write a collection of Mark Down to files with headers, and HUGO can very rapidily theme an entire website. This website for instance is on the HUGO platform. Other very large sites like most likely the Kubernetes Documentation is also on HUGO. You end up with a “wordpress” like feel for the end user, however its actually static HTML that can be served up on git pages or any http server. There is also no need for a database. In the end if you were unhappy with hugo you would still have all your content in Mark Down that easily can be moved somewhere else.

The current installation instructions i’ve seen for Hugo on RHEL9 uses snap. The snap hugo instructions worked on my rocky 9 WSL2 image (on windows 11), however on ‘real’ RHEL 9 security would not permit snap apps to run. The below instructions will install HUGO without SNAP and get it working quickly on RHEL9.

Installation

Install Hugo Binaries

# Repo file from https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/
cat <<EOF | sudo tee /etc/yum.repos.d/hugo.repo
[copr:copr.fedorainfracloud.org:daftaupe:hugo]
name=Copr repo for hugo owned by daftaupe
baseurl=https://download.copr.fedorainfracloud.org/results/daftaupe/hugo/epel-7-x86_64/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/daftaupe/hugo/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
EOF
sudo dnf repolist
sudo dnf makecache
sudo dnf -y install hugo

Now that Hugo is installed, you can proceed with the (quick start)[https://gohugo.io/getting-started/quick-start/]