Share

Hugo is a fast static site generator written in Go. It designed to make website creation  simple. Hugo is a great choice for building static website like blogs, a portfolio site, a landing page etc. With Hugo developers need not worry about  setting up complicated run-times, dependencies , databases  or any server-side configurations.

Hugo is very simple to deploy and takes a very little time to compile the static pages. As per the official website it takes Hugo has less than 1 ms of build times  per page.

Hugo has support for many platforms like Windows, Mac and many known Linux distribution. In this guide we will go through the Installation steps of Hugo on Red Hat based CentOS 8 distribution.

Prerequisites:

1. A CentOS 8 installed System.

Steps for Installing the Hugo on CentOS 8

Add the Required Repository

1. Installing Hugo on CentOS requires adding repository information from Fedora Copr. For this follow the link here and select EPEL for CentOS 8.

2. Now copy the text from the page opened after clicking the above link. The text would be something like:

[copr:copr.fedorainfracloud.org:daftaupe:hugo]

name=Copr repo for hugo owned by daftaupe

baseurl=https://download.copr.fedorainfracloud.org/results/daftaupe/hugo/epel-8-$basearch/

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

3. Now go to directory “/etc/repos.d” on your CentOS 8 machine and create a new file and name it as “hugo.repo” and paste the above content in this file. Enter the “sudo” password if prompted.

$ cd /etc/yum.repos.d

$ sudo vi hugo.repo

 

You can use the editor of your choice. Save the file.

Update the System Software Packages to the latest version

4.  Now run the below command and enter “y/Y” to update the repo packages.

$ sudo yum update

This will install any required package or dependencies for installing Hugo on CentOS 8.

Install The Hugo Software Package

5. After the above step are completed, simply run the below command to install Hugo.

$ sudo yum install hugo -y

Test  The Installation

6. That’s all done for installing Hugo on CentOS 8. You can check the version of Hugo using the following command.

$ hugo version


Share

1 thought on “How To Install Hugo On CentOS 8

  1. [hugo]
    name = Go Hugo
    baseurl=https://download.copr.fedorainfracloud.org/results/daftaupe/hugo/epel-7-$basearch/
    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

    work to me

Comments are closed.