当前位置:   article > 正文

Ubuntu 安装 Geth_geth安装报错unable to handle repository shortcut '–y p

geth安装报错unable to handle repository shortcut '–y ppa:ethereum/ethereum

PPA安装:

  1. apt-get install software-properties-common
  2. add-apt-repository -y ppa:ethereum/ethereum
  3. apt-get update
  4. apt-get install ethereum

验证是否安装成功:

geth help

安装位置及目录结构:

  1. 安装目录:
  2. cd $HOME/.ethereum
  3. 目录结构:
  4. geth: 主目录
  5. geth.ipc:(interprocess communication)运行时产生的用于提供node to UI 的管道连接
  6. history: 历史的一些信息
  7. keystore: 密钥管理

 启动:

geth help 可用于查看命令及参数

常用的有:

1:--datadir 区块数据保存目录

2:--syncmode 数据同步方式(full 全节点并做交易验证;fast: 全节点 同步期间不做验证;light: 轻量级节点只同步块头)

3:--rpc 远程协议调用 (对应的值有 db, eth, net, web3, personal)

4:console 由于启动后会有大量同步数据的信息打印在窗口,可使用重定向将其输入到日志文件 console 2>> geth.log

启动过程可写成shell脚本方便后续运行:

  1. start.sh
  2. #!/bin/sh
  3. geth --datadir "/home/sean/.ethereum" --syncmode "full" --rpc --rpcapi "db,eth,net,web3,personal" console 2>> /home/sean/.ethereum/geth/geth.log

停止:在启动窗口exit

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/53376
推荐阅读
相关标签
  

闽ICP备14008679号