Skip to content

4.远程C2使用说明书

wonderfic edited this page Aug 12, 2021 · 1 revision

1.编译方法

git clone https://github.com/filecash/lotus_builder  --branche=filecash/v1.5.0  git-filecash-1.5.0
cd git-filecash-1.5.0
bash build.sh -awebapi -y

输出程序在:./git-filecash-1.5.0/filecoin-webapi/target/release/filecoin-webapi
配置文件在:./git-filecash-1.5.0/filecoin-webapi/config-example.yaml

2.使用方法

2.1 启动filecoin-webapi,启动远程C2服务
2.1.1 修改filecoin-webapi配置文件
># vi webapi.yaml
listen_addr: "0.0.0.0:6000"
#private_cert: "/etc/webapi-key.pem"
#cert_chain: "/etc/webapi-cert.pem"
job_limits: {}
auth: false
allow_tokens: []
2.1.2 启动filecoin-webapi
export FIC_C2_TASK_NUM=2  ## 远程C2最大执行数
export FIL_PROOFS_PARAMETER_CACHE=/var/tmp/filecoin-proof-parameters  ## 证明文件路径
env RUST_LOG=info ./filecoin-webapi --config=./webapi.yaml
2.2 启动lotus-worker,连接远程C2
export FFI_REMOTE_COMMIT2_BASE_URL=<remotec2-ip>:<remotec2-port>  ## 设置远程C2参数
lotus-worker run