minio/INSTALLGO.md

85 lines
1.8 KiB
Markdown
Raw Normal View History

## 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
##### Install Git, GCC
2014-12-04 04:56:01 -05:00
```sh
$ sudo apt-get install git build-essential
2014-11-30 16:55:10 -05:00
```
##### Install Go 1.6+
Download Go 1.6+ from [https://golang.org/dl/](https://golang.org/dl/).
2015-05-27 20:43:39 -04:00
```sh
$ wget https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
2015-05-27 20:43:39 -04:00
$ mkdir -p ${HOME}/bin/
$ mkdir -p ${HOME}/go/
$ tar -C ${HOME}/bin/ -xzf go1.6.linux-amd64.tar.gz
2015-05-27 20:43:39 -04:00
```
##### Setup GOROOT and GOPATH
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-05-27 20:43:39 -04:00
```sh
export GOROOT=${HOME}/bin/go
export GOPATH=${HOME}/go
export PATH=${HOME}/bin/go/bin:${GOPATH}/bin:$PATH
```
##### Source the new enviornment
```sh
$ source ~/.bashrc
```
##### Testing it all
```sh
$ go env
```
2015-05-27 20:43:39 -04:00
## OS X (Yosemite) 10.10
### Build Dependencies
2015-05-27 20:43:39 -04:00
This installation document assumes OS X Yosemite 10.10+ on x86-64 platform.
##### Install brew
```sh
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
##### Install Git, Python
```sh
$ brew install git python
```
##### Install Go 1.6+
2015-05-27 20:43:39 -04:00
Install golang binaries using `brew`
2015-05-27 20:43:39 -04:00
```sh
$ brew install go
2015-05-27 20:43:39 -04:00
$ mkdir -p $HOME/go
```
2015-05-27 20:43:39 -04:00
##### Setup GOROOT and GOPATH
2015-10-28 18:43:45 -04:00
Add the following exports to your ``~/.bash_profile``. Environment variable GOROOT specifies the location of your golang binaries
2015-05-27 20:43:39 -04:00
and GOPATH specifies the location of your project workspace.
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=${GOPATH}/bin:$PATH
```
##### Source the new enviornment
```sh
$ source ~/.bash_profile
```
##### Testing it all
```sh
$ go env
2014-11-30 16:55:10 -05:00
```