1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7でGoを動かすシンプルな手順

Last updated at Posted at 2019-06-26

Go言語の Getting Started に従って進めます。

環境確認

CentOS7の情報を確認します。

$ cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
$ uname -m
x86_64

ダウンロード

アーカイブをダウンロードします。
Downloads

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

インストール

ダウンロードしたアーカイブを展開します。

$ sudo tar -C /usr/local -xzf ~/go1.12.6.linux-amd64.tar.gz

環境変数

環境変数にGoのパスを追加します。
export PATH=$PATH:/usr/local/go/bin

$ vim ~/.bashrc
$ source ~/.bashrc

動作確認

$ go version
go version go1.12.6 linux/amd64

以上です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?