First off I'm going to assume you have created a user with sudo
permissions, and that you're not running from root. I'm also assuming you have a satisfactory knowledge of the Linux terminal/bash commands.
If you have any trouble, join our OpenBazaar Slack group, and pop into the #openbazaar-ipfs
channel.
- In your terminal, type:
sudo nano install.sh
- Paste in the following script:
#!bin/bash
# README
# Give the script executable permissions by typing: sudo chmod +x install.sh
# Run the script: sudo bash install.sh
# Install Dependencies and Tools
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install git build-essential autoconf automake pkg-config libtool htop tree libssl-dev
# Install ZeroMQ
(cd /$HOME/; sudo git clone https://github.com/zeromq/libzmq)
(cd /$HOME/libzmq; sudo ./autogen.sh && sudo ./configure && sudo make -j 4)
(cd /$HOME/libzmq; sudo make check && sudo make install && sudo ldconfig)
# Install Golang
(cd /$HOME/; sudo wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz)
sudo mkdir /$HOME/golang
sudo mkdir /$HOME/go
(cd /$HOME/; sudo tar -C /$HOME/golang -xzf go1.6.2.linux-amd64.tar.gz)
export PATH=$PATH:/$HOME/golang/go/bin
echo $PATH
export GOPATH=/$HOME/go
export PATH=$PATH:$GOPATH/bin
echo $GOPATH
export GOROOT=/$HOME/golang/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
# Install and Run OpenBazaar-Go and Dependencies
go get github.com/OpenBazaar/openbazaar-go
(cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go; make toolkit_upgrade && make install)
(cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go; go run openbazaard.go start)
- Save and exit the file
- Now you need to give the script executable permissions:
sudo chmod +x install.sh
- Type:
sudo bash install.sh
- You'll be prompted to say 'yes' in a couple of places
- If the install script worked well, the OpenBazaar node should start at the end of the process
- To run OpenBazaar-Go, type in:
(cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go; go run openbazaard.go start)
- To make life easier, you can write another script to help you:
sudo nano run.sh
#!bin/bash
(cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go; go run openbazaard.go start)
- Don't forget to give this script executable permissions to:
sudo chmod +x run.sh
- To run the script:
sudo bash run.sh
- Any time you need to update your node, type:
(cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go; sudo git pull)
- Again, you can create a script:
sudo nano update.sh
#!bin/bash
(cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go; sudo git pull)
- Give executable permissions to the script:
sudo chmod +x update.sh
- To run the script:
sudo bash update.sh
Thanks for the writeup