安装包go-ipfs_v0.4.17_linux-amd64.tar.gz下载地址
root@ali01-mada-bitshares-02:/ipfs# ls
go-ipfs_v0.4.17_linux-amd64.tar.gz
root@ali01-mada-bitshares-02:/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
root@ali01-mada-bitshares-02:/ipfs# ls
go-ipfs go-ipfs_v0.4.17_linux-amd64.tar.gz
root@ali01-mada-bitshares-02:/ipfs# cd go-ipfs/
root@ali01-mada-bitshares-02:/ipfs/go-ipfs# ls
build-log install.sh ipfs LICENSE README.md
root@ali01-mada-bitshares-02:/ipfs/go-ipfs# mv ./ipfs /usr/local/bin/ipfs
root@ali01-mada-bitshares-02:/ipfs/go-ipfs# ls
build-log install.sh LICENSE README.md
root@ali01-mada-bitshares-02:/ipfs/go-ipfs# ipfs help
USAGE
ipfs - Global p2p merkle-dag filesystem.
ipfs [--config=
SUBCOMMANDS
BASIC COMMANDS
init Initialize ipfs local configuration
add
cat Show IPFS object data
get Download IPFS objects
ls List links from an object
refs 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
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.
root@ali01-mada-bitshares-02:/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
root@ali01-mada-bitshares-02:/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
root@ali01-mada-bitshares-02:/ipfs/go-ipfs# cd /root
root@ali01-mada-bitshares-02:~# ls
data morein-core my-genesis.json nohup.out test witness_node_data_dir
root@ali01-mada-bitshares-02:~# 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/
root@ali01-mada-bitshares-02:~# cd .ipfs/
root@ali01-mada-bitshares-02:~/.ipfs#
root@ali01-mada-bitshares-02:~/.ipfs# vim config
#ip_add:8080/ipfs/QmUm335yGVka44bi5JJwbupHcRi5DTEhY8nMYqUoHRC6W6