差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
go [2016/08/17 12:43] jz |
go [2016/12/04 23:16] (目前版本) jz |
||
---|---|---|---|
行 19: | 行 19: | ||
<code bash> | <code bash> | ||
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -o gorvp.exe main.go | CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS=windows GOARCH=amd64 go build -o gorvp.exe main.go | ||
+ | </code> | ||
+ | |||
+ | ====== Install GO on CentOS ====== | ||
+ | |||
+ | ===== Binary ===== | ||
+ | |||
+ | <code bash> | ||
+ | wget https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz | ||
+ | tar -zxf go1.7.3.linux-amd64.tar.gz -C /usr/local/ | ||
+ | mkdir /Golang | ||
+ | </code> | ||
+ | |||
+ | <code bash> | ||
+ | vim /etc/profile | ||
+ | export GOROOT=/usr/local/go | ||
+ | export GOBIN=$GOROOT/bin | ||
+ | export GOPKG=$GOROOT/pkg/tool/linux_amd64 | ||
+ | export GOARCH=amd64 | ||
+ | export GOOS=linux | ||
+ | export PATH=$PATH:$GOBIN:$GOPKG | ||
+ | |||
+ | vim ~/.bash_profile | ||
+ | export GOPATH=/Golang | ||
+ | export PATH=$PATH:$GOPATH/bin | ||
+ | </code> | ||
+ | |||
+ | ==== YUM ==== | ||
+ | |||
+ | <code bash> | ||
+ | yum install epel -y | ||
+ | yum install go -y | ||
+ | |||
+ | vim ~/.bash_profile | ||
+ | export GOPATH=$HOME/go | ||
+ | export PATH=$PATH:$GOPATH/bin | ||
</code> | </code> |