時(shí)間:2023-08-24|瀏覽:277
以下為文檔原文。
概要: 該文檔是用來介紹用戶在不同操作系統(tǒng)上,如何通過貢獻(xiàn)自己的閑置存儲(chǔ)空間資源賺取BTT獎(jiǎng)勵(lì)。其中包括如何安裝BTFS程序,如何成為BTFS的節(jié)點(diǎn)。
Mac操作系統(tǒng): 大家好,今天給大家介紹一下如何通過貢獻(xiàn)自己的閑置的存儲(chǔ)空間賺取BTT獎(jiǎng)勵(lì)。在成為一名存儲(chǔ)資源提供者之前,您需要有至少CPU:2Core;RAM:2GB的硬件設(shè)備。滿足條件后,按照以下步驟進(jìn)行操作。
一、打開“終端”程序,執(zhí)行以下的步驟:(用戶可瀏覽https://docs.btfs.io/)
下載BTFS安裝腳本install.sh(需要系統(tǒng)中已經(jīng)安裝wget命令,若沒有可以使用brewinstallwget安裝;若brew命令也沒有,可以搜索安裝Homebrew): ``` wget?https://raw.githubusercontent.com/TRON-US/btfs-binary-releases/master/install.sh ``` 運(yùn)行install.sh腳本,-o參數(shù)表示操作系統(tǒng)類型,macOS系統(tǒng)使用darwin表示,-a參數(shù)表示系統(tǒng)架構(gòu)(amd64或者386等,macOS現(xiàn)在應(yīng)該都是amd64架構(gòu),因此選擇amd64): ``` bashinstall.sh-odarwin-aamd64 ``` 將BTFS可執(zhí)行程序路徑加入到PATH環(huán)境變量: ``` exportPATH=${PATH}:${HOME}/btfs/bin ``` 以上PATH環(huán)境變量修改只是當(dāng)前終端會(huì)話有效,若需要長(zhǎng)久有效可以將該命令放入到~/.bash_profile中并 ``` echo‘export?PATH=${PATH}:${HOME}/btfs/bin>>~/.bash_profile ``` ofile初始化BTFS: ``` btfsinit ``` 命令輸出應(yīng)該和下列內(nèi)容相似: ``` GeneratingTRONkeywithBIP39seedphrase... Masterpublickey:xpub661MyMwAqRbcFcLXfbrSPYJfTi89JjvTzh6HuMH13F6NEuto4vPw8XYDhxEiPHtVC72h3mRGSKpHkUTR3D7M5SQbo2NetQtNfoMkrKFjnG1 initializingBTFSnodeat/Users/leo.li/.btfs generatingbtfsnodekeypairwithTRONkey...done peeridentity:16Uiu2HAm7JiQCT295HfrLrCBbYinyfbroTerZ11m2rA5HVkid7KA togetstarted,enter: btfscat/btfs/QmZjrLVdUpqVU6Pnc8pBnyQxVdpn9J8tfcsycP84W6N93C/readme ``` 應(yīng)用BTFSHost角色對(duì)應(yīng)的配置文件(如果BTFSdaemon已經(jīng)啟動(dòng),需要在運(yùn)行該命令后重啟BTFSdaemon;如何啟動(dòng)和重啟BTFSdaemon參看下個(gè)步驟): ``` btfsconfigprofileapplystorage-host ``` 可以再運(yùn)行以下命令確認(rèn)配置文件應(yīng)用是否成功: ``` btfsconfigshow ``` 在輸出中確認(rèn)StorageHostEnabled設(shè)置為true: ``` "StorageHostEnabled":true, ``` 啟動(dòng)BTFSdaemon: ``` btfsdaemon ``` 命令輸出應(yīng)該和下列內(nèi)容相似: ``` Initializingdaemon... go-btfsversion:1.2.1- Repoversion:7 Systemversion:amd64/darwin Golangversion:go1.14.4 Swarmlisteningon/ip4/10.8.0.42/tcp/4001 Swarmlisteningon/ip4/127.0.0.1/tcp/4001 Swarmlisteningon/ip4/172.16.130.1/tcp/4001 Swarmlisteningon/ip4/172.16.139.1/tcp/4001 Swarmlisteningon/ip4/192.168.0.102/tcp/4001 Swarmlisteningon/ip6/::1/tcp/4001 Swarmlisteningon/p2p-circuit Swarmannouncing/ip4/10.8.0.42/tcp/4001 Swarmannouncing/ip4/127.0.0.1/tcp/4001 Swarmannouncing/ip4/172.16.130.1/tcp/4001 Swarmannouncing/ip4/172.16.139.1/tcp/4001 Swarmannouncing/ip4/192.168.0.102/tcp/4001 Swarmannouncing/ip6/::1/tcp/4001 APIserverlisteningon/ip4/127.0.0.1/tcp/5001 WebUI:http://127.0.0.1:5001/webui HostUI:http://127.0.0.1:5001/hostui Gateway(readonly)serverlisteningon/ip4/127.0.0.1/tcp/8080 RemoteAPIserverlisteningon/ip4/127.0.0.1/tcp/5101 Daemonisready ``` 如何關(guān)閉和重啟BTFSdaemon:在BTFSdaemon運(yùn)行的終端窗口中按Ctrl+C退出并再次運(yùn)行btfsdaemon
二、節(jié)點(diǎn)成功啟動(dòng)后,打開BTFS的hostUI地址http://127.0.0.1:5001/hostui/#/,現(xiàn)在可以根據(jù)頁面上友好的操作提示,成為一名BTFS的存儲(chǔ)空間提供者并賺取豐厚的BTT收益了,還不趕快行動(dòng)起來!