This tutorial is part of a series of articles introduced here.

In part 1, we have installed Ethereum on the RPi.

In this tutorial, we will describe the steps to install Ethereum on your computer.

Installing Geth on a computer is quite straightforward. The installation instructions are available for different target platforms, including Linux, Windows and Mac. You can find them right here.

Here below, we describe all the steps to set up Geth on a Mac, as it is the most common configuration amongst developers.

NB: It is important that what we mean by “private Ethereum blockchain” in this context has absolutely nothing to do with the “private blockchain” championed by Hyperledger, Eris/Monax, or the recently announced Enterprise Ethereum Alliance. These are different codebases with different client applications, so they correspond to different implementations of a different set of concepts. They are private in the sense that they limit who has access to their chain. They are also called permissioned blockchains, and to be perfectly transparent, we wish they were not even called blockchains at all. In this series of articles, what we call “private blockchain” is a private instance of the Ethereum implementation. Same code base, same client application, different network identifier and genesis block. In other words, what we will come to create in this series is a chain with the same rules as the main chain, the same consensus algorithm too, but a different root block. This will become clearer in part 3. For more information about the 3-layer model and differences between concepts, implementations and instances, you can also watch our Devoxx talk and read this article.

Step 1 – Homebrew

Homebrew is a package manager that you should install on your computer:

computer$ brew --version

If Homebrew is not installed on your computer, install it using the following command:

computer$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 2 – Install Geth

In this step, we install the Go implementation of Ethereum protocol (Geth).

Geth can be installed with the following commands:

computer$ brew update
computer$ brew tap ethereum/ethereum
computer$ brew install ethereum

Check the version of Geth using:

computer$ geth version
Geth
Version: 1.5.7-stable
Git Commit: da2a22c384a9b621ec853fe4b1aa651d606cf42b
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.7.5
OS: darwin
GOPATH=
GOROOT=/usr/local/Cellar/go/1.7.5/libexec

Ensure that the version of Geth is the same as the one installed on your RPi. If not, upgrade your nodes.

Step 2.1 – Update Geth

If Geth was already installed on your computer, update it to the latest version:

computer$ brew update
computer$ brew upgrade ethereum

If you have trouble to update Geth, use the following commands to force the update:

computer$ brew tap ethereum/ethereum
computer$ brew unlink ethereum
computer$ brew install ethereum

Check the version of Geth:

computer$ geth version
Geth
Version: 1.5.7-stable
Git Commit: da2a22c384a9b621ec853fe4b1aa651d606cf42b
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.7.5
OS: darwin
GOPATH=
GOROOT=/usr/local/Cellar/go/1.7.5/libexec

Step 3 – Run Geth

Start Geth using the following command:

computer$ geth
I1217 19:38:35.080348 ethdb/database.go:83] Allotted 128MB cache and 1024 file handles to /Users/eloudsa/Library/Ethereum/chaindata
...
I1217 19:38:35.492125 p2p/server.go:342] Starting Server
...
I1217 19:38:47.719187 eth/downloader/downloader.go:326] Block synchronisation started
...

When you start Geth like that, without any command line argument, it immediately starts synchronizing with the main chain, which takes several days.

Press CTRL-C to stop the Ethereum server.

Summary

At this stage, Ethereum is installed on your computer and able to synchronise with the live chain (mainnet).

The blockchain (chaindata) is located right here:

  • Mac: ~/Library/Ethereum/chaindata
  • Windows: %APPDATA%\Ethereum
  • Linux: ~/.ethereum

Your accounts will be stored in a wallet located in this folder:

  • Mac: ~/Library/Ethereum/chaindata/keystore
  • Windows: %APPDATA%\Ethereum\keystore
  • Linux: ~/.ethereum/keystore

Congratulations! Your computer is an Ethereum node.

Part 3 describes how to setup a private chain and a miner node.

Said Eloudrhiri