IPFS: InterPlanetary File System ipfs )Is a network transport protocol designed to create persistent and distributed storage and shared files. This technology is a content addressable peer-to-peer hypermedia distribution protocol. The nodes in the IPFS network will form a distributed file system.

Principle: IPfs uploads resources (pictures, videos, etc.) through anyone. Resources will not be stored in their own servers, but stored in the IPFS interstellar file system, and will be converted into a hash value. Once they are spread, even if the platform you upload is closed, you can find the videos you upload according to the hash value. The more people download, the more resource nodes will be, The faster the download speed. The storage space is unlimited, but the key is free. An important difference between IPFS and traditional file systems is content addressing. In comparison, content addressed ipfs has a natural advantage—— Tamper proof As long as a bit of data is modified, its address will change completely, while the hash value of identical files will be the same. If you want to hide the truth by modifying files, the difficulty will increase sharply.

1. Hands on teaching to build ipfs services (based on centos7)

Environmental Science:
CentOS Linux release 7.3.1611、xshell、xftp

1) Download the go ipfs program at: https://dist.ipfs.io/#go -ipfs
 Ipfs - build a decentralized distributed storage and file sharing platform

2) Log in to the Linux system as root, and upload the file ipfs program to Linux using xftp.
Execute the following commands in sequence:
tar zxvf go-ipfs_v0.4.18_linux-amd64.tar.gz
cd go-ipfs
./install.sh
/usr/local/bin/ipfs init
nohup /usr/local/bin/ipfs daemon &

At this point, you can access 127.0.0.1:5001/webui It's time for the interface.
Note: Under normal circumstances, port 5001 is not open, and the default configuration file is 127.0.0.7:5001/webui Can be accessed. If there is a graphical interface that can be accessed locally with the browser, I will use tunnel penetration to access locally, as shown in the following figure (click xshell top navigation - View - Tunnel pane tick - bottom transfer rule right click to add, as shown in the following figure):
 Ipfs - build a decentralized distributed storage and file sharing platform

3) Access Local http://localhost:5001/webui You can see the interface~
 Ipfs - build a decentralized distributed storage and file sharing platform

4) At this point, you can upload files through the interface, or through Ipfs add file Add. A hash value will be generated if the addition is successful.
 Ipfs - build a decentralized distributed storage and file sharing platform

5) You can also share files through this hash value. After all nodes in the world are synchronized, even if your server stops, it will always be saved on the Internet~
For example, this image is permanently saved in ipfs: https://ipfs.io/ipfs/QmRAwyo9DQrYDDQkmCo6gPX3g81qBfx9EXfc1CYWiotBqD

 Ipfs - build a decentralized distributed storage and file sharing platform

6) At present, there are more than 100 IPFS nodes in the country. Go and try it now
 Ipfs - build a decentralized distributed storage and file sharing platform

2. Collection of some classic ipfs applications

1) Decentralized film sharing: https://ipfstube.erindachtler.me/
Test movie hash value

 Mysterious superstar: QmWBbKvLhVnkryKG6F5YdkcnoVahwD7Qi3CeJeZgM6Tq68 Fanghua: QmYVri7jyBdPyfR8AgBLTgyTjiJifCgpeHFiFrKxowQeq8 Great Buddha Plath: QmdpR9iP9EhUg1rmduHqwA4ddyHNMcsR8t9saXA9BmMU4t Invisible guests: QmYWwXkgjdhMps9mB6DyEp4zSFmDQ9U6SuqGRGovEycr49 Go forward: QmZRJevYhADpXmCGGF6eCcP1afNEYFahDW5jxje3iyyCJS Dark time: QmUPvs7iyM5ZWPQwDovRqvNzxMJHSUWNRWAWRkAsseVcvs Blade Killer 2049: QmcUHdzKgRrcJrD5AH46HgBHF7urWDhmAnLKYwcHaLgeGP Inception: QmQATmpxXvSiQgt9c9idz9k3S3gQnh7wYj4DbdMQ9VGyLh Lion King: QmfHGQZNQNymHDC6b7TZjgGbh962VWQQN5oV92w9jHE4qt Nineteen generation ancestors: QmbrwEH4AEQhUN929yPy4j5B2PfQYk3JJyG8iq7HVoXbia Crazy Animal City: QmUKaQwN2ppapUEFhbHsKoVXn2yBRM7mLpu5HQv9am7dB7 Painted Heart World: QmXg1c6qPtoQAyfrXrWnuDrUgFehnt4kLvv1hxheMUeFBC Shawshank Redemption: QmRUYeMkvirV4frGX8wcntCq6x5GqDixAjZnFj5Jg1E3qj Space passenger: QmdxpUVnvFNert9nmEkzwwz2tWdavU3fUQzrgBsTZP5yyG

2) Decentralized uploading pictures: http://ipfs.pics/

3) More waiting for your discovery, welcome to comment

Reference link:
https://ipfs.io/
https://www.youtube.com/watch?v=8CMxDNuuAiQ
https://blog.csdn.net/ns2250225/article/details/79277929
https://blog.csdn.net/qq_27516777/article/details/79522997

Common ipfs commands are attached:

 ipfs init Initialize the configuration of ipfs, and get the local ipfs node id, that is, a string of hash strings; Ipfs cat/ipfs/node id/readme Download the readme file and display its contents in the command prompt window ipfs daemon Start the node, and the command prompt window is locked ipfs add File upload ipfs add example.jpg Upload file ipfs add –r dirpath Upload folder ipfs repo gc Batch cleaning local node content ipfs pin rm HASH Delete Cache ipfs block rm HASH Delete Binary Block ipfs pin add ipfs/HASH Add pin ipfs pin rm ipfs/HASH Delete pin ipfs pin ls ipfs/HASH View pin information
Article Contents