1. IPFS installation and demo
IPFS is Interplanetary File System which might be going to replace Http protocol. In order to build
Decentralized applications , it is important we use this kind of file system.
Traditional websites use 'http' protocol to interact with internet,IPFS is a new protocal designed to
store and sharefiles in decentralized method.
decentralization means there is no company or central authority in control of what is being published.
How to install IPFS
1.Download the tar file from the link
https://dist.ipfs.io/go-ipfs/v0.4.11/go-ipfs_v0.4.11_linux-amd64.tar.gz
https://dist.ipfs.io/#go-ipfs
2 Extract the file to a folder using tools Archive Manager . Or use tar -xvf and gunzip commands
2. IPFS installation and demo
3 Open a terminal and type the below command after going to extracted folder
sudo mv ipfs /usr/local/bin/ipfs
$PATH variable should have the above folder to execute the ipfs command
4 Use the below command to add an image to IPFS. You should specify the path of the
image or go to folder of the image an type below command
$ipfs add -r img1.jpg
added QmXy8CBMsoYHH1cocMfgkoAfTG7YnbJGbdiZhxzCBxJreU img1.jpg
3. IPFS installation and demo
5 Use the below command to add an image to IPFS. You should specify the path of the
image or go to folder of the image an type below command
$ipfs add -r img1.jpg
added QmXy8CBMsoYHH1cocMfgkoAfTG7YnbJGbdiZhxzCBxJreU img1.jpg
6 Start ipfs daemon
$ipfs daemon
7 Copy the hash value generated from step5 for the image and type in the browser as
below
http://localhost:8080/ipfs/QmXy8CBMsoYHH1cocMfgkoAfTG7YnbJGbdiZhxzCBxJreU
you will see the image loaded in ipfs