Setup GO Language in Linux and test run


Bellow is the process for setting up GO Language in centos 7 or ubuntu 18.04

Download package

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

extract binary

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

setup path

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

set permanent path in user profile

$ vim ~/.bash_profile

create environment directory

$ mkdir ~/go

create a test programm

$ mkdir ~/go/src/hello -p

$ cd go/src/hello/

$ vim hello.go
--
package main

import "fmt"

func main() {
    fmt.Printf("Hello, World\n")
}
--

$ go build
 $ ./hello


Comments

Popular posts from this blog

Running web ssh client on port 443 /80 with nginx as reverse proxy

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

Setup VOD streaming server with nginx using RTMP on Ubuntu 18.04