linux环境golang安装-beego框架搭建
作者:admin 发布时间:May 9, 2018 分类:Others No Comments
安装golang
1、先安装 EPEL 源:
yum install epel -y
2、然后使用 源码 安装 Golang:
wget https://www.golangtc.com/static/go/1.9.2/go1.9.2.linux-amd64.tar.gz
3、环境变量:
在 /etc/profile 添加:
export GOPATH=/data/web/go
export GOBIN=$GOPATH/bin
export GOPKG=$GOROOT/pkg/tool/linux_amd64
export GOARCH=amd64
export GOOS=linux
export PATH=$PATH:/usr/local/go/bin
然后执行 source /etc/profile 使之生效。