centos下安装golang(1.9)教程,centosgolang
golang1.5以后实现了自编译,也就是用golang开发golang。因此在安装新版本的golang时需要先安装一个golang1.4版本
解压操作都是在~/目录下操作
安装golang1.4
wget https://storage.googleapis.com/golang/go1.4-bootstrap-20170531.tar.gz tar -xf go1.4-bootstrap-20170531.tar.gz cd go/src ./make.bash 成功后信息 Installed Go for linux/amd64 in /home/test/go Installed commands in /home/test/go/bin cd ~/ mv go go1.4
安装golang1.9
wget https://storage.googleapis.com/golang/go1.9.src.tar.gz tar -xf go1.9.src.tar.gz cd go/src ./all.bash cd ~/ mv go /usr/local/go1.9 sudo vim /etc/profile export PATH=$PATH:/usr/local/go1.9/bin source /etc/profile go version