Installation and use of IPFS
- download
- 1. Open the official website
- 2. Go to next page
- 3.点击[Download IPFS for your platform]
- 4. Select Version
- 5. decompression
- installation
- 1. Open cmd, enter the file directory IPFS
- 2. Type dir to view the directory information
- 3. Initialize the network environment ipfs
- 4. Install
- 5.IPFS installation default configuration
- run
download
1. Open the official website
Open official website: https: //ipfs.io/, click [Try it].
2. Go to next page
Click [install IPFS].
3.点击[Download IPFS for your platform]
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).
5. decompression
Once downloaded, unzip to the directory stored in thought (demo as F: \ go-ipfs).
installation
1. Open cmd, enter the file directory IPFS
2. Type dir to view the directory information
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.
4. Install
Enter acquire the above content: Ipfs cat / ipfs / QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv / readme
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.
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.
(Close: Ctrl + C)
2. Try to perform some basic commands
另开一个cmd,同样进入ipfs目录,试着执行一些基础命令。输入ipfs help,获取一些常用的命令。
输入ipfs id,可以查看你的通信ID信息。
输入ipfs config show,可以查看配置信息。
输入ipfs swarm peers,可以查看附近也在使用IPFS网络节点伙伴,如果列出有数据说明你并不是一个人在使用IPFS网络。
3.尝试调用一个ipfs网络中的文件
输入:ipfs cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg >cat.jpg
在目录中获取到一张图片。
4.尝试上传一个文件
在目录下新建一个记事本。
在cmd中输入命令ipfs add test.txt,显示如下,说明该文件已经加入到了我的ipfs节点中,并声成了test.txt这个文件的唯一哈希值。
输入:ipfs cat QmP8bF8FfqH677AEaX9TaMkcUibGBRPsyPuDmmgUSLkQdK
5.可视化界面
IPFS网络状态保持开启,此时浏览器输入http://localhost:5001/webui 你可以看到一个漂亮的可视化IPFS管理界面,里面可以做一些基础的资源获取查看操作。
在可视化界面中上传文件:点击[文件],点击[+添加到IPFS],点击[添加文件],选中刚刚的test.txt文件。
上传成功。