Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the IPFS environment build node

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install the IPFS environment building node, which has a certain reference value. Interested friends can refer to it. I hope you will learn a lot after reading this article. Let's take a look at it.

Installation and use of ipfs Node 1.1 download Node Software

Download the windows version of ipfs node software from the official website: 32-bit, 64-bit. If you can't access the official website, you can use Baidu cloud disk image: 32-bit, 64-bit.

1.2 decompress node software

After download, extract it to the specified directory, such as d:\ go-ipfs, open a console window, and test:

D:\ go-ipfs > ipfs versionIpfs version 0.4.14

You can add this directory to the environment variable PATH, or copy d:\ go-ipfs\ ipfs.exe to the windows system directory so that ipfs.exe can be started in any directory.

1.3 initialize the local warehouse

Like git, the ipfs node needs to initialize a local repository first. Execute the in subcommand to initialize the local warehouse:

D:\ go-ipfs > ipfs initInitializing IPFS node at C:\ Users\ hubwiz\ .ipfsfolk 2048-bit RSA keypair...donepeer identity: QmQaTgU1TLNHPBEvLGgWK1G9FgVByyUZNVhDs789uWPtkuto get started, enter: ipfs cat / ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

By default, ipfs establishes a .ipfs subdirectory under the current user's home directory (for example, for hubwiz users, the home directory is C:\ Users\ hubwiz) as the root of the local repository.

If your C disk space is not large enough, or if you just want to use another directory as the local repository root, you can set the IPFS_PATH environment variable to point to the target path, such as D:\ my_ipfs_root

1.4 reinitialization

If you expect to reinitialize the node, you will be reminded not to do so, otherwise your key will be rewritten:

D:\ go-ipfs > ipfs initInitializing IPFS node at C:\ Users\ hubwiz\ .ipfsError: ipfs configuration file already initiator would overwrite your keys.

That won't stop us. If you have to reinitialize, delete the original repository root directory first:

D:\ go-ipfs > del C:\ users\ hubwiz\ .ipfs1.5 add files to the local repository

Use the add subcommand to add the specified file to the local repository, such as the README.md file of the current directory to the local repository:

D:\ go-ipfs > ipfs add README.md465 B /? [- =--] added QmXBpD37vBm5537pqHwyJRGSaX7hMrkHyp866wqEVU2BE8 README.md

Ipfs generates a hash value based on the contents of the file, for example:

QmXBpD37vBm5537pqHwyJRGSaX7hMrkHyp866wqEVU2BE8

You need to record this code because you need to use it to access files in the local repository (or ipfs network). Note: ipfs will not uncontrollably distribute files from your local repository to other ipfs nodes, if there are no other ipfs nodes to search for your files, then files in your local repository will always exist locally.

1.6 access to ipfs files

In the Ipfs network, files can only be accessed through the hash value of the content. For example, for the above README.md file, we use the cat subcommand to view its contents through its hash value:

D:\ go-ipfs > ipfs cat QmXBpD37vBm5537pqHwyJRGSaX7hMrkHyp866wqEVU2BE8

The console will output:

\ # ipfs commandline toolThis is the [ipfs] (http://ipfs.io) commandline tool. It contains a full ipfs node.1.7 connects nodes to the network

Execute the daemon subcommand to connect the node to the ipfs network:

D:\ go-ipfs > ipfs daemonInitializing daemon.Daemon is ready

Only when the monitoring is started, the node can accept the content retrieval request in the ipfs network and participate in the exchange and distribution of the content.

You can press Ctrl+C to exit the listening state.

Thank you for reading this article carefully. I hope the article "how to install the IPFS Environment Building Node" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report