DEV Community

D
D

Posted on

1 3

DigitalOcean(CentOS)にGoインストール

今更だけど、DigitalOceanサーバーにGoインストールした。

$ cd /usr/local/src/
$ sudo wget https://storage.googleapis.com/golang/go1.3.1.linux-amd64.tar.gz
$ sudo tar -xzf go1.3.1.linux-amd64.tar.gz 
$ sudo mv go /usr/local/ 
$ vim ~/.bashrc 
export PATH=$PATH:/usr/local/go/bin 

$ source ~/.bashrc
$ go version
go version go1.3.1 linux/amd64

$ cd 
$ mkdir go
$ cd go
$ vim hello.go
package main
import "fmt"
func main() {
    fmt.Printf("hello world\n")
}
$ go run hello.go
hello world
$ exit
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay