1, to obtain the corresponding download path, https: //studygolang.com/dl
cd /usr/local && wget https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz
3, decompression
tar xzvf go1. 12.7 linux-amd64. tar gz
the rm -rf go1127linux-amd64targz
4, set the environment variable
vim ~/.bashrc
#Add to
export GOROOT=/usr/local/go
export PATH=$GOROOT/bin:$PATH
export GOPATH=/data/wwwroot/go
export PATH=$PATH:$GOPATH/bin
#carried out
source ~/.bashrc
If the environment is the official server, set up is now complete. GO project is deployed simply upload files compiled up to
5, the installation beego
go get -u -v github.com/astaxie/beego
6, installation bee
go get -u -v github.com/beego/bee
7, test
1 cd $GOPATH/src 2 bee new go-project 3 cd go-project 4 bee run