centos install go

https://golang.org/doc/install

一键安装

https://jamesnbr.wordpress.com/2017/10/18/golang-1-9-1-install-on-centos-7/

https://5wire.co.uk/install-go-golang-1-9-centos-7/

 

git clone https://github.com/jamesarems/gocentos.git
cd gocentos
sh InstallGO.sh
source /etc/profile
go get -u github.com/golang/dep/cmd/dep
echo 'GOROOT=`go env |grep "GOROOT" |cut -d "=" -f2`
GOROOT=${GOROOT#\"}
GOROOT=${GOROOT%\"}
echo $GOROOT

GOPATH=`go env |grep GOPATH |cut -d "=" -f 2`
GOPATH=${GOPATH%\"}
GOPATH=${GOPATH#\"}
echo $GOPATH
declare -x GOROOT
declare -x GOPATH
export PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin' >> ~/.bashrc


source ~/.bashrc
echo $GOPATH
go get github.com/ksonnet/ksonnet
 
cd $GOPATH/src/github.com/ksonnet/ksonnet
make install
export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
ks init my-kubeflow

 

posted @ 2018-05-07 21:56  lvmxh  阅读(221)  评论(0编辑  收藏  举报