Filecoin节点部署

1、下载filecoin包(下载地址:https://github.com/filecoin-project/go-filecoin/releases/tag/0.5.8)

  • 初始化filecoin资源目录
  • 如果之前有运行过filecoin,想重新开始,需要删除filecoin资源,同时重新初始化是需要重新花时间同步开发网区块信息的。
rm -rf ~/.filecoin

2、解压包

root@coin:~# mkdir /data/coins/FCOIN
root@coin:~# cd /data/coins/FCOIN
root@coin:/data/coins/FCOIN# wget https://github.com/filecoin-project/go-filecoin/releases/tag/0.5.8
root@coin:/data/coins/FCOIN# tar -xf filecoin-0.5.8-Linux.tar.gz
root@coin:/data/coins/FCOIN# mv filecoin bin

3、初始化资源目录,使用--devnet-user表示连接至开发网(--repodir指定路径)

root@coin:/data/coins/FCOIN# wget http://user.kittyhawk.wtf:8020/genesis.car 或wget https://genesis.user.kittyhawk.wtf/genesis.car
root@coin:/data/coins/FCOIN# mv genesis.car bin/
root@coin:/data/coins/FCOIN# cd bin
root@coin:/data/coins/FCOIN/bin# ./go-filecoin init --devnet-user --genesisfile=genesis.car --repodir=/data/coins/FCOIN/data

4、启动守护进程

root@coin:/data/coins/FCOIN/bin# ./go-filecoin --repodir=/data/coins/FCOIN/data daemon

5、查看连接

root@coin:/data/coins/FCOIN/bin# ./go-filecoin swarm peers --repodir=/data/coins/FCOIN/data
/ip4/121.37.176.38/tcp/6000/ipfs/Qmdyqhx3SVFAjST1iYTXSvPhf2nMSJD7xt5h5Ky4QkFWvC
/ip4/221.178.8.50/tcp/16000/ipfs/QmSwuzh67WA18wGNYFMembBRQyRfFuTDTeroaGYRjNdtfR
/ip4/35.175.213.218/tcp/9000/ipfs/Qmd6xrWYHsxivfakYRy6MszTpuAiEoFbgE1LWw4EvwBpp4
/ip4/35.175.213.218/tcp/9001/ipfs/QmXq6XEYeEmUzBFuuKbVEGgxEpVD4xbSkG2Rhek6zkFMp4
/ip4/35.175.213.218/tcp/9002/ipfs/QmXhxqTKzBKHA5FcMuiKZv8YaMPwpbKGXHRVZcFB2DX9XY
/ip4/35.175.213.218/tcp/9003/ipfs/QmZGDLdQLUTi7uYTNavKwCd7SBc5KMfxzWxAyvqRQvwuiV
/ip4/35.175.213.218/tcp/9004/ipfs/QmZRnwmCjyNHgeNDiyT8mXRtGhP6uSzgHtrozc42crmVbg
/ipfs/QmXq6XEYeEmUzBFuuKbVEGgxEpVD4xbSkG2Rhek6zkFMp4/p2p-circuit/ipfs/QmPNkCMYUsRYKV4QNSz8eZ3tJ53ZTpwcucRu4ecbgPaVGR
/ipfs/QmXq6XEYeEmUzBFuuKbVEGgxEpVD4xbSkG2Rhek6zkFMp4/p2p-circuit/ipfs/QmRjcG3RioXTPVjoQixC69swB4bfXQXwvKvsFdxAdczjqE
/ipfs/QmZGDLdQLUTi7uYTNavKwCd7SBc5KMfxzWxAyvqRQvwuiV/p2p-circuit/ipfs/QmRyGMPhDpegeEMTDJt2UCwcSuq8mJK9VmzgPZWokPEQPM
/ipfs/QmZRnwmCjyNHgeNDiyT8mXRtGhP6uSzgHtrozc42crmVbg/p2p-circuit/ipfs/QmUEysc5V4WYSuMtMhN7q2HGp2Vg7uRN9qz3qqWk3do5Rz
/ipfs/QmZRnwmCjyNHgeNDiyT8mXRtGhP6uSzgHtrozc42crmVbg/p2p-circuit/ipfs/QmWC63rB2psyebRyp5bwQkiAQWKjo1XzwkAetNxkD6MRMp
/ipfs/Qmd6xrWYHsxivfakYRy6MszTpuAiEoFbgE1LWw4EvwBpp4/p2p-circuit/ipfs/QmX5FNcdW7Rn8gemwwwrx9LA5vixvcrqFvFywmThkj6epU

6、测试连接

root@coin:/data/coins/FCOIN/bin# ./go-filecoin --repodir=/data/coins/FCOIN/data ping Qmdyqhx3SVFAjST1iYTXSvPhf2nMSJD7xt5h5Ky4QkFWvC 
Pong received: seq=0 time=33.80 ms
Pong received: seq=1 time=35.12 ms
Pong received: seq=2 time=33.85 ms
Pong received: seq=3 time=35.32 ms
^C

 

 

你可能感兴趣的:(filecoin)