wget https://github.com/ipfs/go-ipfs/releases/download/v0.7.0/go-ipfs_v0.7.0_linux-amd64.tar.gz
tar -zxvf go-ipfs_v0.7.0_linux-amd64.tar.gz
./install.sh
cd /usr/local/bin
ipfs init
generating ED25519 keypair…done
peer identity: 12D3KooWKjPamV9aAU4pGaWf7opakckVybQmCsf5HSLJkdK6qSog
initializing IPFS node at /root/.ipfs
to get started, enter:
ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme
安装go
wget https://studygolang.com/dl/golang/go1.15.5.linux-amd64.tar.gz -C .
vi /etc/profile
加入
export GOROOT=/root/go
export GOPATH=/root/go/workspaces
export PATH=
P
A
T
H
:
PATH:
PATH:GOROOT/bin
source /etc/profile
go get github.com/Kubuxu/go-ipfs-swarm-key-gen
cd /root/go/workspaces/src/github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen
go build
产生ipfs-swarm-key-gen 文件
./ipfs-swarm-key-gen > swarm.key
生成swarm.key共享文件
ipfs bootstrap rm --all
vi /root/.ipfs/config
ipfs daemon
第二台机器
generating ED25519 keypair…done
peer identity: 12D3KooWNhDBa6j1sfPNKTdP4bz1MvPKxYVAWfZ4RwhopxPnrWXw
initializing IPFS node at /root/.ipfs
to get started, enter:
ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme
ipfs bootstrap add /ip4/10.0.2.2/tcp/4001/ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc
ipfs daemon
https://blog.csdn.net/wangkaizheng123/article/details/83089897