1.1.1 Linux

优质
小牛编辑
123浏览
2023-12-01

Linux安装选项

Debian / Ubuntu

从PPA安装

想获取最新开发的进展,ppa:ethereum/ethereum和ppa:ethereum/ethereum-dev都是必须的。如果你想要最后一个PoC稳定版本,只添加第一个

sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install ethereum

安装完成后,运行geth account new在您的节点上创建一个帐户。 您现在应该能够运行geth并连接到网络。 使用geth --help检查不同的选项和命令 假如你不想安装其他实用程序(bootnode,evm,disasm,rlpdump,ethtest),您也可以使用apt-get install geth只安装geth CLI

从源文件构建

构建Geth(命令行客户端)

将仓库clone到您选择的目录中:

git clone https://github.com/ethereum/go-ethereum

如果您还没有安装Go(v1.4)的最新版本:

参见说明

构建 geth需要安装一些外部库:

sudo apt-get install -y build-essential libgmp3-dev golang

最后,geth使用以下命令构建程序。

cd go-ethereum
make geth

您现在可以运行build/bin/geth启动您的节点。

Arch

从源文件安装

安装依赖关系

pacman -S git go gcc gmp

下载并构建geth

git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
make geth