前言
golang学习路径
更新历史
2020年06月17日 - 初稿
阅读原文 - https://wsgzao.github.io/post/golang/
安装 Go 运行环境
Getting Started
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| wget https://dl.google.com/go/go1.13.12.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.13.12.linux-amd64.tar.gz
vim /etc/profile export PATH=$PATH:/usr/local/go/bin
source /etc/profile
go version go version go1.13.12 linux/amd64
|
编译Codis
以Codis为例,官方步骤可能有坑
Codis 使用文档
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| yum install -y git gcc autoconf automake m4
vim /etc/profile export PATH=$PATH:/usr/local/go/bin export GOPATH=/usr/local/codis/gopath export PATH=$PATH:$GOPATH/bin
source /etc/profile
mkdir -p $GOPATH/src/github.com/CodisLabs cd $_ && git clone https://github.com/CodisLabs/codis.git -b release3.2
cd $GOPATH/src/github.com/CodisLabs/codis/extern/redis-3.2.11/deps make hiredis jemalloc linenoise lua geohash-int
cd $GOPATH/src/github.com/CodisLabs/codis make =============================================================================== go build -i -o bin/codis-dashboard ./cmd/dashboard go build -i -tags "cgo_jemalloc" -o bin/codis-proxy ./cmd/proxy go build -i -o bin/codis-admin ./cmd/admin go build -i -o bin/codis-ha ./cmd/ha go build -i -o bin/codis-fe ./cmd/fe
cat bin/version version = 2018-11-04 16:22:35 +0800 @de1ad026e329561c22e2a3035fbfe89dc7fef764 @3.2.2-12-gde1ad02 compile = 2020-06-17 06:39:48 -0400 by go version go1.13.12 linux/amd64
|
参考文章