IPFS series of multi-node build two IPFS series of multi-node build two

IPFS series of multi-node build two

Previous introduces IPFS distributed hypermedia point to point transmission protocol describes the background and install herein, this will continue to guide IPFS to build a multi-node private network file services. If you have not yet begun to build a small partner IPFS node,

Please stamp this link to see the article describes:  https://www.cnblogs.com/sumingk/articles/9250757.html

According to the article reports, set up a IPFS node, this tutorial series uses two Ubuntu 16.04 server node + three ipfs build a win10 host.

.IPFS modify a configuration file

  IPFS to build a multi-node local distributed file system, in alliance chain development environment, the majority will be used to IPFS multi-node private network storage file.

       Based on an article that in order to build IPFS access to multiple nodes, you need to modify ~ / .ipfs config file

   ipfs config --json Addresses.API '/ ip4 / local address / tcp / 5001'

   ipfs config --json Addresses.Gateway '/ ip4 / local address / tcp / 8080' # Note ports do not conflict with other service port of the machine, such as tomcat

II. Remove the default public bootstrap node connection

       ipfs bootstrap rm --all 

Three .IPFS add nodes

  1, this view ipfs id node information

  

  2. Add another node ipfs

    ipfs bootstrap add /ip4/192.168.1.114/tcp/4001/ipfs/QmRM8d9c2Nuwg8sqyJZPhR52TzpyYd7CpGc1FhNJQcdTkh # add a connection node ipfs

IV. Multi-node shared key

  Key Tools Download:  https://github.com/Kubuxu/go-ipfs-swarm-key-gen

  The key generation needs to go to support, if not go local server installation, please download and install go

    GET -u github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen Go 

  ipfs-swarm-key-Gen> ~ / .ipfs / swarm.key # enter ipfs-swarm-key Contents Executive -gen

  After installation, review the resulting swarm.key

        

  The key synchronization to the remaining nodes ~ / .ipfs directory

    scp -i ss-server.pem ~/.ipfs/swarm.key [email protected]:~/.ipfs/

    Or you can use local upload rz -be command to select the file uploaded to the server

V. test IPFS multi-node connection

  Create a file 1. Go to a directory node go-ipfs

cd /usr/local/src/go-ipfs

vi abc.txt # enter their fill of content

2. Call ipfs add command, to upload files to the network ipfs

    ipfs add abc.txt

  

   3. View node in another IPFS

    ipfs cat QmZ57RPMRJJyCvvBVisqTvwXUKjvqUtf1v7rDmm3aMYQAi

    You can view this content, indicating two nodes ipfs had been connected.

 

So far, IPFS node Benpian private network set up has been introduced to complete. If in doubt, Comments, welcomed ipfs partners interested in small positive message, the latter will publish ipfs cluster structures, more heavyweight feature.

 

More reference documentation:

  https://github.com/Kubuxu/go-ipfs-swarm-key-gen

  http://ipfser.org/2018/03/31/r35/

Previous introduces IPFS distributed hypermedia point to point transmission protocol describes the background and install herein, this will continue to guide IPFS to build a multi-node private network file services. If you have not yet begun to build a small partner IPFS node,

Please stamp this link to see the article describes:  https://www.cnblogs.com/sumingk/articles/9250757.html

According to the article reports, set up a IPFS node, this tutorial series uses two Ubuntu 16.04 server node + three ipfs build a win10 host.

.IPFS modify a configuration file

  IPFS to build a multi-node local distributed file system, in alliance chain development environment, the majority will be used to IPFS multi-node private network storage file.

       Based on an article that in order to build IPFS access to multiple nodes, you need to modify ~ / .ipfs config file

   ipfs config --json Addresses.API '/ ip4 / local address / tcp / 5001'

   ipfs config --json Addresses.Gateway '/ ip4 / local address / tcp / 8080' # Note ports do not conflict with other service port of the machine, such as tomcat

II. Remove the default public bootstrap node connection

       ipfs bootstrap rm --all 

Three .IPFS add nodes

  1, this view ipfs id node information

  

  2. Add another node ipfs

    ipfs bootstrap add /ip4/192.168.1.114/tcp/4001/ipfs/QmRM8d9c2Nuwg8sqyJZPhR52TzpyYd7CpGc1FhNJQcdTkh # add a connection node ipfs

IV. Multi-node shared key

  Key Tools Download:  https://github.com/Kubuxu/go-ipfs-swarm-key-gen

  The key generation needs to go to support, if not go local server installation, please download and install go

    GET -u github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen Go 

  ipfs-swarm-key-Gen> ~ / .ipfs / swarm.key # enter ipfs-swarm-key Contents Executive -gen

  After installation, review the resulting swarm.key

        

  The key synchronization to the remaining nodes ~ / .ipfs directory

    scp -i ss-server.pem ~/.ipfs/swarm.key [email protected]:~/.ipfs/

    Or you can use local upload rz -be command to select the file uploaded to the server

V. test IPFS multi-node connection

  Create a file 1. Go to a directory node go-ipfs

cd /usr/local/src/go-ipfs

vi abc.txt # enter their fill of content

2. Call ipfs add command, to upload files to the network ipfs

    ipfs add abc.txt

  

   3. View node in another IPFS

    ipfs cat QmZ57RPMRJJyCvvBVisqTvwXUKjvqUtf1v7rDmm3aMYQAi

    You can view this content, indicating two nodes ipfs had been connected.

 

So far, IPFS node Benpian private network set up has been introduced to complete. If in doubt, Comments, welcomed ipfs partners interested in small positive message, the latter will publish ipfs cluster structures, more heavyweight feature.

 

More reference documentation:

  https://github.com/Kubuxu/go-ipfs-swarm-key-gen

  http://ipfser.org/2018/03/31/r35/

Guess you like

Origin www.cnblogs.com/gaoyuechen/p/11800130.html