Skip to content

Commit

Permalink
Update blog: katacontainer-docker-k8s.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lingxiankong committed Oct 29, 2018
1 parent 70e6083 commit 9de5879
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 112 deletions.
7 changes: 4 additions & 3 deletions _posts/技术/2016-12-20-go-note.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ export GOPATH=$HOME/go # GOPATH 目录用于存放src/bin/pkg,从1.8版本开
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin/
EOF
# 到 https://golang.org/dl/ 查看版本
source ~/.bashrc && cd /opt && wget https://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz
tar xzf go1.10.linux-amd64.tar.gz && rm -f go1.10.linux-amd64.tar.gz
version=1.10.4
source ~/.bashrc && cd /opt && wget https://storage.googleapis.com/golang/go${version}.linux-amd64.tar.gz
tar xzf go${version}.linux-amd64.tar.gz && rm -f go${version}.linux-amd64.tar.gz
# 我执行了这一步,不知道是不是必须的,有个文档说Go 的工具链是用 C 语言编写的,因此在安装 Go 之前你需要先安装相关的 C 工具
apt-get install -y bison ed gawk gcc libc6-dev make
cd -
Expand All @@ -65,7 +66,7 @@ cd -
安装脚本:

```shell
curl -sS https://gist.githubusercontent.com/lingxiankong/ad724e785abd133632cc604210b45659/raw/7e2779d805725d62e4fd8c6c92a56687e343b7df/install_go.sh -o ~/install_go.sh && bash ~/install_go.sh && source ~/.bashrc
curl -sS https://gist.githubusercontent.com/lingxiankong/ad724e785abd133632cc604210b45659/raw/1175822ebcb8c4d2467aafd8171790488502643e/install_go.sh -o ~/install_go.sh && bash ~/install_go.sh 1.10.4 && source ~/.bashrc
```

安装完毕,就这么简单。然后就可以编写Go代码了。一个最简单的hello world如下:
Expand Down
Loading

0 comments on commit 9de5879

Please sign in to comment.