centos安装go语言

发布于 2022-07-10  111 次阅读


wget https://dl.google.com/go/go1.18.3.linux-amd64.tar.gz
tar -zvxf go1.18.3.linux-amd64.tar.gz
mv ./go /usr/local
sudo vim /etc/profile

写入
export GOROOT=/usr/local/go
export GOPATH=/usr/share/nginx/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

 

source /etc/profile
go version   完成

子夜不哭
最后更新于 2022-07-10