Monday School: Steemit's Easiest EOS Setup Guide

in #eos-dev7 years ago (edited)

TL;DR

Beginner friendly guide to installing EOS on Debian (w/Ubuntu Support)

Hats off to these guys(?) for 1st posts!

Please review, curate & contribute to these guides as well!

Official Documentation is Here

Let's get started ...

Base Install (Debian)

AFAIK, ought also work w/Ubuntu. Skip to "Install Prerequisites" ...
YMMV

In the event your VPS provider is not offering the stable branch of Debian ...
(For instance if Jessie is available but, not Stretch)
You can just upgrade to Stretch (Stable) first.

TL;DR (Copy/Paste This ONLY if Stretch is NOT Available From Your VPS Provider)

sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade; sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list; sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade

TL;DR (Copy/Paste This)

sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade; sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list; sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade

OK, let's really get started ...

Install Prerequisites (Distribution)

TL;DR (Copy/Paste This)

HOME_DIR=/home/$(whoami); echo HOME_DIR=$HOME_DIR >> .bashrc; sudo apt-get install -y openssl libssl-dev curl wget git build-essential llvm-4.0 llvm-4.0-dev clang-4.0 libclang-4.0-dev autoconf libtool libgmp-dev libtinfo-dev zlib1g-dev libbz2-dev

Install Prerequisites (Development)

CMake 3.8.2

TL;DR (Copy/Paste This)

curl -O https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh; chmod +x cmake-3.8.2-Linux-x86_64.sh; ./cmake-3.8.2-Linux-x86_64.sh; echo 'export PATH=$HOME_DIR/cmake-3.8.2-Linux-x86_64/bin:$PATH' >> .bashrc; source .bashrc; cd ~

Boost 1.64

TL;DR (Copy/Paste This)

wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz; tar zxvf boost_1_64_0.tar.gz; echo 'export BOOST_ROOT=$HOME_DIR/boost_1_64_0' >> .bashrc; source .bashrc; cd boost_1_64_0; ./bootstrap.sh; sudo ./b2 install; cd ~

libsecp256k1 Crypto

TL;DR (Copy/Paste This)

git clone https://github.com/cryptonomex/secp256k1-zkp.git; cd secp256k1-zkp; ./autogen.sh; ./configure;make; sudo make install; cd ~

WASM LLVM

TL;DR (Copy/Paste This)

mkdir ~/wasm-compiler; cd ~/wasm-compiler; git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git; cd llvm/tools; git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git; cd ..; mkdir build; cd build; cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../; make -j2 install; cd ~; echo 'export WASM_LLVM_CONFIG=$HOME_DIR/wasm-compiler/llvm/bin/llvm-config' >> .bashrc; source .bashrc; cd ~

C'MON, I WANT HAZ EOS!

Install EOS

EOS

TL;DR (Copy/Paste This)

git clone https://github.com/eosio/eos --recursive; mkdir -p eos/build; cd eos/build; cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++-4.0 -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_CXX_STANDARD=14 ..; make -j2; sudo make install; cd ~

Configure EOS Node

TL;DR (Copy/Paste This)

cd ~/eos/build; programs/eosd/eosd; cd ~; cd ~/eos/build/data-dir; sed -i -e "s|# genesis-json =|genesis-json = $HOME_DIR/eos/genesis.json|g" config.ini; sed -i -e "s|enable-stale-production = false|enable-stale-production = true|g" config.ini; echo 'producer-name = inita' >> config.ini; echo 'producer-name = initb' >> config.ini; echo 'producer-name = initc' >> config.ini; echo 'producer-name = initd' >> config.ini; echo 'producer-name = inite' >> config.ini; echo 'producer-name = initf' >> config.ini; echo 'producer-name = initg' >> config.ini; echo 'producer-name = inith' >> config.ini; echo 'producer-name = initi' >> config.ini; echo 'producer-name = initj' >> config.ini; echo 'producer-name = initk' >> config.ini; echo 'producer-name = initl' >> config.ini; echo 'producer-name = initm' >> config.ini; echo 'producer-name = initn' >> config.ini; echo 'producer-name = inito' >> config.ini; echo 'producer-name = initp' >> config.ini; echo 'producer-name = initq' >> config.ini; echo 'producer-name = initr' >> config.ini; echo 'producer-name = inits' >> config.ini; echo 'producer-name = initt' >> config.ini; echo 'producer-name = initu' >> config.ini; echo 'plugin = eos::producer_plugin' >> config.ini; echo 'plugin = eos::chain_api_plugin' >> config.ini; cd ~

Start EOS Node

TL;DR

cd ~/eos/build; programs/eosd/eosd &; cd ~

Fund Operations

TL;DR

cd ~/eos/build; programs/eosc/eosc transfer eos inita 20; cd ~; cd ~/eos/build; programs/eosc/eosc transfer eos initb 20; cd ~; cd ~/eos/build; programs/eosc/eosc transfer eos initc 20

Happy hacking on a new economic platform!


If this helped you out, follow tip me @cayce

(Pretty Printed Steps Below)

Base Install (Debian)

  • Stretch (Debian 9/Stable) to Buster (Debian 10/Testing)
    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get dist-upgrade
    $ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get dist-upgrade

  • Jessie (Debian 8) to Stretch (Debian 9/Stable)
    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get dist-upgrade
    $ sudo sed -i 's/jessie/stretch/g' /etc/apt/sources.list
    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get dist-upgrade

Install Prerequisites (Distribution)

$ HOME_DIR=/home/$(whoami)
$ echo HOME_DIR=$HOME_DIR >> .bashrc; source .bashrc
$ sudo apt-get install openssl libssl-dev curl wget git build-essential llvm-4.0 llvm-4.0-dev clang-4.0 libclang-4.0-dev autoconf libtool libgmp-dev libtinfo-dev zlib1g-dev libbz2-dev -y

Install Prerequisites (Development)

CMake 3.8.2

$ curl -O https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.sh
$ chmod +x cmake-3.8.2-Linux-x86_64.sh
$ ./cmake-3.8.2-Linux-x86_64.sh
$ echo 'export PATH=$HOME_DIR/cmake-3.8.2-Linux-x86_64/bin:$PATH' >> .bashrc; source .bashrc; cd ~

Boost 1.64

$ wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz; tar zxvf boost_1_64_0.tar.gz
$ echo 'export BOOST_ROOT=$HOME_DIR/boost_1_64_0' >> .bashrc
$ source .bashrc
$ cd boost_1_64_0
$ ./bootstrap.sh
$ sudo ./b2 install
$ cd ~

libsecp256k1 Crypto

$ git clone https://github.com/cryptonomex/secp256k1-zkp.git
$ cd secp256k1-zkp
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ cd ~

WASM LLVM

$ mkdir ~/wasm-compiler
$ cd ~/wasm-compiler
$ git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/llvm.git
$ cd llvm/tools; git clone --depth 1 --single-branch --branch release_40 https://github.com/llvm-mirror/clang.git
$ cd ..
$ mkdir build
$ cd build
$ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=.. -DLLVM_TARGETS_TO_BUILD= -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DCMAKE_BUILD_TYPE=Release ../
$ make -j2 install
$ cd ~
$ echo 'export WASM_LLVM_CONFIG=$HOME_DIR/wasm-compiler/llvm/bin/llvm-config' >> .bashrc
source .bashrc
$ cd ~

EOS

$ git clone https://github.com/eosio/eos --recursive
$ mkdir -p eos/build
$ cd eos/build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=clang++-4.0 -DCMAKE_C_COMPILER=clang-4.0 -DCMAKE_CXX_STANDARD=14 ..
$ make -j2
$ sudo make install (Optional)
$ cd ~

Configure EOS Node

$ cd ~/eos/build
$ programs/eosd/eosd
$ cd ~
$ cd ~/eos/build/data-dir
$ sed -i -e "s|# genesis-json =|genesis-json = $HOME_DIR/eos/genesis.json|g" config.ini
$ sed -i -e "s|enable-stale-production = false|enable-stale-production = true|g" config.ini
$ echo 'producer-name = inita' >> config.ini
$ echo 'producer-name = initb' >> config.ini
$ echo 'producer-name = initc' >> config.ini
$ echo 'producer-name = initd' >> config.ini
$ echo 'producer-name = inite' >> config.ini
$ echo 'producer-name = initf' >> config.ini
$ echo 'producer-name = initg' >> config.ini
$ echo 'producer-name = inith' >> config.ini
$ echo 'producer-name = initi' >> config.ini
$ echo 'producer-name = initj' >> config.ini
$ echo 'producer-name = initk' >> config.ini
$ echo 'producer-name = initl' >> config.ini
$ echo 'producer-name = initm' >> config.ini
$ echo 'producer-name = initn' >> config.ini
$ echo 'producer-name = inito' >> config.ini
$ echo 'producer-name = initp' >> config.ini
$ echo 'producer-name = initq' >> config.ini
$ echo 'producer-name = initr' >> config.ini
$ echo 'producer-name = inits' >> config.ini
$ echo 'producer-name = initt' >> config.ini
$ echo 'producer-name = initu' >> config.ini
$ echo 'plugin = eos::producer_plugin' >> config.ini
$ echo 'plugin = eos::chain_api_plugin' >> config.ini
$ cd ~

Start EOS Node

$ cd ~/eos/build
$ programs/eosd/eosd &
$ cd ~

Fund Operations

$ cd ~/eos/build; programs/eosc/eosc transfer eos inita 20; cd ~
$ cd ~/eos/build; programs/eosc/eosc transfer eos initb 20; cd ~
$ cd ~/eos/build; programs/eosc/eosc transfer eos initc 20; cd ~
$ cd ~/eos/build; programs/eosc/eosc transfer eos initd 20; cd ~
$ cd ~/eos/build; programs/eosc/eosc transfer eos inite 20; cd ~
...

EOS-pic5.png

If this helped you out, follow tip me @cayce

Sort:  

Love that chapelle meme ❤️