1. 程式人生 > >ubuntu ipfs 安裝部署

ubuntu ipfs 安裝部署

[email protected]:/ipfs# ls go-ipfs_v0.4.17_linux-amd64.tar.gz[email protected]:/ipfs# tar xvfz go-ipfs_v0.4.17_linux-amd64.tar.gz  go-ipfs/build-log go-ipfs/install.sh go-ipfs/ipfs go-ipfs/LICENSE go-ipfs/README.md[email protected]:/ipfs# ls go-ipfs  go-ipfs_v0.4.17_linux-amd64.tar.gz[email protected]

:/ipfs# cd go-ipfs/

[email protected]:/ipfs/go-ipfs# ls build-log  install.sh  ipfs  LICENSE  README.md[email protected]:/ipfs/go-ipfs# mv ./ipfs /usr/local/bin/ipfs[email protected]:/ipfs/go-ipfs# ls build-log  install.sh  LICENSE  README.md[email protected]:/ipfs/go-ipfs# 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.

[email protected]:/ipfs/go-ipfs# ipfs init initializing IPFS node at /root/.ipfs generating 2048-bit RSA keypair...done peer identity: QmVvzsQetyEjZ7eikFTjvXGTwbuAEwxxPU6xNLGBYepv2E to get started, enter:

    ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

[email protected]:/ipfs/go-ipfs# ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme Hello and Welcome to IPFS!

██╗██████╗ ███████╗███████╗ ██║██╔══██╗██╔════╝██╔════╝ ██║██████╔╝█████╗  ███████╗ ██║██╔═══╝ ██╔══╝  ╚════██║ ██║██║     ██║     ███████║ ╚═╝╚═╝     ╚═╝     ╚══════╝

If you're seeing this, you have successfully installed IPFS and are now interfacing with the ipfs merkledag!

 ------------------------------------------------------- | Warning:                                              | |   This is alpha software. Use at your own discretion! | |   Much is missing or lacking polish. There are bugs.  | |   Not yet secure. Read the security notes for more.   |  -------------------------------------------------------

Check out some of the other files in this directory:

  ./about   ./help   ./quick-start     <-- usage examples   ./readme          <-- this file   ./security-notes[email protected]:/ipfs/go-ipfs# cd /root

[email protected]:~# ls data  morein-core  my-genesis.json  nohup.out  test  witness_node_data_dir[email protected]:~# ll total 212 drwx------   17 root root  4096 Sep 27 15:07 ./ drwxr-xr-x   23 root root  4096 Sep 27 14:35 ../ -rw-------    1 root root 49637 Sep 19 23:26 .bash_history -rw-r--r--    1 root root  3317 Aug 14 11:45 .bashrc drwx------    3 root root  4096 Mar 26  2018 .cache/ drwxr-xr-x    3 root root  4096 Aug  8 14:11 .cmake/ drwxr-xr-x    5 root root  4096 Sep 12 15:19 data/ drwxr-xr-x    2 root root  4096 Aug 15 11:37 .electron/ -rw-r--r--    1 root root    83 Aug  9 18:20 .gitconfig -rw-------    1 root root   156 Sep 18 18:48 .git-credentials drwxr-xr-x    5 root root  4096 Sep 27 15:07 .ipfs/ drwxr-xr-x   11 root root  4096 Sep 18 11:40 morein-core/ -rw-r--r--    1 root root 10732 Sep 12 15:19 my-genesis.json -rw-------    1 root root   408 Sep 27 15:07 nohup.out drwxr-xr-x 1358 root root 40960 Aug 15 11:11 .npm/ drwxr-xr-x    7 root root  4096 Aug 10 17:45 .nvm/ drwxr-xr-x    2 root root  4096 Mar 26  2018 .pip/ -rw-r--r--    1 root root   148 Aug 17  2015 .profile -rw-r--r--    1 root root   205 Aug  7 16:36 .pydistutils.cfg drwxr-xr-x   12 root root  4096 Aug 14 11:35 .rbenv/ drwxr-xr-x    2 root root  4096 Mar 27  2018 .rpmdb/ drwx------    2 root root  4096 Aug 10 09:49 .ssh/ drwxr-xr-x    3 root root  4096 Sep 18 11:25 test/ drwxr-xr-x    2 root root  4096 Mar 27  2018 .vim/ -rw-------    1 root root 12259 Sep 27 15:07 .viminfo drwxr-xr-x    3 root root  4096 Sep 12 15:19 witness_node_data_dir/[email protected]:~# cd .ipfs/[email protected]:~/.ipfs#

[email protected]:~/.ipfs# vim config

#ip_add:8080/ipfs/QmUm335yGVka44bi5JJwbupHcRi5DTEhY8nMYqUoHRC6W6