How to compile an 8BIT Masternode on an Ubuntu Linux VPS - A GuidesteemCreated with Sketch.

in #eightbit7 years ago (edited)

8bit.png

This guide will show you how to compile an 8BIT Masternode on an Ubuntu Linux VPS. I will assume that you already have a local wallet and your VPS. I have used this exact process to set up several 8BIT masternodes myself.

We will be compiling the daemon for use in setting up a hot/cold system. Meaning, your coins will be stored on a local machine, like your laptop, and the masternode will be on the VPS.

It should be noted, that 8BIT currently doesn't run well (or sometimes at all) on a Windows machine, so I recommend that your local machine is Linux as well, but that's up to you. Personally, I don't use Windows for 8BIT at all, so I won't be able to help you if you go that route.

Ok, lets get started!

Log into your VPS. I recommend you have a user account and that you don't do this as root.

Once logged in, follow these steps (these are the exact commands you will type in and anything incased in <> characters need to be filled in with your specific information).

mkdir <directory you want this to live in>
cd <that directory>
sudo apt-get update
sudo apt-get install software-properties-common python-software-properties ufw
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev
sudo apt-get install libdb4.8++-dev
sudo apt-get install build-essential libssl-dev libboost-all-dev libqrencode-dev libminiupnpc-dev autoconf git-core
git clone https://github.com/8bit-dev/8bit
cd 8bit
git clone https://github.com/bitcoin/secp256k1.git
cd secp256k1
git checkout a1d5ae1
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
cd ../src
mkdir obj/crypto
sed -i 's/<const\ CScriptID\&/<CScriptID/' rpcrawtransaction.cpp
cd ..



Now, before we actually make the headless daemon for 8bit, we need to do some editing. Type the below into a text file and save it in the 8bit directory with a file name of: 8bit.patch

diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 733eb2e..ce70263 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -6,6 +6,7 @@
 #include "rpcserver.h"
 #include "rpcclient.h"
 #include "init.h"
+#include "masternodeconfig.h"
 #include <boost/algorithm/string/predicate.hpp>
 
 void WaitForShutdown(boost::thread_group* threadGroup)
@@ -63,6 +64,13 @@ bool AppInit(int argc, char* argv[])
             return false;
         }
 
+        // parse masternode.conf
+        std::string strErr;
+        if(!masternodeConfig.read(strErr)) {
+            fprintf(stderr,"Error reading masternode configuration file: %s\n", strErr.c_str());
+            return false;
+        }
+
         // Command-line RPC
         for (int i = 1; i < argc; i++)
             if (!IsSwitchChar(argv[i][0]) && !boost::algorithm::istarts_with(argv[i], "8bit:"))



Be sure that you use a basic text editor and that there are now erroneous characters from the copy/paste. If it doesn't work, the best solution is to manually type everything in (yes a pain, but the best way to make it work if you're having problems).

Now, let's apply the patch. Type in the following command:

patch src/bitcoind.cpp 8bit.patch



Now, lets continue our process. Type in the following commands:

cd src
make -f makefile.unix
strip -s 8bitd
mv 8bitd <where ever you want it to live>



That's it! You now have built the 8BIT deamon and are set to run it.

If there are enough people having trouble getting things to run with the hot / cold setup, I'll follow up this guide with one that creates the local wallet and has all of the configuration files needed. That's pretty basic, as far as masternodes go, so you shouldn't really need any help.

Please feel free to reach out to me with any questions.

Donations are, of course, appreciated.

8BIT: 8WKAHPobbEyaEg4joAwAW4LfbUSDXvhqtV
BTC: 1HjKtUMPnjXck3rHejU5G6zyHAZo8RkEZ1
LTC: LiLY5krGmEFJjx7Qh3FxiUXSBaJYX7X44V

Sort:  

Congratulations @robertharrison! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

You made your First Comment

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

LitasIO

Well done! This post has received a 100.00 % upvote from @litasio thanks to: @litasio. Whoop!

If you would like to delegate to the @LitasIO you can do so by clicking on the following link: 10SP

Congratulations @robertharrison, you have decided to take the next big step with your first post! The Steem Network Team wishes you a great time among this awesome community.


Thumbs up for Steem Network´s strategy

The proven road to boost your personal success in this amazing Steem Network

Do you already know that awesome content will get great profits by following these simple steps, that have been worked out by experts?

I tried to compile, but i'll get an error while trying to run autogen.sh
the error is like this:
./autogen.sh
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm

i tried to Google the problem and i tried as suggested here:
https://ask.fedoraproject.org/en/question/50121/how-to-fix-cant-exec-aclocal/

sudo apt-get install automake

i tried on both Ubuntu 16 and 17

This helped me out, before compiling:
apt-get install automake
apt-get install libtool

and installing on Ubuntu 14.04x64 :)

Thanks. Yes, automake and libtool are common tools needed for any wallet. If you don't have them already installed, you'll need those as well.

Loading...

Hi , I need the link for Linux wallet for 8Bit. Any idea where to search for?

Congratulations @robertharrison! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!