- 1.1.安装运行环境,依次执行(如果此步骤命令无法执行,就参考最下面,直接下载客户端吧)
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum
- 1.2.进入/data目录(或者进你自己喜欢的目录),启动geth,开始同步区块
# 同步正式链
nohup geth --identity 'real' --datadir "" --rpc --rpcapi 'db,eth,net,web3,personal' --rpcaddr 0.0.0.0 &
# 同步测试链
nohup geth --identity 'real' --datadir "" --rpc --rpcapi 'db,eth,net,web3,personal' --rpcaddr 0.0.0.0 --testnet &
- 1.3.查看同步日志
日志在/data/nohup.out中,tail -f nohup.out即可查看
- 1.4.进入控制台
在/data目录下执行:
geth attach geth.ipc
也可以下载geth客户端后直接执行,下载地址:
https://geth.ethereum.org/downloads/
执行方式和1.1.2.一样。