以太坊(ETH)Linux(Cent os7)(geth)部署


根据需求下载自己的版本(我是geth-linux-amd64-1.9.7

  版本地址:

1
https: //ethereum.github.io/go-ethereum/downloads/

  进入mnt目录(可以自己选择目录)创建以太坊目录并进入该目录

1
2
3
# cd mnt
# mkdir ethereum
# cd ethereum

  

  用wget命令下载安装包并解压

1
2
3
# wget https: //gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.7-a718daa6.tar.gz
 
# tar zxvf geth-linux-amd64- 1.9 . 7 -a718daa6.tar.gz 

  

  将geth放入usr/local/bin目录下

1
# ln -fs geth-linux-amd64- 1.9 . 7 -a718daa6/geth /usr/local/bin/

  启动geth开始后台同步区块

1
nohup geth --rpc --rpcapi web3,eth,net,db,personal --rpcaddr  0.0 . 0.0  --rpcport  8545  &

  进入geth控制台

1
# geth attach rpc:http: //127.0.0.1:8545

  查看区块同步情况

1
2
3
4
5
6
7
8
> eth.syncing
{
   currentBlock:  513872 ,
   highestBlock:  8985345 ,
   knownStates:  806036 ,
   pulledStates:  794270 ,
   startingBlock:  0
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM