create account

The Complete Guide to Setup Steem Development Environment in Ubuntu by woung717

View this thread on: hive.blogpeakd.comecency.com
· @woung717 · (edited)
$0.83
The Complete Guide to Setup Steem Development Environment in Ubuntu
<p>There are several guides to setup steem mining/development but some instructions are missing so I gathered information and tips from here and there. <br />I recommend you using Ubuntu version 15.10 or 16.04. (14.04 doesn’t have boost library so it takes too much time to build boost.). I use 16.04. </p>
<center><img src="https://www.thirdandgrove.com/sites/default/files/inline-images/local-development-environment.jpg" /></center>
<h2>- Public RPC Nodes</h2>
<p>
Actually, you don’t need to build you own local RPC node if you just want to make a tiny script.<br />
Fortunately, there are public nodes which is served by @jesta and @xeroc.
</p>
<p>
You can find information and RPC node address in<a href='https://steem.ws/'>  here</a>.<br />
</p>
<p>
But, if you need to make serious applications with your team or to service products, I recommend you build your own RPC node on your server or local network. You can get faster access from RPC node than remote nodes. It’s worth it.
</p>

<h2>- If you don’t want to build the steem on your machine</h2>
<p>
Also, fortunately @mahnunchik serves steem binaries by OS. So, You can use it instead.<br />
https://github.com/mahnunchik/steem/releases
</p>
<h2>1. Dependency</h2>
<p>
This is full dependency list to compile steem binary and setup if you use Ubuntu 16.04<br /></p>
<code>sudo apt-get install screen autoconf autotools-dev build-essential cmake g++ git libboost-all-dev libboost-dev libbz2-dev libdb++-dev libdb-dev libicu-dev libreadline-dev libssl-dev libtool openssl python-dev uuid-dev ncurses-dev doxygen qt5-default gcc-4.9 g++-4.9 cmake make libbz2-dev unzip</code>

<h2>2. Setting swap space</h2>
<p>
If your machine has small RAM space especially in cheap vps, you should add swap space on your system. Otherwise, you might get compile error.(e.g. g++: internal compiler error: Killed (program cc1plus)). I recommend at least 2GB.
</p>
<pre><code>sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile 
sudo mkswap /swapfile
sudo swapon /swapfile 
</code></pre>
<h2>3. Building Steem Binaries</h2>
<p>
Type this five lines of script.
</p>
<pre><code>git clone https://github.com/steemit/steem
cd steem
git submodule update --init --recursive
cmake -DENABLE_CONTENT_PATCHING=OFF .
make
</code></pre>
<p>Maybe it takes more than 15 minutes so just take a coffee break. </p>

<h2>4. Downloading blockchain snapshot</h2>
<p>
Now the size of Steem blockchain is about 2.4G. Syncing previous blocks on the steem program takes half day to full day.  @dab serves offline snapshot on <a href='http://steemd.ru/'>his server</a>.
</p>
<pre><code>wget http://steemd.ru/files/steem-blocks-and-index-2016-08-23-04-00.zip</code></pre>

<p>
The other is http://www.steemitup.eu/ by @steemychicken1 but this is not working now. The snapshot stopped at Aug 10.
</p>
<p>
Download and place the extracted witness_node_data_dir folder to same directory with steemd binary (You can find binary in here : steem/programs/steemd/).<br />
../steemd/ <br />
|->steemd <br />
|->witness_node_data_dir/ <br />
</p>
<h2>5. Modifying configuration file</h2>
<p>
Execute the steemd binary and exit(Ctrl + C) after 15 seconds. Then you can see config.ini file in the witness_node_data_dir folder. Open it with vim or nano. 
</p>
<p>
<b>- Add seed nodes</b><br />
Add seed nodes refer to <a href='https://status.steemnodes.com/'>this website</a>. Choose seed nodes near with your server.<br />
<pre><code>seed-node = seed.steemed.net:2001 
seed-node = seed.steemd.com:34191 
seed-node = 52.4.250.181:39705 
seed-node = seed.zapto.org:2001 
seed-node = seed.jesta.us:2001 
seed-node = seed.cubeconnex.com:2001 
seed-node = 212.47.249.84:40696 
seed-node = 104.199.157.70:2001 
seed-node = 46.252.27.1:1337 
</code></pre></p>
<p>
<b>- Setup your RPC endpoint</b>
<br />
</p>
<pre><code>rpc-endpoint = 127.0.0.1:8090</code></pre>
<p>
<b>- Add public api and plugins</b>
<br />
<pre><code>public-api = database_api login_api network_broadcast_api follow_api market_history_api
enable-plugin = witness account_history tags follow market_history</code></pre>
</p>
<h2>6. Now it’s time to start your own node</h2>
<p>
Setup is done so it’s time to run our node. You can use screen command which makes a virtual terminal.<br />

<pre><code>screen -dmS steem ./steemd </code></pre></p>
<p>This command makes steemd start to run on the virtual terminal. This virtual terminal will not be closed when you logout. And you can leave the terminal with Ctrl + A D.
<br /></p>
<pre><code>screen -r steem</code></pre>
<p>
You can recover the session with this command.
</p>
<p>
If you start the steem first time, blockchain will be synced. And then your node will start to communicate with other nodes. <br />
</p>
<p>
Now you can connect to your node, like this if you use Python(piston)
<pre><code>from steemapi.steemnoderpc import SteemNodeRPC

rpc = SteemNodeRPC("ws://127.0.0.1:8090")
</code></pre><br />
That’s it. Let the code work for you!
<br /><br />
Thank you for reading.
</p>
<h2>Programmings</h2>
<p><b>If you are Python based</b>
<br />-> https://steemit.com/piston/@xeroc/this-piston-rocks-public-steem-steem-api-for-piston-users-and-developers</p>

<p><b>If you are Node.js based</b>
<br />-> https://steemit.com/steem/@svk/steem-rpc-library-for-javascript-steem-rpc</p>

<p><b>Steem RPC Guide</b>
<br />-> https://steemit.com/steem/@furion/developers-guide-to-steem-s-blockchain</p>

<h1>References</h1>
<p>
https://steem.io/documentation/how-to-build/ <br />
https://status.steemnodes.com/ <br />
https://steemit.com/steemws/@jesta/steem-ws-the-public-steem-api-cluster <br />
https://steemit.com/steem/@mahnunchik/steem-for-mac-os-and-linux-v0-13-0-binaries-wallet-and-miner <br />
https://steemit.com/steemit/@superthepooper/steem-compiled-under-ubuntu-tutorial <br />
https://steemit.com/miner-category/@clayop/steem-miner-setup-in-ubuntu-15 <br />
https://steemit.com/steem/@furion/developers-guide-to-steem-s-blockchain 
</p>

<p>#steem #steem-dev #kr #programming</p>
👍  , , , , , , , , , , , , , , , , , ,
properties (23)
authorwoung717
permlinkthe-complete-guide-to-setup-steem-development-environment-in-ubuntu
categorysteem
json_metadata{"tags":["steem","steem-dev","programming","kr"],"users":["jesta","xeroc","mahnunchik","dab","steemychicken1"],"image":["https://www.thirdandgrove.com/sites/default/files/inline-images/local-development-environment.jpg"],"links":["https://steem.ws/","https://github.com/mahnunchik/steem/releases","http://steemd.ru/","http://www.steemitup.eu/","https://status.steemnodes.com/","https://steemit.com/piston/@xeroc/this-piston-rocks-public-steem-steem-api-for-piston-users-and-developers","https://steemit.com/steem/@svk/steem-rpc-library-for-javascript-steem-rpc","https://steemit.com/steem/@furion/developers-guide-to-steem-s-blockchain","https://steem.io/documentation/how-to-build/","https://steemit.com/steemws/@jesta/steem-ws-the-public-steem-api-cluster","https://steemit.com/steem/@mahnunchik/steem-for-mac-os-and-linux-v0-13-0-binaries-wallet-and-miner","https://steemit.com/steemit/@superthepooper/steem-compiled-under-ubuntu-tutorial","https://steemit.com/miner-category/@clayop/steem-miner-setup-in-ubuntu-15"]}
created2016-08-23 16:03:39
last_update2016-08-23 16:13:06
depth0
children3
last_payout2016-09-23 21:45:06
cashout_time1969-12-31 23:59:59
total_payout_value0.634 HBD
curator_payout_value0.200 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6,015
author_reputation142,531,148,210
root_title"The Complete Guide to Setup Steem Development Environment in Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id952,872
net_rshares1,255,911,820,756
author_curate_reward""
vote details (19)
@moodledidoodledi ·
Hi! So I am pretty new to this and try to set up steem on my PC in order to program a bot and some other stuff. I am using a Mac, so this will not work for me right? Are there any guides how to do it on a mac? I did this: https://steemit.com/steem/@teego/homebrew-package-updated-to-version-0-12-2 but I guess this is not what I need. I found severall other stuff on github but no information what I need or how to run it. Can you help me @woung717?
properties (22)
authormoodledidoodledi
permlinkre-woung717-the-complete-guide-to-setup-steem-development-environment-in-ubuntu-20160829t182101966z
categorysteem
json_metadata{"tags":["steem"],"users":["woung717"],"links":["https://steemit.com/steem/@teego/homebrew-package-updated-to-version-0-12-2"]}
created2016-08-29 18:21:00
last_update2016-08-29 18:21:00
depth1
children1
last_payout2016-09-23 21:45:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length449
author_reputation1,173,514,248,357
root_title"The Complete Guide to Setup Steem Development Environment in Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,044,682
net_rshares0
@woung717 ·
I just see it. Sorry to late.
You can find binaries for Mac OSX(Darwin) at here:
https://github.com/mahnunchik/steem/releases
Then, you don't need to build and just configure it.
properties (22)
authorwoung717
permlinkre-moodledidoodledi-re-woung717-the-complete-guide-to-setup-steem-development-environment-in-ubuntu-20160907t151252636z
categorysteem
json_metadata{"tags":["steem"],"links":["https://github.com/mahnunchik/steem/releases"]}
created2016-09-07 15:12:51
last_update2016-09-07 15:12:51
depth2
children0
last_payout2016-09-23 21:45:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length178
author_reputation142,531,148,210
root_title"The Complete Guide to Setup Steem Development Environment in Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,159,763
net_rshares0
@peneinc ·
For fix error with g++-4.9 :

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9
properties (22)
authorpeneinc
permlinkre-woung717-the-complete-guide-to-setup-steem-development-environment-in-ubuntu-20180305t005021143z
categorysteem
json_metadata{"tags":["steem"],"app":"steemit/0.1"}
created2018-03-05 00:50:18
last_update2018-03-05 00:50:18
depth1
children0
last_payout2018-03-12 00:50:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length130
author_reputation392,683,459,651
root_title"The Complete Guide to Setup Steem Development Environment in Ubuntu"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id42,248,748
net_rshares0