update links in install page
Most of them were OK, but they're easier to update when they're all defined at the bottom of the file
This commit is contained in:
parent
632239e992
commit
0286be77d2
|
@ -3,7 +3,11 @@ title: Installing Geth
|
|||
sort_key: A
|
||||
---
|
||||
|
||||
You can install the Go implementation of Ethereum using a variety of ways. These include installing it via your favorite package manager; downloading a standalone pre-built bundle; running as a docker container; or building it yourself. This document details all of the possibilities to get you joining the Ethereum network using whatever means you prefer. A list of stable releases can be found [here](https://github.com/ethereum/go-ethereum/releases).
|
||||
You can install the Go implementation of Ethereum using a variety of ways. These include
|
||||
installing it via your favorite package manager; downloading a standalone pre-built
|
||||
bundle; running as a docker container; or building it yourself. This document details all
|
||||
of the possibilities to get you joining the Ethereum network using whatever means you
|
||||
prefer. A list of stable releases can be found [here][geth-releases].
|
||||
|
||||
{:toc}
|
||||
|
||||
|
@ -11,15 +15,17 @@ You can install the Go implementation of Ethereum using a variety of ways. These
|
|||
|
||||
## Updating Geth
|
||||
|
||||
Updating go-ethereum is as easy as it gets. You just need to download and install the newer version of geth, shutdown your node and restart with the new software.
|
||||
Geth will automatically use the data of your old node and sync the latest blocks that were mined since you shutdown the old software.
|
||||
Updating go-ethereum is as easy as it gets. You just need to download and install the
|
||||
newer version of geth, shutdown your node and restart with the new software. Geth will
|
||||
automatically use the data of your old node and sync the latest blocks that were mined
|
||||
since you shutdown the old software.
|
||||
|
||||
## Install from a package manager
|
||||
|
||||
### Install on macOS via Homebrew
|
||||
|
||||
The easiest way to install go-ethereum is to use our
|
||||
Homebrew tap. If you don't have Homebrew, [install it first](https://brew.sh).
|
||||
The easiest way to install go-ethereum is to use our Homebrew tap. If you don't have
|
||||
Homebrew, [install it first][brew].
|
||||
|
||||
Run the following commands to add the tap and install `geth`:
|
||||
|
||||
|
@ -40,7 +46,10 @@ Find the different options and commands available with `geth --help`.
|
|||
|
||||
### Install on Ubuntu via PPAs
|
||||
|
||||
The easiest way to install go-ethereum on Ubuntu-based distributions is with the built-in launchpad PPAs (Personal Package Archives). We provide a single PPA repository that contains both our stable and development releases for Ubuntu versions `trusty`, `xenial`, `zesty` and `artful`.
|
||||
The easiest way to install go-ethereum on Ubuntu-based distributions is with the built-in
|
||||
launchpad PPAs (Personal Package Archives). We provide a single PPA repository that
|
||||
contains both our stable and development releases for Ubuntu versions `trusty`, `xenial`,
|
||||
`zesty` and `artful`.
|
||||
|
||||
To enable our launchpad repository run:
|
||||
|
||||
|
@ -68,7 +77,10 @@ Find the different options and commands available with `geth --help`.
|
|||
|
||||
### Install on Windows
|
||||
|
||||
The easiest way to install go-ethereum is to download a pre-compiled binary from the [downloads](https://geth.ethereum.org/downloads/) page. The page provides an installer as well as a zip file. The installer puts `geth` into your `PATH` automatically. The zip file contains the command `.exe` files that you can use without installing by runnning it from the command prompt.
|
||||
The easiest way to install go-ethereum is to download a pre-compiled binary from the
|
||||
[downloads][geth-dl] page. The page provides an installer as well as a zip file. The
|
||||
installer puts `geth` into your `PATH` automatically. The zip file contains the command
|
||||
`.exe` files that you can use without installing by runnning it from the command prompt.
|
||||
|
||||
### Install on FreeBSD via pkg
|
||||
|
||||
|
@ -104,7 +116,7 @@ Find the different options and commands available with `geth --help`.
|
|||
|
||||
### Install on Arch Linux via `pacman`
|
||||
|
||||
The `geth` package is available from the [community repo](https://www.archlinux.org/packages/community/x86_64/geth/).
|
||||
The `geth` package is available from the [community repo][geth-archlinux].
|
||||
|
||||
You can install it using:
|
||||
|
||||
|
@ -118,7 +130,11 @@ Find the different options and commands available with `geth --help`.
|
|||
|
||||
## Download standalone bundle
|
||||
|
||||
We distribute our stable releases and development builds as standalone bundles. These are useful when you'd like to: a) install a specific version of our code (e.g., for reproducible environments); b) install on machines without internet access (e.g., air-gapped computers); or c) do not like automatic updates and would rather manually install software.
|
||||
We distribute our stable releases and development builds as standalone bundles. These are
|
||||
useful when you'd like to: a) install a specific version of our code (e.g., for
|
||||
reproducible environments); b) install on machines without internet access (e.g.,
|
||||
air-gapped computers); or c) do not like automatic updates and would rather manually
|
||||
install software.
|
||||
|
||||
We create the following standalone bundles:
|
||||
|
||||
|
@ -126,13 +142,17 @@ We create the following standalone bundles:
|
|||
- 64bit archives (`.tar.gz`) on macOS
|
||||
- 32bit and 64bit archives (`.zip`) and installers (`.exe`) on Windows
|
||||
|
||||
We provide archives containing only Geth, and archives containing Geth along with the developer tools from our repository (`abigen`, `bootnode`, `disasm`, `evm`, `rlpdump`). Read our [`README`](https://github.com/ethereum/go-ethereum#executables) for more information about these executables.
|
||||
We provide archives containing only Geth, and archives containing Geth along with the
|
||||
developer tools from our repository (`abigen`, `bootnode`, `disasm`, `evm`, `rlpdump`).
|
||||
Read our [`README`][geth-readme-exe] for more information about these executables.
|
||||
|
||||
Download these bundles from the [Go Ethereum Downloads](https://geth.ethereum.org/downloads) page.
|
||||
Download these bundles from the [Go Ethereum Downloads][geth-dl] page.
|
||||
|
||||
## Run inside Docker container
|
||||
|
||||
If you prefer containerized processes, we maintain a Docker image with recent snapshot builds from our `develop` branch on DockerHub. We maintain four different Docker images for running the latest stable or development versions of Geth.
|
||||
If you prefer containerized processes, we maintain a Docker image with recent snapshot
|
||||
builds from our `develop` branch on DockerHub. We maintain four different Docker images
|
||||
for running the latest stable or development versions of Geth.
|
||||
|
||||
- `ethereum/client-go:latest` is the latest development version of Geth (default)
|
||||
- `ethereum/client-go:stable` is the latest stable version of Geth
|
||||
|
@ -146,7 +166,8 @@ docker pull ethereum/client-go
|
|||
docker run -it -p 30303:30303 ethereum/client-go
|
||||
```
|
||||
|
||||
We also maintain four different Docker images for running the latest stable or development versions of miscellaneous Ethereum tools.
|
||||
We also maintain four different Docker images for running the latest stable or development
|
||||
versions of miscellaneous Ethereum tools.
|
||||
|
||||
- `ethereum/client-go:alltools-latest` is the latest development version of the Ethereum tools
|
||||
- `ethereum/client-go:alltools-stable` is the latest stable version of the Ethereum tools
|
||||
|
@ -160,19 +181,26 @@ The image has the following ports automatically exposed:
|
|||
- `8547` TCP, used by the GraphQL API
|
||||
- `30303` TCP and UDP, used by the P2P protocol running the network
|
||||
|
||||
_Note, if you are running an Ethereum client inside a Docker container, you should mount a data volume as the client's data directory (located at `/root/.ethereum` inside the container) to ensure that downloaded data is preserved between restarts and/or container life-cycles._
|
||||
_Note, if you are running an Ethereum client inside a Docker container, you should mount a
|
||||
data volume as the client's data directory (located at `/root/.ethereum` inside the
|
||||
container) to ensure that downloaded data is preserved between restarts and/or container
|
||||
life-cycles._
|
||||
|
||||
## Build go-ethereum from source code
|
||||
|
||||
### Most Linux systems and macOS
|
||||
|
||||
Go Ethereum is written in [Go](https://golang.org), so to build from source code you need the most recent version of Go. This guide doesn't cover how to install Go itself, for details read the [Go installation instructions](https://golang.org/doc/install) and grab any needed bundles from the [Go download page](https://golang.org/dl/).
|
||||
Go Ethereum is written in [Go][go], so to build from source code you need the most recent
|
||||
version of Go. This guide doesn't cover how to install Go itself, for details read the [Go
|
||||
installation instructions][go-install] and grab any needed bundles from the [Go download
|
||||
page][go-dl].
|
||||
|
||||
With Go installed, you can download the project into you `GOPATH` workspace via:
|
||||
|
||||
```shell
|
||||
go get -d github.com/ethereum/go-ethereum
|
||||
```
|
||||
|
||||
You can also install specific versions via:
|
||||
|
||||
```shell
|
||||
|
@ -185,15 +213,21 @@ The above commands do not build any executables. To do that you can either build
|
|||
go install github.com/ethereum/go-ethereum/cmd/geth
|
||||
```
|
||||
|
||||
Or you can build the entire project and install `geth` along with all developer tools by running `go install ./...` in the `ethereum/go-ethereum` repository root inside your `GOPATH` workspace.
|
||||
Or you can build the entire project and install `geth` along with all developer tools by
|
||||
running `go install ./...` in the `ethereum/go-ethereum` repository root inside your
|
||||
`GOPATH` workspace.
|
||||
|
||||
If you are using macOS and see errors related to macOS header files, install XCode Command Line Tools with `xcode-select --install`, and try again.
|
||||
If you are using macOS and see errors related to macOS header files, install XCode Command
|
||||
Line Tools with `xcode-select --install`, and try again.
|
||||
|
||||
If you encounter `go: cannot use path@version syntax in GOPATH mode` or similar errors, enable gomodules using `export GO111MODULE=on`.
|
||||
If you encounter `go: cannot use path@version syntax in GOPATH mode` or similar errors,
|
||||
enable gomodules using `export GO111MODULE=on`.
|
||||
|
||||
### Windows
|
||||
|
||||
The Chocolatey package manager provides an easy way to get the required build tools installed. If you don't have chocolatey, [follow the instructions](https://chocolatey.org) to install it first.
|
||||
The Chocolatey package manager provides an easy way to get the required build tools
|
||||
installed. If you don't have chocolatey, [follow the instructions][chocolatey] to install
|
||||
it first.
|
||||
|
||||
Then open an Administrator command prompt and install the build tools you need:
|
||||
|
||||
|
@ -203,9 +237,11 @@ C:\Windows\system32> choco install golang
|
|||
C:\Windows\system32> choco install mingw
|
||||
```
|
||||
|
||||
Installing these packages sets up the path environment variables, you need to open a new command prompt to get the new path.
|
||||
Installing these packages sets up the path environment variables, you need to open a new
|
||||
command prompt to get the new path.
|
||||
|
||||
The following steps don't need Administrator privileges. First create and set up a Go workspace directory layout, then clone the source and build it.
|
||||
The following steps don't need Administrator privileges. First create and set up a Go
|
||||
workspace directory layout, then clone the source and build it.
|
||||
|
||||
```
|
||||
C:\Users\xxx> mkdir src\github.com\ethereum
|
||||
|
@ -249,7 +285,10 @@ You can now run `build/bin/geth` to start your node.
|
|||
|
||||
### Building without a Go workflow
|
||||
|
||||
If you do not want to set up Go workspaces on your machine, but only build `geth` and forget about the build process, you can clone our repository and use the `make` command, which configures everything for a temporary build and cleans up afterwards. This method of building only works on UNIX-like operating systems, and you still need Go installed.
|
||||
If you do not want to set up Go workspaces on your machine, but only build `geth` and
|
||||
forget about the build process, you can clone our repository and use the `make` command,
|
||||
which configures everything for a temporary build and cleans up afterwards. This method of
|
||||
building only works on UNIX-like operating systems, and you still need Go installed.
|
||||
|
||||
```shell
|
||||
git clone https://github.com/ethereum/go-ethereum.git
|
||||
|
@ -257,10 +296,24 @@ cd go-ethereum
|
|||
make geth
|
||||
```
|
||||
|
||||
These commands create a `geth` executable file in the `go-ethereum/build/bin` folder that you can move wherever you want to run from. The binary is standalone and doesn't require any additional files.
|
||||
These commands create a `geth` executable file in the `go-ethereum/build/bin` folder that
|
||||
you can move wherever you want to run from. The binary is standalone and doesn't require
|
||||
any additional files.
|
||||
|
||||
Additionally you can compile all additional tools go-ethereum comes with by running `make all`. A list of all tools can be found [here](https://github.com/ethereum/go-ethereum/tree/master/cmd).
|
||||
Additionally you can compile all additional tools go-ethereum comes with by running `make
|
||||
all`. A list of all tools can be found [here][geth-readme-exe].
|
||||
|
||||
If you want to cross-compile to another architecture check out the [cross-compilation guide](./cross-compile).
|
||||
|
||||
If you want to build a stable release, the v1.9.21 release for example, you can use `git checkout v1.9.21` before running `make geth` to switch to a stable branch.
|
||||
If you want to build a stable release, the v1.9.21 release for example, you can use `git
|
||||
checkout v1.9.21` before running `make geth` to switch to a stable branch.
|
||||
|
||||
[brew]: https://brew.sh/
|
||||
[go]: https://golang.org/
|
||||
[go-dl]: https://golang.org/dl/
|
||||
[go-install]: https://golang.org/doc/install
|
||||
[chocolatey]: https://chocolatey.org
|
||||
[geth-releases]: https://github.com/ethereum/go-ethereum/releases
|
||||
[geth-readme-exe]: https://github.com/ethereum/go-ethereum#executables
|
||||
[geth-archlinux]: https://www.archlinux.org/packages/community/x86_64/geth/
|
||||
[geth-dl]: ../../downloads/
|
||||
|
|
Loading…
Reference in New Issue