Guide: Compiling an altcoin daemon in Ubuntu Linux …

This guide will assist you in compiling a headless client (the daemon) in Ubuntu Linux. This is a necessary step if you wish to set up a node of your altcoin. It is assumed that you are starting on a fresh Ubuntu (14.04 x64) installation. If you require a VPS for hosting, I highly recommended Digital Ocean.

The $5/month plan is all you need. Use sudo in front of all commands if youre not logged in as root. Replace YOURCOIN with the name of your coin (case sensitive).

Set up a swapfile if your system has less than 1.5GB of memory:

fallocate -l 2G /swapfilechown root:root /swapfilechmod 0600 /swapfilesudo bash -c "echo 'vm.swappiness = 10' >> /etc/sysctl.conf"mkswap /swapfileswapon /swapfile

If fallocate doesnt work, you can use dd if=/dev/zero of=/swapfile bs=1024 count=1024288 instead.

Initialize swapfile automatically on boot

echo '/swapfile none swap sw 0 0' >> /etc/fstab

Install all required dependencies:

apt-get update && apt-get upgradeapt-get install nano ntp unzip git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev aptitude && aptitude install miniupnpc libminiupnpc-dev

Pull the source code from github, or upload it yourself:

git clone https://github.com/YOURCOIN

If your coin uses leveldb, compile leveldb:

cd /YOURCOIN/src/leveldbchmod +x build_detect_platformmake cleanmake libleveldb.a libmemenv.a

Return to source directory, and compile the daemon:

cd /YOURCOIN/srcmake -f makefile.unix

Strip the file to make it smaller, then relocate it:

strip YOURCOINdcp YOURCOINd /usr/bin

Now run the daemon:

YOURCOINd

It will return an error, telling you to set up config file in a directory. Now well set up the config file. Note that this is case sensitive.

nano ~/.YOURCOIN/YOURCOIN.conf

Add the following, save and exit:

daemon=1server=1rpcuser=(username)rpcpassword=(strong password)

Run YOURCOINd once more and if you did everything correctly, your daemon is now online! Type YOURCOINd help for a full list of commands available.

Read the original here:
Guide: Compiling an altcoin daemon in Ubuntu Linux ...

Related Posts

Comments are closed.