Skip to content

Instantly share code, notes, and snippets.

@Asuforce
Created March 8, 2023 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Asuforce/db3603ea4fe70b2dc10c2c2214214b83 to your computer and use it in GitHub Desktop.
Save Asuforce/db3603ea4fe70b2dc10c2c2214214b83 to your computer and use it in GitHub Desktop.

Centos7 で go

ref: CentOS 7にyumでGoを入れてHello Worldするまで - Qiita

go のインストール

$ export LC_ALL=C

$ sudo yum update -y

$ sudo yum install -y epel-release

$ sudo yum install -y golang

GOPATH の設定

$ mkdir dev

$ vi ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

export GOPATH=~/dev

export PATH=$GOPATH/bin:$PATH:$HOME/.local/bin:$HOME/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment