Skip to content

Building and Installing Shift

Mike edited this page May 24, 2016 · 3 revisions

Building from source

Command line examples a provided for convenience have some bits specific to 64bit Linux on AMD64. Assuming installing into a non privileged user account using the bash shell and that git, wget and probably a few other packages (to be added to the list after trying from a clean install) have already been apt get installed.

Install dependancies

$ sudo apt-get install git wget

Golang

Install golang and ensure environment variables need for GO are set.

$ cd
 wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
    $ tar zxvf go1.6.2.linux-amd64.tar.gz
    $ export PATH="$HOME/go/bin:$PATH"
    $ export GOROOT="$HOME/go"

Godep

Install godep, first make a work directory

$ mkdir gowork
$ export GOPATH="$HOME/gowork"
$ go get  github.com/tools/godep

Building gshift

$ git clone  https://github.com/shiftcurrency/shift.git
$ cd shift
$ make
....
github.com/shiftcurrency/shift/rpc
github.com/shiftcurrency/shift/cmd/gshift
Done building.
Run "build/bin/gshift" to launch gshift.

Why not add it to the path?

$ export PATH="$HOME/shift/build/bin/gshift:$PATH"

Or add this bit to the end of your .profile

export PATH="$HOME/shift/build/bin/gshift:$HOME/go/bin:$PATH"
export GOROOT="$HOME/go"
export GOPATH="$HOME/gowork"

Running gshift

$ gshift`
I0522 04:36:28.022469   12444 flags.go:425] WARNING: No shiftbase set and no accounts found as default
I0522 04:36:28.022639   12444 database.go:71] Alloted 16MB cache to /home/shift/.gshift/chaindata
I0522 04:36:28.026500   12444 database.go:71] Alloted 16MB cache to /home/shift/.gshift/dapp
I0522 04:36:28.030441   12444 backend.go:314] Protocol Versions: [63 62 61], Network Id: 1
I0522 04:36:28.030513   12444 backend.go:362] Blockchain DB Version: 3
I0522 04:36:28.064296   12444 blockchain.go:164] WARNING: Wrote default shift genesis block
...

It works... probably you want to make an account or two for your shift first...