How to install Hugo on CentOS with CPanel

How to install Hugo on CentOS with CPanel

This is a quick tutorial on how to install Hugo on a cPanel web server running CentOS Linux.

First you may be asking what is Hugo?

Well let’s get a quote from the Hugo website.

Hugo is a general-purpose website framework. Technically speaking, Hugo is a static site generator. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website’s end users and an ideal writing experience for website authors.

Then you might be asking why would I want to install Hugo on on cPanel webserver?

Well, now that cPanel supports Git Version Control with deployments you can setup your cpanel hosted website to run hugo to build and deploy your website every time you check in changes to the git repository.

For details on how to do that I will make a separate post to walk thru the steps. This is just about how to get Hugo installed on the server.

Let’s get started!

Note that all these steps assume you are running at a terminal as root.

Step 1:

Go to the /etc/yum.repos.d folder

Step 2:

Run the following command to download the yum repo config for hugo

wget https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/repo/epel-7/daftaupe-hugo-epel-7.repo -O hugo.repo

Step 3:

Update yum to scan the hugo repo config

yum update

Step 4:

Install hugo

yum install hugo

Step 5:

Verify hugo installed correctly

hugo version

There you go, you now have Hugo installed and available to build website right on your server!

Avatar
Alan P. Barber
Software Developer, Computer Scientist, Scrum Master, & Crohn's Disease Fighter

I specialize in Software Development with a focus on Architecture and Design.

Previous
comments powered by Disqus