2015-01-24 02:25:24 +01:00
|
|
|
## Ubuntu (Kylin) 14.04
|
2014-11-30 22:55:10 +01:00
|
|
|
### Build Dependencies
|
2015-05-28 02:43:39 +02:00
|
|
|
This installation document assumes Ubuntu 14.04+ on x86-64 platform.
|
2014-11-30 22:55:10 +01:00
|
|
|
|
2015-10-16 20:26:01 +02:00
|
|
|
##### Install Git, GCC
|
2014-12-04 10:56:01 +01:00
|
|
|
```sh
|
2015-10-16 20:26:01 +02:00
|
|
|
$ sudo apt-get install git build-essential
|
2014-11-30 22:55:10 +01:00
|
|
|
```
|
|
|
|
|
2015-08-23 03:34:00 +02:00
|
|
|
##### Install Go 1.5+
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-08-23 03:34:00 +02:00
|
|
|
Download Go 1.5+ from [https://golang.org/dl/](https://golang.org/dl/).
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02:00
|
|
|
```sh
|
2015-09-10 01:02:13 +02:00
|
|
|
$ wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
|
2015-05-28 02:43:39 +02:00
|
|
|
$ mkdir -p ${HOME}/bin/
|
|
|
|
$ mkdir -p ${HOME}/go/
|
2015-09-10 01:02:13 +02:00
|
|
|
$ tar -C ${HOME}/bin/ -xzf go1.5.1.linux-amd64.tar.gz
|
2015-05-28 02:43:39 +02:00
|
|
|
```
|
|
|
|
##### Setup GOROOT and GOPATH
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02: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-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02:00
|
|
|
```sh
|
|
|
|
$ export GOROOT=${HOME}/bin/go
|
|
|
|
$ export GOPATH=${HOME}/go
|
|
|
|
$ export PATH=$PATH:${HOME}/bin/go/bin:${GOPATH}/bin
|
2015-01-24 02:25:24 +01:00
|
|
|
```
|
|
|
|
|
2015-05-28 02:43:39 +02:00
|
|
|
## OS X (Yosemite) 10.10
|
2015-01-24 02:25:24 +01:00
|
|
|
### Build Dependencies
|
2015-05-28 02:43:39 +02:00
|
|
|
This installation document assumes OS X Yosemite 10.10+ on x86-64 platform.
|
2015-01-24 02:25:24 +01:00
|
|
|
|
|
|
|
##### Install brew
|
|
|
|
```sh
|
|
|
|
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
|
|
```
|
|
|
|
|
2015-04-11 06:18:35 +02:00
|
|
|
##### Install Git, Python
|
2015-01-24 02:25:24 +01:00
|
|
|
```sh
|
2015-10-16 20:26:01 +02:00
|
|
|
$ brew install git python
|
2015-01-24 02:25:24 +01:00
|
|
|
```
|
|
|
|
|
2015-08-23 03:34:00 +02:00
|
|
|
##### Install Go 1.5+
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02:00
|
|
|
Install golang binaries using `brew`
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02:00
|
|
|
```sh
|
2015-01-24 02:25:24 +01:00
|
|
|
$ brew install go
|
2015-05-28 02:43:39 +02:00
|
|
|
$ mkdir -p $HOME/go
|
|
|
|
```
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02:00
|
|
|
##### Setup GOROOT and GOPATH
|
2015-01-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02: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-24 02:25:24 +01:00
|
|
|
|
2015-05-28 02:43:39 +02: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 22:55:10 +01:00
|
|
|
```
|