編碼的世界 / 優質文選 / 女人

Ubuntu配置IPFS的環境


2022年8月02日
-   

參考鏈接
  • Ubuntu上IPFS環境搭建 - 簡書

下載安裝包
  • 下載地址:https://dist.ipfs.io/#go-ipfs
  • 頁面會自動根據你的操作系統提供適合的下載安裝包,所以需要在Ubuntu環境下點開上面那個鏈接,網頁自動識別當前的平台並提供對應的版本,點擊下載按鈕即可
  • 將壓縮包上傳至指定的路徑下,使用命令進行解壓  tar xvfz go-ipfs_v0.4.15_linux-amd64.tar.gz  
  • 進入解壓後的文件夾 cd go-ipfs
  • 此刻/usr/local/bin 文件夾下面已經存在ipfs可執行程序
  • 進行簡單的驗證:ipfs version #查看版本    ipfs help #查看幫助文檔

$ tar xvfz go-ipfs_v0.4.15_linux-amd64.tar.gz
go-ipfs/build-log
go-ipfs/install.sh
go-ipfs/ipfs
go-ipfs/LICENSE
go-ipfs/README.md
$ cd go-ipfs
$ sudo mv ipfs /usr/local/bin/ipfs
$ ipfs version #查看版本
ipfs version 0.4.15
$ ipfs help #查看幫助文檔
USAGE
ipfs - Global p2p merkle-dag filesystem.
ipfs [config=<config> | -c] [debug=<debug> | -D] [help=<help>] [-h=<h>] [local=<local> | -L] [api=<api>] <command>
SUBCOMMANDS
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
Use 'ipfs <command> help' to learn more about each command.
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
environment variable:
export IPFS_PATH=/path/to/ipfsrepo
EXIT STATUS
The CLI will exit with one of the following values:
0 Successful execution.
1 Failed executions.

項目配置
  • 創建IPFS節點  ipfs init
  • 查看節點id   ipfs id
  • 啟動節點服務器 ipfs  daemon   主要用於節點之間互傳文件

相關圖片



參考鏈接
  • 演示IPFS的一個完整的流程以及針對部分概念的詳解_CHYabc123456hh的博客-CSDN博客

熱門文章