lotus v0.2.2 安装

lotus 安装

  • 1,复制证明参数下载
  • 2,环境变量设置
  • 3,安装依赖
  • 4,编译安装lotus
  • 5,运行lotus
  • 6,查看区块高度同步

1,复制证明参数下载

  • 下载filecoin-proof-parameters-v20-testnet.tar.gz
wget https://s3.cn-south-1.jdcloud-oss.com/proof-parameters/filecoin-proof-parameters-v20-testnet.tar.gz
# tar -zxvf filecoin-proof-parameters-v20-testnet.tar.gz
gzip: stdin: invalid compressed data--format violated
tar: 归档文件中异常的 EOF
tar: 归档文件中异常的 EOF
tar: Error is not recoverable: exiting now
  • 在线下载
# lotus fetch-params --proving-params 32GiB

2,环境变量设置

  • # vim /root/.bashrc
export FIL_PROOFS_PARAMETER_CACHE=/storage/filecoin-proof-parameters-v20

export LOTUS_STORAGE_PATH=/storage/lotuswork/lotusstorage
export LOTUS_PATH=/storage/lotuswork/lotus
export WORKER_PATH=/storage/lotuswork/lotusworker

export TMPDIR=/storage/lotuswork/tmpdir
export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/"
mkdir -p lotuswork/tmpdir
# pwd
/storage/lotuswork
# ls
tmpdir

3,安装依赖

# add-apt-repository ppa:longsleep/golang-backports
# apt update
# apt install -y golang-go gcc git bzr jq pkg-config mesa-opencl-icd ocl-icd-* opencl-headers llvm clang

# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# source $HOME/.cargo/env
# rustup --version
rustup 1.20.2 (13979c968 2019-10-16)

4,编译安装lotus

  • 搭建梯子设置终端代理
export ALL_PROXY=socks5://127.0.0.1:1080
  • 下载源码
git clone https://github.com/filecoin-project/lotus.git
  • 设置golang代理
# export GO111MODULE=on
# export GOPROXY=https://goproxy.io

  • 编译安装
# cd lotus
# make clean all && make install

5,运行lotus

nohup lotus daemon >> /storage/lotus.log 2>&1 &
  • 查看lotus版本
# lotus version
0.2.2+api0.1.6
lotus version 0.2.2

6,查看区块高度同步

  • 等待区块高度完成同步
watch -d -n 1 lotus sync status

lotus v0.2.2 安装_第1张图片

你可能感兴趣的:(#,lotus)