Installation and use of IPFS

download

1. Open the official website

Open official website: https: //ipfs.io/, click [Try it].Said insert pictures where

2. Go to next page

Click [install IPFS].
Here Insert Picture Description

3.点击[Download IPFS for your platform]

Here Insert Picture Description

4. Select Version

If it is windows 64 bit Click [Download go-ipfs]. If it is other operations, see the following alternatives (demonstration of windows 64 bits).
Here Insert Picture Description

5. decompression

Once downloaded, unzip to the directory stored in thought (demo as F: \ go-ipfs).
Here Insert Picture Description

installation

1. Open cmd, enter the file directory IPFS

Here Insert Picture Description

2. Type dir to view the directory information

Here Insert Picture Description

3. Initialize the network environment ipfs

Enter ipfs init start initialization ipfs network environment, and the system will allocate a part of your own IPFS network hash value (similar to an identity card ID in your IPFS network). With this ID, others can have access to your node.
Here Insert Picture Description

4. Install

Enter acquire the above content: Ipfs cat / ipfs / QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv / readme
Here Insert Picture Description
appear above, the installation was successful.

5.IPFS installation default configuration

The default configuration IPFS installation will be stored in your user folder under the root directory (C: \ Users \ ASUS.ipfs) folder name .ipfs, Next, open the config, there are some basic configuration data ipfs, we can according to their own the necessity of modifying the configuration inside.
Here Insert Picture Description

run

1. Enter ipfs daemon start listening service IPFS

IPFS object is used to monitor network traffic data, listening port 5001 is used. Note To on and stays on, listening to the daemon.
Here Insert Picture Description
(Close: Ctrl + C)

2. Try to perform some basic commands

另开一个cmd,同样进入ipfs目录,试着执行一些基础命令。输入ipfs help,获取一些常用的命令。
Here Insert Picture Description
输入ipfs id,可以查看你的通信ID信息。
Here Insert Picture Description
输入ipfs config show,可以查看配置信息。
Here Insert Picture Description
输入ipfs swarm peers,可以查看附近也在使用IPFS网络节点伙伴,如果列出有数据说明你并不是一个人在使用IPFS网络。
Here Insert Picture Description

3.尝试调用一个ipfs网络中的文件

输入:ipfs cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg >cat.jpg
Here Insert Picture Description
在目录中获取到一张图片。

4.尝试上传一个文件

在目录下新建一个记事本。
Here Insert Picture Description
在cmd中输入命令ipfs add test.txt,显示如下,说明该文件已经加入到了我的ipfs节点中,并声成了test.txt这个文件的唯一哈希值。
Here Insert Picture Description
输入:ipfs cat QmP8bF8FfqH677AEaX9TaMkcUibGBRPsyPuDmmgUSLkQdK
Here Insert Picture Description

5.可视化界面

IPFS网络状态保持开启,此时浏览器输入http://localhost:5001/webui 你可以看到一个漂亮的可视化IPFS管理界面,里面可以做一些基础的资源获取查看操作。
Here Insert Picture Description
在可视化界面中上传文件:点击[文件],点击[+添加到IPFS],点击[添加文件],选中刚刚的test.txt文件。
Here Insert Picture Description
上传成功。
Here Insert Picture Description

发布了11 篇原创文章 · 获赞 13 · 访问量 2865

Guess you like

Origin blog.csdn.net/lhx0525/article/details/103528680