星際文件系統 (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打開管理界面
image.png
4蜓洪、下載第一張文件
ipfs cat /ipfs/QmU3UGUWLZCtGkqBGnRybBazhpav3y7GxPYKsWGPGEVdKa > test.jpg
5、上傳文件
假設我有一種圖片test.jpg坯苹, 那么如下命令可以進行上傳
ipfs add test.jpg
注意:上傳的文件是永久保存的隆檀,無法刪除,隱私照片請勿上傳4馀取8詹佟!
用了一下感覺還是很方便的再芋,有點小激動,想以后多研究一下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