FILECION项目环境

Posted jalyzjs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FILECION项目环境相关的知识,希望对你有一定的参考价值。

##安装node_exporter

mkdir -p /server/src /server/scripts

cd /server/src/

wget https://github.com/prometheus/node_exporter/releases/download/v1.2.2/node_exporter-1.2.2.linux-amd64.tar.gz

tar zxvf tar zxvf node_exporter-1.2.2.linux-amd64.tar.gz

cd node_exporter-1.2.2.linux-amd64/

cp node_exporter /usr/local/bin/node_exporter

cat >/etc/systemd/system/node-exporter.service <<EOF

[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target
[Service]
User=root
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target

EOF

systemctl start node-exporter.service && systemctl enable node-exporter.service && systemctl status node-exporter.service

 

##安装MegaCli &&硬raid磁盘状态查询

apt -y install unzip rpm wget

cd /server/src

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip 8-07-14_MegaCLI.zip

rpm -ivh /server/src/Linux/MegaCli-8.07.14-1.noarch.rpm --force --nodeps

ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/bin/megacli

##执行megacli如果报错megacli: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

apt -y install libncurses5

 

##硬件raid信息查询

megacli -LDInfo -Lall -aALL                     ##查看raid状态,主要raid level和number of drives查看raid级别和总盘数

megacli -cfgdsply -aall                             ##查看raid盘的状态,firmware state: online spun up表示该盘正常,其他状态均为不正常,需报警检查。

 

##安装nfs-server文件共享服务&&远程挂载&&固话存储到miner

##nfs server端

apt -y install nfs-kernel-server

echo "/data 10.x.x.x/24(rw,sync,no_root_squash,no_subtree_check)" >>/etc/exports

systemctl restart nfs-server.service && systemctl enable nfs-server && systemctl restart nfs-utils.service && systemctl enable nfs-utils.service

##nfs client端(lotus miner节点)

mout -t nfs 10.x.x.x:/data/ /filecoin/storage/1 

####写入/etc/fstab,永久生效

echo "10.x.x.x:/data               /filecoin/storage/2      nfs auto,sync,nolock,noatime,nodiratime,intr,timeo=10 0 0" >>/etc/fstab

####将挂载的nfs盘固话到filecoin存储中

lotus-miner storage attach --store --init /filecoin/storage/2

 

##filecoin存储节点启动lotus-worker

##在~/.profile中存入lotus-miner的api信息

echo “export MINER_API_INFO=eyJhb..." >>~/.profile

source ~/.profile

##启动lotus-worker进程

nohup env TMPDIR=/root/tmpDir/lotus-worker-store-0 lotus-worker --worker-repo="~/.lotus-worker-store-0/" run --listen x.x.x.x:31900 --addpiece=false --precommit1=false --precommit2=false --commit=false --unseal=false --no-swap=false --no-local-storage=true >> ~/lotus-worker-store-0.log 2>&1 

######修改指定的TMPDIR和listen

######如果报错lotus-worker: error while loading shared libraries: libhwloc.so.15: cannot open shared object file: No such file or directory

apt -y install  hwloc libhwloc-dev

lotus-worker --worker-repo="~/.lotus-worker-store-0/" storage attach --store /data/

##查看是否成功添加存储

lotus-miner storage list

\'FILECION项目环境_node_exporter\'

 

 

 

 

 

以上是关于FILECION项目环境的主要内容,如果未能解决你的问题,请参考以下文章

filecion的项目可靠安全吗?

现在是Filecoin挖矿的最佳时机吗 ?

普通人怎么参与filecoin挖矿

FIL挖矿到底靠不靠谱?FIL挖矿是稳定价值投资吗?

受控环境下的项目实践 (Prince2)

node - 开发环境与生产环境