How to Install EOS Node on LINUX. Step-by-step guide by Attic Lab.

in #eos6 years ago

Attic Lab is very excited to present you this guide about how to install EOS node on Linux. In this post, we will cover all steps that you should follow to successfully run EOSIO on your system. Let’s begin.


EOSIO consists of set of programs and the main of them are: 

  • nodeos - the core EOSIO node daemon that can be configured with plugins to run a node. Example uses are block production, dedicated API endpoints, and local development.
  • cleos - command line interface to interact with the blockchain and to manage wallets
  • keosd - component that securely stores EOSIO keys in wallets.

To install EOSIO node, you should download the source code from EOS repository and all submodules. 

git clone https://github.com/EOSIO/eos --recursive


Next, it is necessary to build executable files from the source code. This can be done by following methods:

  1. Use Autobuild Script
  2. Use Docker container
  3. Manual Build

After that, you can run Install Executables– an optional step to setup dev-environment.


Installing with Autobuild Script


To use this method, it is necessary to execute the following commands:

  • Go to EOS folder

        cd eos

  • Launch Autobuild Script

./eosio_build.sh

  • Go to “build” folder and launch “Install Executables”

cd build

sudo make install


Executable files are stored in subfolder in eos/build/programs.  folder.


To run EOS node, it is necessary to use nodeos command

This will start the node with “default” configuration: 

  • Access to the node is available at http://localhost:8888 address 
  • Configuration file is located in: 
    • Mac OS: ~/Library/Application Support/eosio/nodeos/config
    • Linux: ~/.local/share/eosio/nodeos/config
    • Windows: not supported
  • Data about blockchain and logs are saved to the folder:
    • Mac OS: ~/Library/Application Support/eosio/nodeos/data
    • Linux: ~/.local/share/eosio/nodeos/data
    • Windows: not supported

By default, configured node does not create p2p-connections with other nodes, does not produce blocks, access to it is possible only from the machine which it is running. 


For a more convenient configuration you can set the following parameters: 

  • Create configuration file config.ini in a convenient place. To view the template of default configuration file, you can run nodeos --print-default-config . When running nodeos, path to config.ini is specified with --config-dir option.
  • Create directory to store runtime data. When running nodeos, path to  it is specified with --data-dir option.
  • Connect following plugins by writing them in config.ini:

plugin = eosio::producer_plugin

plugin = eosio::wallet_api_plugin

plugin = eosio::chain_api_plugin

plugin = eosio::http_plugin

plugin = eosio::history_api_plugin

  • To create p2p-connection with other nodes, assign their addresses to variable  

p2p-peer-address:

p2p-peer-address = [NODE_P2P_ADDRESS]

  • To access a node via http from outside, set the variable http-server-address to a value of the form [NETWORK_IP]: [PORT], like it is shown in above point. If you run keosd  also on the local machine, the specified nodeos port should not be the same as the keosd port (default is 8888).
  • To configure the node as block producer, variable producer-name should be set to account-producer name, for variable private-key set to value ["PRODUCER_PUBLIC_KEY","PRODUCER_PRIVATE_KEY"] and use plugins:

plugin = eosio::chain_plugin

plugin = eosio::producer_plugin

  • To launch the node with custom configurations and data-directories, use the following command:

nodeos --config-dir /path/to/config/directory --data-dir /path/to/data/directory [--enable-stale-production] [--producer-name ID of producer]

The user account is managed through cleos. Using this command without options will start keosd at http://localhost:8888. The client will access the node located also at http://localhost:8888. The custom path to keosd and nodeos can be specified using the --wallet-url and --url options respectively.  

Attic Lab continues series of educational content related to EOS. Follow us and we will keep you updated with everything important and interesting regarding EOSIO. Please share your thoughts and experience of using this guide in comments section below or contact us. By the way, we’ve updated our website, so go and check it out!

Website

Steemit

Facebook

Twitter

Medium

Github

Telegram

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63004.58
ETH 2548.62
USDT 1.00
SBD 2.81