How to Install Go on CentOS 8

How to Install Go on CentOS 8

Install Go on centos 8; Through this tutorial, we will learn how to install and configure Go or Golang in centOS 8.

How to Install Go on CentOS 8

Follow the following steps below to download and install Go on CentOS 8:

  • Step 1 – Download the Go binary
  • Step 2 – Verify the tarball checksum
  • Step 3 – Extract the tarball
  • Step 4 –  Set $PATH environment variable

Step 1 – Download the Go binary

First of all, open your terminal or command line and execute the following command into it to download the go binary libraries into centos 8:

wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz

Step 2 – Verify the tarball checksum

Once the archive is downloaded, verify the tarball checksum by executing the following command on command line or terminal:

sha256sum go1.13.4.linux-amd64.tar.gz

Step 3 – Extract the tarball

Then execute the following command on command line to extract the tarball to the /usr/local directory:

sudo tar -C /usr/local -xf go1.13.4.linux-amd64.tar.gz

Step 4 –  Set $PATH environment variable

Finally, set the path environment variable for go or golang into centos 8 system.

So, we can do this by adding the following line to the /etc/profile file (for a system-wide installation) or to the $HOME/.bash_profile file (for a current user installation):

export PATH=$PATH:/usr/local/go/bin

Save the file, and load the new PATH environment variable into the current shell session using the source command:

source ~/.bash_profile

Conclusion

Now that we have downloaded and installed Go in centos 8.

Recommended CentOS Tutorials

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published. Required fields are marked *