背景:听说IPFS=bittorrent+bitcoin+git+afs,有可能取代http,好像厉害的不行,所以要研究一下。
编译参考:https://github.com/ipfs/go-ipfs 结果各种墙都翻好了,一切基础设施都到位了,还是没编译成功shit(最后还是编过了)。
退而求其次,直接用官方提供的先试验一下吧。
下载地址:https://ipfs.io/docs/install/
1.上传安装
下载相应的版本,我下载的是:go-ipfs_v0.4.14_linux-amd64.tar.gz,上传到服务器,解压。
someone@ipfs:~$ tar -zxvf go-ipfs_v0.4.14_linux-amd64.tar.gz someone@ipfs:~$ cd go-ipfs/ someone@ipfs:~$ ./install.sh someone@ipfs:~/package/go-ipfs$ ipfs
显示的结果如下:
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.