• linux debian服务器源码部署filecoin


    1.安装系统依赖

    sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y   

    2.安装rustup(解决生锈很慢的问题)

    export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static

    export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup

    curl https://sh.rustup.rs -sSf | sh

     

    3.安装golang

    wget -c https://dl.google.com/go/go1.16.7.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local

    4.添加到环境变量

    echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc && source ~/.bashrc

    5.克隆源码

    git clone https://github.com/filecoin-project/lotus.git
    cd lotus/

    6. 如果您有AMD Zen 或 Intel Ice Lake CPU(或更高版本),请通过添加以下两个环境变量来启用 SHA 扩展

     export RUSTFLAGS="-C target-cpu=native -g"
     export FFI_BUILD_FROM_SOURCE=1

    7.编译到主网并安装

    #解决下载go依赖很慢的问题
     
    export RUSTUP_DIST_SERVER=http://mirrors.ustc.edu.cn/rust-static 
    
    make clean all  #主网
    
    # Or to join a testnet or devnet:
    make clean calibnet # Calibration with min 32GiB sectors 验证网
    make clean nerpanet # Nerpa with min 512MiB sectors 测试网
    
    sudo make install #安装

    8.启动

    这将会把lotus,lotus-miner并lotus-worker在/usr/local/bin。
    
    lotus将$HOME/.lotus默认使用该文件夹进行存储(配置、链数据、钱包)。有关如何自定义 Lotus 文件夹的信息 
    
    安装完成后,使用下面的命令确保为正确的网络成功安装了 lotus。
    
    lotus --version 
        
    lotus version 1.9.0+calibnet+git.ada7f97ba

      

  • 相关阅读:
    云计算安全之传统安全业务连续性和灾难恢复
    如何降低云应用程序的风险并管理其保障措施
    映射函数
    numpy用法
    dataframe基础
    list用法
    可视化基础
    pycharm使用技巧
    时间用法
    merge()函数
  • 原文地址:https://www.cnblogs.com/light-zhang/p/15216369.html
Copyright © 2020-2023  润新知