vi /etc/profilefile
尾部添加vi
export GOROOT=/go
export GOBIN=$GOROOT/bin
export GOPATH=/root/GoProject
export PATH=$PATH:$GOBIN:$GOPATH