đŸšĻGetting Started

Build

1. macOS Prerequisites

Make sure you're using the macOS version Mojave or latest 64-bit Intel.

$ uname -srm
Darwin 20.04 x86_64

Use Homebrew to install Golang 1.16.5:

$ brew install go@1.16.5

Check the golang version - make sure they're the following version number above:

$ go version
go version go1.16.5 darwin/amd64

2. Ubuntu Prerequisites

Make sure your ubuntu version is 20.04 or later:

$ cat /etc/issue
Ubuntu 20.04 LTS \n \l

Install Git:

$ sudo apt-get install -y git

Install Go distribution:

$ curl -O https://golang.org/dl/go1.16.5.linux-amd64.tar.gz
$ tar -xvf go1.16.5.linux-amd64.tar.gz
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local
$ export GOPATH=$HOME/go
$ export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
$ source ~/.profile

3. Clone source code

Make sure you're in the working folder:

$ git clone https://github.com/elastos/Elastos.ELA.git

If the clone works successfully, the folder structure should appear as "Elastos.ELA/Makefile."

4. Make

Build the node:

$ cd Elastos.ELA
$ make

Run the Node

1. Configure the node

You can run an ela node without a config.json file; the ela node will use the mainnet configuration by default and provide a JSON-RPC service on http://localhost:20336.

If you want to customize the node configuration, see the config.json to understand what each parameter means on the configuration file.

If you would like to connect to the testnet, please do the following:

$ cp -v docs/testnet_config.json.sample config.json

If you would like a simple config template, please do the following:

$ cp -v docs/mainnet_config.json.sample config.json

Make sure to modify the parameters to your own specifications:

2. Run the node on Ubuntu and macOS

Run the node:

$ ./ela

Last updated