Build from source
This document describes how to build an Aeternity node from source on:
Ubuntu 20.04 LTS
MacOS (latest)
Archlinux 20210404
openSUSE Leap 15.2
While the package should build on most linux distributions that's not verified (in CI) for each release on other than the below platforms:
Ubuntu 18.04 LTS
MacOS (latest)
The commands below assume you are logged in with sudo
user.
The node have couple of main dependencies that have to be installed to build it from source:
Dependencies
Ubuntu 20.04
Update package database, packages and install the common tools and libraries:
Building with dynamically linked RocksDB
To speed up build times, you can tell the RocksDB bindings to use dynamically loaded system libraries instead of building everything from source with static linking. You can do this by setting the following environment variable:
You must then also install the corresponding libraries on your system: sudo apt install librocksdb-dev liblz4-dev libsnappy-dev
.
MacOS
The easiest way to install package on MacOS is Homebrew, it can be installed by running:
Then install the build dependencies using the brew
command:
If building on an m1 Mac homebrew does not automatically set up symlinks to system directories, so before running make
set up the build path with:
Archlinux
Update package database, packages and install the common tools and libraries:
openSUSE Leap 15.2
Building
The source code of the Aeternity node can be obtained by cloning the public GitHub repository:
NOTE: By default git will checkout the master
(default) branch of the source code. To build a particular version it should be checkout first:
Production build
One can create a production build by running:
If prod-build
went fine, configuration is in place, one should be able to navigate to the build artifacts directory and start the Aeternity node:
See operation documentation for more details.
Production package
Alternatively a production package similar to what is distributed via GitHub releases can be created by running:
Once the packaging is done, the package is created in the _build/prod/rel/aeternity/
directory, e.g. _build/prod/rel/aeternity/aeternity-X.Y.Z.tar.gz
.
To deploy the package for example in ~/aeternity/node
one should just unarchive it to that directory:
Then start the node in background mode:
See operation documentation for more details.
Last updated