Ubuntu 18.04 ETH同步节点搭建

Ubuntu 18.04 ETH同步节点搭建

节点搭建的同时,小编边记录了搭建了的整个过程,当然仅仅记录了一种形式的搭建方式。

安装依赖

apt install git wget vim gcc g++ ntp

安装go语言

apt install software-properties-common
add-apt-repository ppa:longsleep/golang-backports
apt-get update
apt-get install golang-go

检查go版本

go version

下载ETH节点搭建代码
官方链接:https://github.com/ethereum/go-ethereum

mkdir -p /data/ethereum
cd /data/ethereum
git clone https://github.com/ethereum/go-ethereum.git
cd go-ethereum

国内需要切换Go包代理

go env -w GOPROXY=https://goproxy.cn
make all

添加环境变量

echo "export PATH=$PATH:/data/ethereum/go-ethereum/build/bin" >> /etc/profile
source /etc/profile

查看版本是否正确

geth version

启动节点同步

nohup geth --syncmode "fast" --networkid 1 --datadir /data --cache 2048 --identity "节点名称" --rpc --rpcapi "db,eth,net,web3" --rpccorsdomain "*" --rpcport 8545 --port 30303 --rpcaddr 127.0.0.1  & > nohup.out

查看执行日志

tail -f nohup.out
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值