根據需求下載自己的版本(我是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
}
|