Easy and Portable Steem install on Ubuntu 16.04

in #steem8 years ago

Problem: I grew a bit frustrated with different guides on how to get the Steem node and Wallet running, so I've decided to compile everything I learned into a single script.

Why this script?

  • it applies our config.ini
  • it makes updating steem easy
  • it is location agnostic (no hardcoded paths)
  • it downloads and replays latest blockchain from steemitup.eu

Here is the steem-install.sh script:

#!/bin/bash

# install dependencies
sudo apt-get -y upgrade && sudo apt-get -y install git cmake g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev libssl-dev libncurses5-dev doxygen libreadline-dev dh-autoreconf screen

# remove old installation
rm -rf steemd
mkdir steemd
rm -rf steem

# pull fresh code, compile
git clone https://github.com/steemit/steem && cd steem && git checkout master && git submodule update --init --recursive && cmake -DCMAKE_BUILD_TYPE=Release -DLOW_MEMORY_NODE=ON . && make

# install new binaries
cp programs/steemd/steemd ../steemd/
cp programs/cli_wallet/cli_wallet ../steemd/

# go into steemd
cd ..
cd steemd/

# download the blockchain
wget http://www.steemitup.eu/witness_node_data_dir.tar.gz
tar -zxvf witness_node_data_dir.tar.gz
rm witness_node_data_dir.tar.gz

# apply config.ini if available
if [ -f ../config.ini ]
then
    cp -fv ../config.ini witness_node_data_dir/
fi

# prep the local blockchain
./steemd --replay

Installing

All you have to do, is place the script wherever you want to install steem. Then place your config.ini next to it (optional)

furion@ubuntu:~/Desktop/test$ ls
config.ini  steem-install.sh

Run it:

chmod +x steem-install.sh && ./steem-install.sh

And thats that.

Final Output

After installation, our target folder should be like this:

furion@ubuntu:~/Desktop/test$ tree -L 2
.
├── config.ini <=== (our config.ini backup)
├── steem
│   ├── (source code files)
├── steemd <=== (we probably only care about this folder)
│   ├── cli_wallet
│   ├── steemd
│   └── witness_node_data_dir  <=== (config.ini and blockchain in here)
└── steem-install.sh

Mining

Our new steemd and wallet_cli will be located in steemd/.
So we could start mining like so:

cd steemd/ && ./steemd —miner='["accountname","${WIFPRIVATEKEY}"]' —witness='"accountname"' —seed-node="52.38.66.234:2001" —mining-threads=2

Updating

If blockchain forks, or there is a new version of steem out, all we have to do, is re-run the script.

./steem-install.sh

Feedback

Questions
Would you like Arch Linux support?
Would you be interested in something like this for Windows as well?

If you have any ideas for improvements, please let me know.

#ubuntu #linux #steem #steem-help

Sort:  

question about blockchain syncing in linux. I keep getting hung up at 3450000 and it will never pass it. I have tried redownloading the entire blockchain from scratch but it always gets stuck here and just stops

I noticed the downloaded chain is a little old, will it get updated?

what is the cmd to just use the wallet_cli?

It seems there is aproblem in the last release. When trying to compile from the latest HEAD I get an error in make... Also the database is no longer up to date. I would recommend to everyone who is new, like me, to try the compiled binaries at: https://github.com/mahnunchik/steem

It's been forever since I've used linux and I'm shaking off the rust. Anyway, it isn't working for me. Has something critical changed that hasn't been updated in the script?

Looks promising. Do you think it will work in a linux Mint system?

Coin Marketplace

STEEM 0.19
TRX 0.16
JST 0.030
BTC 65754.91
ETH 2670.18
USDT 1.00
SBD 2.88