星际文件系统 (InterPlanetary File System,缩写IPFS),初次听到这个名字感觉很厉害。于是就去尝试了一下
首先我的系统是
Deepin Linux
1、安装文件
官网安装教程 :
https://ipfs.io/docs/install/
1、下载:
https://dist.ipfs.io/fs-repo-migrations/v1.3.0/fs-repo-migrations_v1.3.0_linux-amd64.tar.gz
2、解压
tar xvfz go-ipfs.tar.gz
cd go-ipfs
./install.sh
3、启动ipfs
ipfs daemon
此时可以通过 http://localhost:5001/webui打开管理界面

4、下载第一张文件
ipfs cat /ipfs/QmU3UGUWLZCtGkqBGnRybBazhpav3y7GxPYKsWGPGEVdKa > test.jpg
5、上传文件
假设我有一种图片test.jpg, 那么如下命令可以进行上传
ipfs add test.jpg
注意:上传的文件是永久保存的,无法删除,隐私照片请勿上传!!!
用了一下感觉还是很方便的,有点小激动,想以后多研究一下IPFS,写一个系列的学习笔记。虽然迅雷也在搞玩客云,但是是闭源的,不是很放心。
6、其他命令
BASIC COMMANDS
init Initialize ipfs local configuration
add <path> Add a file to IPFS
cat <ref> Show IPFS object data
get <ref> Download IPFS objects
ls <ref> List links from an object
refs <ref> List hashes of links from an object
DATA STRUCTURE COMMANDS
block Interact with raw blocks in the datastore
object Interact with raw dag nodes
files Interact with objects as if they were a unix filesystem
dag Interact with IPLD documents (experimental)
ADVANCED COMMANDS
daemon Start a long-running daemon process
mount Mount an IPFS read-only mountpoint
resolve Resolve any type of name
name Publish and resolve IPNS names
key Create and list IPNS name keypairs
dns Resolve DNS links
pin Pin objects to local storage
repo Manipulate the IPFS repository
stats Various operational stats
p2p Libp2p stream mounting
filestore Manage the filestore (experimental)
NETWORK COMMANDS
id Show info about IPFS peers
bootstrap Add or remove bootstrap peers
swarm Manage connections to the p2p network
dht Query the DHT for values or peers
ping Measure the latency of a connection
diag Print diagnostics
TOOL COMMANDS
config Manage configuration
version Show ipfs version information
update Download and apply go-ipfs updates
commands List all available commands
网友评论