Install Go 1.5 On CentOS 6 and 7

Mattias Geniar, Sunday, August 23, 2015

This is a really quick guide on how to install the recently released Go 1.5 on a CentOS 6 or 7 server.

Start by grabbing the latest 1.5 release from the download pages.

$ cd /tmp
$ wget

Extract the binary files to /usr/local/go.

$ tar -C /usr/local -xzf /tmp/go1.5.linux-amd64.tar.gz

For easy access, symlink your installed binaries in /usr/local/go to /use/local/bin, which should be in your default $PATH in your shell.

$ echo $PATH

$ ln -s /usr/local/go/bin/go /usr/local/bin/go
$ ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc
$ ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt

Alternatively, add the /usr/local/go/bin directory to your $PATH. Add the following line to your ~/.profile file.

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

You now have the working go binary for version 1.5

$ go version
go version go1.5 linux/amd64

Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek & public speaker. Currently working on DNS Spy & Oh Dear!. Follow me on Twitter as @mattiasgeniar.

Share this post

Did you like this post? Will you help me share it on social media? Thanks!


Tim Friday, January 1, 2016 at 00:49 - Reply

cool deal. thx for the tut.

Leave a Reply

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

Inbound links