Install BTFS
Minimum Hardware Requirements
- CPU: 2+ Core
- RAM: 2+ GB
Supported Operating Systems and Architecture
OS | ARCH |
---|---|
darwin | amd64 |
darwin | 386 |
linux | amd64 |
linux | 386 |
windows | amd64 |
windows | 386 |
Golang
Download the latest version: https://golang.org/dl/
Open the Terminal and run the following steps:
- Download the BTFS
install.sh
script.
wget https://raw.githubusercontent.com/TRON-US/btfs-binary-releases/master/install.sh
- Run the install script.
bash install.sh -o darwin -a amd64
- Add BTFS path to the environment.
export PATH=${PATH}:${HOME}/btfs/bin
- Initialize BTFS by running
btfs init
.
btfs init
// Output
initializing BTFS node at /Users/tom_tron/.btfs
generating 2048-bit keypair...done
peer identity: 16Uiu2HAmQAdGxS4fcwzZaXDe5tCLn7o51ixSNzURFafb3v4p4nsz
to get started, enter:
btfs cat /btfs/QmZjrLVdUpqVU6Pnc8pBnyQxVdpn9J8tfcsycP84W6N93C/readme
- Start the BTFS daemon by running
btfs daemon
.
btfs daemon
// Output
Initializing daemon...
go-btfs version: 0.2.1-286e1f761
Repo version: 7
System version: amd64/darwin
Golang version: go1.13
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.13/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/67.164.115.223/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
WebUI: http://127.0.0.1:5001/webui
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready
BTFS daemon get file test succeeded!
BTFS daemon add file test succeeded!
BTFS is up-to-date.
- Once your BTFS daemon has started, open a second terminal window to run the BTFS commands.
btfs add heart.png
// Output
added QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i heart.png
29.89 KiB / 29.89 KiB [==================================================================================] 100.00%
btfs get QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i
// Output
Saving file(s) to QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i
29.89 KiB / 29.89 KiB [===============================================================================] 100.00% 0s
btfs rm QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i
// Output
"Removed QmdA3o9nFLwfF21GizuMK4xZpvdrZmwdA8xR8Z78Hn7J1i"