• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Sunday, May 18, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

How to Install Golang 1.8.3 on CentOS 7, Ubuntu 16.04, and Debian 9

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
53
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Download and decompress the Golang 1.8.3 archive
    1. For 64-bit Linux operating systems
    2. For 32-bit Linux operating systems
  3. Step 2: Setup GOROOT and PATH environment variables:
  4. Step 3: Test the installation
  5. Want to contribute?


Golang is a programming language developed by Google. Thanks to its versatility, simplicity and reliability, Golang has become one of the most popular programming languages in the open source community.

In this article, I will show you how to install the latest stable release of Golang on 64-bit and 32-bit Linux operating systems, including CentOS 7, Ubuntu 16.04 LTS, and Debian 9 Stretch. At the time I wrote this article, the latest stable release of Golang was Golang 1.8.3.

Prerequisites

  • A Vultr CentOS 7, Ubuntu 16.04 LTS, or Debian 9 Stretch linux server instance.
  • A sudo user.

Step 1: Download and decompress the Golang 1.8.3 archive

For 64-bit Linux operating systems

If you are using a 64-bit Linux operating system, including CentOS 7 x64, Ubuntu 16.04 amd64, and Debian 9 amd64, you need to download the 64-bit version of Golang as below:

cd
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
sudo tar -zxvf go1.8.3.linux-amd64.tar.gz -C /usr/local

For 32-bit Linux operating systems

If you are using a 32-bit Linux operating system, including Ubuntu 16.04 i386 and Debian 9 i386, you need to download the 32-bit version of Golang as below:

cd
wget https://storage.googleapis.com/golang/go1.8.3.linux-386.tar.gz
sudo tar -zxvf go1.8.3.linux-386.tar.gz -C /usr/local

Note: You can always find the download link to the latest release of Golang on the official download page.

Step 2: Setup GOROOT and PATH environment variables:

echo 'export GOROOT=/usr/local/go' | sudo tee -a /etc/profile
echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee -a /etc/profile
source /etc/profile

Step 3: Test the installation

go version
go env

In addition, you can write a simple Golang program and give it a shot:

cd
mkdir -p src/hello
cd src/hello
vi hello.go

Populate the file ~/src/hello/hello.go with the following code segment:

package main

import "fmt"

func main() {
    fmt.Printf("hello, world/n")
}

Save and quit:

:wq!

Finally, run your first Golang program as follows:

go run hello.go

If everything was done correctly, you will see the output:

hello world

This concludes my tutorial. Thanks for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Reader Self 3.5 RSS Reader on a Debian 9 LAMP VPS

Next Post

How to Setup Two-Factor Authentication (2FA) for SSH on Debian 9 Using Google Authenticator

Next Post

How to Setup Two-Factor Authentication (2FA) for SSH on Debian 9 Using Google Authenticator

Leave a Reply Cancel reply

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

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet