2015-01-23 20:25:24 -05:00
|
|
|
## Ubuntu (Kylin) 14.04
|
2014-11-30 16:55:10 -05:00
|
|
|
### Build Dependencies
|
2015-05-27 20:43:39 -04:00
|
|
|
This installation document assumes Ubuntu 14.04+ on x86-64 platform.
|
2014-11-30 16:55:10 -05:00
|
|
|
|
2015-05-27 20:51:20 -04:00
|
|
|
##### Install Git, GCC, yasm
|
2014-12-04 04:56:01 -05:00
|
|
|
```sh
|
2015-05-27 20:51:20 -04:00
|
|
|
$ sudo apt-get install git build-essential yasm
|
2014-11-30 16:55:10 -05:00
|
|
|
```
|
|
|
|
|
2015-08-22 21:34:00 -04:00
|
|
|
##### Install Go 1.5+
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-08-22 21:34:00 -04:00
|
|
|
Download Go 1.5+ from [https://golang.org/dl/](https://golang.org/dl/).
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
```sh
|
2015-09-09 19:02:13 -04:00
|
|
|
$ wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
|
2015-05-27 20:43:39 -04:00
|
|
|
$ mkdir -p ${HOME}/bin/
|
|
|
|
$ mkdir -p ${HOME}/go/
|
2015-09-09 19:02:13 -04:00
|
|
|
$ tar -C ${HOME}/bin/ -xzf go1.5.1.linux-amd64.tar.gz
|
2015-05-27 20:43:39 -04:00
|
|
|
```
|
|
|
|
##### Setup GOROOT and GOPATH
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
Add the following exports to your ``~/.bashrc``. Environment variable GOROOT specifies the location of your golang binaries
|
|
|
|
and GOPATH specifies the location of your project workspace.
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
```sh
|
|
|
|
$ export GOROOT=${HOME}/bin/go
|
|
|
|
$ export GOPATH=${HOME}/go
|
|
|
|
$ export PATH=$PATH:${HOME}/bin/go/bin:${GOPATH}/bin
|
2015-01-23 20:25:24 -05:00
|
|
|
```
|
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
## OS X (Yosemite) 10.10
|
2015-01-23 20:25:24 -05:00
|
|
|
### Build Dependencies
|
2015-05-27 20:43:39 -04:00
|
|
|
This installation document assumes OS X Yosemite 10.10+ on x86-64 platform.
|
2015-01-23 20:25:24 -05:00
|
|
|
|
|
|
|
##### Install brew
|
|
|
|
```sh
|
|
|
|
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
|
|
```
|
|
|
|
|
2015-04-11 00:18:35 -04:00
|
|
|
##### Install Git, Python
|
2015-01-23 20:25:24 -05:00
|
|
|
```sh
|
2015-05-27 20:51:20 -04:00
|
|
|
$ brew install git python yasm
|
2015-01-23 20:25:24 -05:00
|
|
|
```
|
|
|
|
|
2015-08-22 21:34:00 -04:00
|
|
|
##### Install Go 1.5+
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
Install golang binaries using `brew`
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
```sh
|
2015-01-23 20:25:24 -05:00
|
|
|
$ brew install go
|
2015-05-27 20:43:39 -04:00
|
|
|
$ mkdir -p $HOME/go
|
|
|
|
```
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
##### Setup GOROOT and GOPATH
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
Add the following exports to your ``~/.bashrc``. Environment variable GOROOT specifies the location of your golang binaries
|
|
|
|
and GOPATH specifies the location of your project workspace.
|
2015-01-23 20:25:24 -05:00
|
|
|
|
2015-05-27 20:43:39 -04:00
|
|
|
```sh
|
|
|
|
$ export GOPATH=${HOME}/go
|
|
|
|
$ export GOVERSION=$(brew list go | head -n 1 | cut -d '/' -f 6)
|
|
|
|
$ export GOROOT=$(brew --prefix)/Cellar/go/${GOVERSION}/libexec
|
|
|
|
$ export PATH=$PATH:${GOPATH}/bin
|
2014-11-30 16:55:10 -05:00
|
|
|
```
|