DEV Community

loading...

Configuring IPFS in linux based os

azwyane
EXIT_SUCCESS
Originally published at altechnep.blogspot.com on ・2 min read

The InterPlanetary File System (IPFS) is a protocol and peer-to-peer network for storing and sharing data in a distributed file system and it uses content-addressing to uniquely identify each file in a global namespace connecting all computing devices. IPFS allows users to not only receive but host content, in a similar manner to BitTorrent. As opposed to a centrally located server, IPFS is built around a decentralized system of user-operators who hold a portion of the overall data, creating a resilient system of file storage and sharing. Any user in the network can serve a file by its content address, and other peers in the network can find and request that content from any node who has it using a distributed hash table (DHT). source:wikipedia

I assume that you are cleared with what a IFPS is. For those seeking distributed network system for sharing and receiving files and growing organization locally, building dApps, and making Internet a better place as it used to be, before the tech giants took power and ran centralized. Internet and its resources is equal for every person in this world.

Here, I would be teaching you how to configure and you must consider I am proceeding using:

* Installing Golang

* Having a debian based linux distro

INSTALLING GOLANG:

At first, you must install go in your working device. Visit the siteGO to download the archive and

extract it into /usr/local, creating a Go tree in /usr/local/go.

For example:

tar -C /usr/local -xzf go1.13.1.linux-amd64.tar.gz
Enter fullscreen mode Exit fullscreen mode

Note: Needs running sudo.

Now, we need to add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin
Enter fullscreen mode Exit fullscreen mode

Apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.

Next, make the directory src/hello inside your workspace, and in that directory create a file named hello.go that looks like:

package main

import "fmt"

func main() {
 fmt.Printf("hello, world\n")
}
Enter fullscreen mode Exit fullscreen mode

Then build it with the go tool:

$ cd $HOME/go/src/hello
$ go build
Enter fullscreen mode Exit fullscreen mode

The command above will build an executable named hello in the directory alongside your source code. Execute it to see the greeting:

$ ./hello
hello, world
Enter fullscreen mode Exit fullscreen mode

If you see the "hello, world" message then your Go installation is working.

Source:Golang

Next process is all about installing IPFS, goto my next blog here .

Discussion (0)