mkdir /opt/go
vim go_install.sh
wget -c https://storage.googleapis.com/golang/go1.3.1.linux-amd64.tar.gz tar -C /usr/local -xzf go1.3.1.linux-amd64.tar.gz cat >>/etc/profile<<EOF export PATH=$PATH:/usr/local/go/bin EOF source /etc/profile go version HOME = /home mkdir -p $HOME/go cat >>/$HOME/.profile<<EOF export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin EOF export GOROOT=$HOME/go export PATH=$PATH:$GOROOT/bin
#source go_install.sh //运行后,自动下载并安装
参考:http://www.iamle.com/archives/1648.html
在安装过程中,发现golang 1.3.1 版本需要内核 2.6.32 以上(包含)支持。不然会提示
FATAL: kernel too old