Note

If you are new to the blockchain technology, taking our Introduction to Blockchain Technology self-paced course is highly recommended. Also, for a comprehensive coverage of blockchain development in Ethereum or mastering Solidity programming, taking our below self paced courses is highly recommended:

Recap

In our previous article (How Ethereum IPFS Storage Works), we discussed Ethereum IPFS distributed storage.

In this article, we learn how to install and start Ethereum IPFS storage.

Installing IPFS

To start using IPFS, we need to install it. We will use a Unix environment for our IPFS example. The tools will allow us to upload and view the content on the IPFS network:

1. First, we will install go. Afterward, we get the latest security updates. Then, we will extract the files after downloading them. Finally, we will move the package to the /usr/local directory:

apt-get update
  apt-get install  build-essential
  wget  https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz sudo tar -xvf go1.12.6.linux-amd64.tar.gz
  sudo  mv go /usr/local

2. For IPFS to work properly, we need to set up the Go software environment variables. Create a file called /etc/profile.d/go.sh. Add the following Go software environment variables to the file:

#/bin/bash
  export GOROOT=/usr/local/go export  GOPATH=$GOROOT/work
  export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

 

3. Reboot Ubuntu using the following command and verify whether go has installed successfully:

reboot
go version

You should see the go version output in the console.

4. To install ipfs, you may need to log in as an admin user by running sudo -i. Then, run the following command to install IPFS:

go get -u -d github.com/ipfs/go-ipfs cd $GOPATH/src/github.com/ipfs/go-ipfs make  install

Here is a screenshot that shows the output of the preceding command:

 Ethereum blockchain development in Infura

 

Once IPFS has been successfully installed, the output will show the version of go-ipfs- blockstore. In our installation, this is v0.0.1.

 

One-to-One Live Blockchain Classes

Coding Bootcamps school offers One-to-One Live Blockchain Classes for Beginners.

 

Starting an IPFS node

Once installed successfully, enter the ipfs init command to start your IPFS node. You will see your IPFS node ID:

 Ethereum blockchain development in Infura

 

Run the following command and the welcome page will be displayed:

  ipfs cat /ipfs/<nodeID>, the IPFS

This is what the welcome page will look like:

 Ethereum blockchain development in Infura

 

We now have the initial IPFS node. To start the IPFS service, run the following command:

  ipfs daemon

Here is the result of the preceding command:

 Ethereum blockchain development in Infura

Run the following command in a new Terminal to view the nodes in the network that we’re directly connected to:

 

ipfs swarm peers

Here is the resulting screen:

 Ethereum blockchain development in Infura

 

We have installed IPFS in our machine. Next, we will run a simple example so that you can see how we can use IPFS.

 

Next Article
In our next article (How to Run Ethereum IPFS Storage), we discuss how to run Ethereum IPFS storage.

This article is written in collaboration with Brian Wu who is a leading author of “Learn Ethereum: Build your own decentralized applications with Ethereum and smart contracts” book. He has written 7 books on blockchain development.

Resources

Free Webinars on Blockchain

Here is the list of our free webinars that are highly recommended:

 

Free Courses

Here is the list of our 10 free self-paced courses that are highly recommended:

 

Self-Paced Blockchain Courses

If you like to learn more about Hyperledger Fabric, Hyperledger Sawtooth, Ethereum or Corda, taking the following self-paced classes is highly recommended:

  1. Intro to Blockchain Technology
  2. Blockchain Management in Hyperledger for System Admins
  3. Hyperledger Fabric for Developers
  4. Intro to Blockchain Cybersecurity
  5. Learn Solidity Programming by Examples
  6. Introduction to Ethereum Blockchain Development
  7. Learn Blockchain Dev with Corda R3
  8. Intro to Hyperledger Sawtooth for System Admins

 

Live Blockchain Courses

If you want to master Hyperledger Fabric, Ethereum or Corda, taking the following live classes is highly recommended:

 

Articles and Tutorials on Blockchain Technology

If you like to learn more about blockchain technology and how it works, reading the following articles is highly recommended:

 

Articles and Tutorials on Ethereum and Solidity

If you like to learn more about blockchain development in Ethereum with Solidity, reading the following articles and tutorials is highly recommended:

 

Articles and Tutorials on Hyperledger Family

If you like to learn more about blockchain development with Hyperledger, reading the following articles and tutorials is highly recommended:

 

Articles and Tutorials on R3 Corda

If you like to learn more about blockchain development on Corda , reading the following articles and tutorials is highly recommended:

 

Articles and Tutorials on Other Blockchain Platforms

If you like to learn more about blockchain development in other platforms, reading the following articles and tutorials is highly recommended: