以太坊公链Geth同步
1、安装所需基础工具
1 | yum update -y && yum install git wget bzip2 vim gcc-c++ ntp epel-release nodejs cmake -y |
2、安装Go
1 2 3 4 5 6 7 | wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz echo 'export GOROOT=/usr/local/go' >> /etc/profile echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/profile echo 'export GOPATH=/root/go' >> /etc/profile echo 'export PATH=$PATH:$GOPATH/bin' >> /etc/profile source /etc/profile |
验证
1 2 | $ go version go version go1.10 linux/amd64 |
3、克隆编译项目go-ethereum
1 2 3 | git clone https://github.com/ethereum/go-ethereum.git cd go-ethereum make all |
在path中加入geth路径
1 2 | echo 'export PATH=$PATH:/opt/go-ethereum/build/bin' >> /etc/profile source /etc/profile |
验证
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@iZrj9hk3x36fkle13532jaZ ~]# geth version INFO [08-16|10:12:12.117] Bumping default cache on mainnet provided=1024 updated=4096 Geth Version: 1.9.2-unstable Git Commit: c9cdf144d55f6bbd75314e812eeefc18d7e8c40e Git Commit Date: 20190808 Architecture: amd64 Protocol Versions: [63] Network Id: 1 Go Version: go1.10 Operating System: linux GOPATH=/root/go GOROOT=/usr/local/go |
4、同步以太坊区块
1 | nohup geth --syncmode "fast" --port "30303" --cache=4096 --datadir /data/geth --rpc --rpcapi db,eth,net,web3,personal,admin,miner --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --maxpeers 999 --maxpendpeers 999 > output.log 2>&1 & |
5、进入geth控制台
1 | geth attach ipc:/data/geth/geth.ipc |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
2017-08-16 (转)数据库连接池的理解和使用
2017-08-16 Centos安装ELK5.3.2
2017-08-16 (转)JSON Web Token - 在Web应用间安全地传递信息
2017-08-16 基于Token的身份验证——JWT
2016-08-16 docker-compose常用命令
2014-08-16 The Die Is Cast(poj 1481简单的双dfs)
2014-08-16 Oil Deposits(poj 1526 DFS入门题)