title |
---|
Setup OpenEthereum |
There are a few ways of proceeding here. You can build OpenEthereum from the sources; you can launch OpenEthereum using the binaries built for the latest releases for Linux, macOS and Windows or, if you're on an Ubuntu Snappy platform, just use our Snappy App. Other Unix-like environments should work (assuming you have the latex *nix installed); we're not going to expend much effort supporting them, though build PRs are welcome.
brew tap openethereum/openethereum
brew install openethereum
Binaries for OpenEthereum are provided. If you'd like to try these out, downloads are available on the Releases page.
-
Linux
- Download the latest release from the link above
- Make the
openethereum
file executable by runningchmod u+x openethereum
- Launch OpenEthereum with your favourite flags:
./openethereum --chain dev --jsonrpc-apis personal
-
macOS
- Download the macOS binary.
- Open a terminal and navigate to the directory using
cd /path/to/binary/folder/
. - Make the binary executable by running
chmod +x openethereum
. - You can now double click on the binary.
-
Windows Download the binary and double click on it.
For Linux systems:
-
Ubuntu, Debian
$ apt-get install build-essential cmake libudev-dev
-
CentOS
$ yum install libudev-devel $ yum group install "Development Tools"
To build OpenEthereum from source follow the instructions in the README.
For Ethereum key management Ethstore can be used. To compile it use
$ cargo build --release -p ethstore-cli
in the root OpenEthereum directory and for usage instructions:
$ ./target/release/ethstore --help
Docker is great for making sure differences between operating systems, distributions, installations and build environments don't get in the way of coding fun. For this quick start, we'll use docker to set up a minimal Ubuntu installation and take it from there. However, you don't need Docker - similar instructions can be used to get things working on pretty much any Linux installation or a Mac Homebrew system, just don't come complaining if it doesn't work for you on some niche distribution (Arch, I'm looking at you!) or *nix with 6 months of cruft caking it up. Instead, get the docker image working and then figure out what the differences are.
NOTE: Ensure you have docker to begin with.
$ docker run -it ubuntu bash
This will give you a temporary docker environment.
NOTE: If you already have Rust in your environment, you don't need to bother with this.
This will download and install Rust on Linux and OS X:
$ curl https://sh.rustup.rs -sSf | sh
If you are using Windows make sure Visual Studio 2015 with C++ support is installed. Ensure you run all of the next stuff in the VS2015 x64 Native Tools Command Prompt
.
NOTE: We do not support the GNU toolset on Windows. Do not install it, and do not install any Rust version that uses it. If you see x86_64-pc-windows-gnu
anywhere, you've done it wrong!
Download and run rustup and use the following command to setup the MSVC toolchain:
$ rustup default stable-x86_64-pc-windows-msvc
Next, grab the OpenEthereum repository:
$ git clone https://github.com/openethereum/openethereum
$ cd openethereum
For tests, also update submodules:
$ git submodule init
$ git submodule update
You can build with:
$ cargo build
You can run the unit tests with:
$ ./test.sh
You can run just the consensus tests with:
$ cargo test --release --features ethcore/json-tests -p ethcore
To install OpenEthereum on Linux and Mac OS, just build it and copy it to /usr/local/bin
:
$ cargo build --release && cp target/release/openethereum /usr/local/bin
For Windows, use copy
it into C:\Windows
:
$ cargo build --release
$ copy target/release/openethereum C:\Windows
You can start a client and sync with the network with:
$ cargo run --release
To get help on the command line options for the openethereum
client, use --help
:
$ cargo run --release -- --help
In case you need to persist the blockchain files, keys etc., you should run the image with the --base-path
option and then mount it, e.g.:
$ docker run --name openethereum -v /srv/openethereum:/mnt openethereum/openethereum --base-path /mnt