How to set up an Ethereum Geth node on Linux

This article will help you to set up an Ethereum Geth node on a Linux machine. We worked on Ubuntu 18.04, and Geth for this article, but the instruction should be similar for any other version.

How to set up an Ethereum Geth node on Linux

As long as Ethereum blockchain will work on PoW algorithm and support mining, it is never too late to set up or upgrade your node.

Welcome members of the Ethereum community!

This article will help you to set up an Ethereum Geth node on a Linux machine. We worked on Ubuntu 18.04, and Geth for this article, but the instruction should be similar for any other version.

Why run a Geth node

Go Ethereum a.k.a Geth is one of the three original implementations of the Ethereum protocol which is written in Go language. It can be installed on all major operating systems.

Recently, Parity announced unwinding support to its Ethereum client. This is more of a reason for those who have already been associated with Ethereum, to continue support by switching to a Geth node.

Purpose

  • Contract deployment
  • Asset transfer
  • Interact with historical data of chain

Setup instructions

Latest version of geth require golang version version 1.10 or later. Lets install golang through some simple steps.

Step 1:- Download the latest version of golang in any directory you like as shown below

 wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz

Step 2:- untar it in the location where you want to install, I am installing it in home directory as shown below

tar -C ~ -xvzf go1.13.5.linux-amd64.tar.gz

Step 3:- Set root directory of golang installtion...

export GOROOT=~/go

Step 4:- Set path as below

export PATH=$GOROOT/bin:$PATH

Step 5:- Clone latest version of geth from git repo

git clone https://github.com/ethereum/go-ethereum.git

Step 6:- Before building geth , lets install the dependency

sudo apt-get install -y build-essential

Step 7:- Now build geth

cd go-ethereum
make geth

Step 8:- Check for sucessfull build...

cd go-ethereum/build/bin
geth help

geth-sucesss

Step 9:- Start geth node

cd go-ethereum/build/bin
geth --datadir=~/gethdata

geth-stratgeth-strat-1

Sync modes

  • Full node: Downloads all blocks (including headers, transactions and receipts) and generates the state of the blockchain incrementally by executing every block.
geth --datadir=~/gethdata --syncmode full

full-node

  • Fast node (Default): Downloads all blocks (including headers, transactions and receipts), verifies all headers, and downloads the state and verifies it against the headers.
geth --datadir=~/gethdata --syncmode fast

fast-node

  • Light node: Downloads all block headers, block data, and verifies some randomly.
geth --datadir=~/gethdata --syncmode light

light-node

You've successfully set up a Geth node on your machine.

____________________________________________________________________________________________________

Disclaimer: The information contained on this web page does NOT constitute financial advice or a solicitation to buy or sell any cryptocurrency contract or securities of any type. Trading is a high-risk activity. Readers are suggested to conduct own research, review, analyze and verify the content before relying on them.

To publish press releases, project updates and guest posts with us, please email at contact@etherworld.co.

Subscribe and follow us at Twitter, Facebook and LinkedIn

____________________________________________________________________________________________________


Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to EtherWorld.co
Great! Next, complete checkout for full access to EtherWorld.co
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.