1. 安装go包 tar -C /usr/local/ -xvf go1.11.4.linux-amd64.tar.gz 2.添加环境变量 vi /etc/profile export PATH=$PATH:/opt/go/bin (Go安装路径) export GOROOT=/opt/go(GO安装路径) PATH=$PATH:$GOROOT/bin 3.更新 source /etc/profile 4.验证 go env go version