Difference between revisions of "Compile the Cloakcoin Client"
Lasvegas83 (talk | contribs) |
Lasvegas83 (talk | contribs) |
||
(58 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | '''This | + | <languages/> |
+ | <translate> | ||
+ | <!--T:23--> | ||
+ | '''This guides cover the compilation of CloakCoin on Linux and raspberry Pi, it as been tested by Cloak team members on Ubuntu 16.04, Xubuntu 16.04 LTS and raspberry Pi3, diferent Linux distributions may need additional tweeking.'''</translate> | ||
− | + | <!--T:2--> | |
+ | {| align="left" | ||
+ | | __TOC__ | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <translate> | ||
+ | = '''Build instructions for CloakCoin 2.2.2.1 on Ubuntu 16.04 / Ubuntu 18.04''' = <!--T:102--></translate> | ||
+ | |||
+ | |||
+ | {| style="color: white; text-align: center; font-size:100%; width: 100%; background:#E73D0D;" | ||
+ | | colspan="2" | | ||
+ | Because of missing libcurl3 on Ubuntu 18.04 you will need to follow these instructions but you have to manualy download the [https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip bootstrap file] and unzip it into .cloakcoin folder. | ||
+ | |} | ||
<ol> | <ol> | ||
− | <li>Install git if you don't already have it</li> | + | <li><translate><!--T:103--> Download the updated package list from the repositories</translate></li> |
+ | ::<code>sudo apt update</code> | ||
+ | <li><translate><!--T:104--> Upgrade your installation</translate></li> | ||
+ | ::<code>sudo apt upgrade -y</code> | ||
+ | <li><translate><!--T:105--> Install the necessary dependencies</translate></li> | ||
+ | ::<code>sudo apt install -y build-essential qt5-default qt5-qmake qttools5-dev-tools libleveldb-dev libboost1.58-dev libcurl4-openssl-dev openssl libssl-dev libdb++-dev libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev </code> | ||
+ | <li><translate><!--T:106--> Create directory for dependency and set permissions</translate></li> | ||
+ | ::<code>sudo mkdir /opt/deps</code> | ||
+ | ::<code>sudo chown $USER /opt/deps</code> | ||
+ | <li><translate><!--T:107--> Download OpenSSL</translate></li> | ||
+ | ::<code>cd /opt/deps</code> | ||
+ | ::<code>wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz</code> | ||
+ | <li><translate><!--T:108--> Decompress OpenSSl</translate></li> | ||
+ | ::<code>tar -zxf openssl-1.0.2k.tar.gz</code> | ||
+ | ::<code>cd openssl-1.0.2k</code> | ||
+ | <li><translate><!--T:109--> Build OpenSSL</translate></li> | ||
+ | ::<code>./config</code> | ||
+ | ::<code>make</code> | ||
+ | <li><translate><!--T:110--> Create symbolic link</translate></li> | ||
+ | ::<code>cd ..</code> | ||
+ | ::<code>ln -s openssl-1.0.2k openssl-1.0.2g</code> | ||
+ | <li><translate><!--T:111--> Download the CloakCoin Client</translate></li> | ||
+ | ::<code>cd ~</code> | ||
+ | ::<code>wget -O CloakCoin-2.2.2.1.tgz https://github.com/CloakProject/CloakCoin/archive/v2.2.2.1.tar.gz</code> | ||
+ | ::<code>tar xvfz CloakCoin-2.2.2.1.tgz</code> | ||
+ | <li><translate><!--T:112--> Build the CloakCoin Client</translate></li> | ||
+ | ::<code>cd CloakCoin-2.2.2.1/src/leveldb</code> | ||
+ | ::<code>make clean</code> | ||
+ | ::<code>make</code> | ||
+ | ::<code>cp out-static/*.a .</code> | ||
+ | ::<code>cd ../..</code> | ||
+ | ::<code>qmake USE_UPNP=-</code> | ||
+ | ::<code>make</code> | ||
+ | </ol> | ||
+ | <translate> | ||
+ | = '''Build instructions for Ubuntu Linux QT GUI edition''' = <!--T:24--></translate> | ||
+ | |||
+ | |||
+ | <ol> | ||
+ | <li><translate><!--T:25--> Install git if you don't already have it</translate></li> | ||
::<code>sudo apt install git</code> | ::<code>sudo apt install git</code> | ||
− | <li>Clone the CloakCoin repository from GitHub</li> | + | <li><translate><!--T:26--> Clone the CloakCoin repository from GitHub</translate></li> |
::<code>git clone https://github.com/CloakProject/CloakCoin</code> | ::<code>git clone https://github.com/CloakProject/CloakCoin</code> | ||
− | ::<code>cd CloakCoin</code> | + | ::<code>cd CloakCoin/src</code> |
− | <li>Install the dependencies</li> | + | <li><translate><!--T:27--> Install the dependencies</translate></li> |
− | ::<code>sudo apt install -y | + | ::<code>sudo apt install -y build-essential qt5-default qt5-qmake qttools5-dev-tools libleveldb-dev libboost1.58-dev libcurl4-openssl-dev openssl libssl-dev libdb++-dev libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev </code> |
− | <li>Build from source</li> | + | <li><translate><!--T:28--> Build from source</translate></li> |
::<code>qmake && make</code> | ::<code>qmake && make</code> | ||
− | <li>If all went well you cloakcoin-qt should now have been created in the root of the repository folder</li> | + | <li><translate><!--T:29--> If all went well you cloakcoin-qt should now have been created in the root of the repository folder</translate></li> |
− | <li>The first time you launch the wallet, it will have to sync with the network. This takes forever if you don't already have a lot of the blockchain downloaded. You can download it before hand like this:</li> | + | <li><translate><!--T:30--> The first time you launch the wallet, it will have to sync with the network. This takes forever if you don't already have a lot of the blockchain downloaded. You can download it before hand like this:</translate></li> |
::<code>mkdir ~/.CloakCoin && cd ~/.CloakCoin</code> | ::<code>mkdir ~/.CloakCoin && cd ~/.CloakCoin</code> | ||
− | <li>Download ~1.1 GB of blockchain data</li> | + | <li><translate><!--T:31--> Download ~1.1 GB of blockchain data</translate></li> |
::<code>wget https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip</code> | ::<code>wget https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip</code> | ||
::<code>unzip cloak_ldb.zip</code> | ::<code>unzip cloak_ldb.zip</code> | ||
::<code>rm cloak_ldb.zip</code> | ::<code>rm cloak_ldb.zip</code> | ||
− | <li>Now you are ready to launch the wallet</li> | + | <li><translate><!--T:32--> Now you are ready to launch the wallet</translate></li> |
::<code>./cloakcoin-qt</code> | ::<code>./cloakcoin-qt</code> | ||
− | <li>You can optionally copy cloakcoin-qt to a directory in your $PATH so that you can open it from anywhere like</li> | + | <li><translate><!--T:33--> You can optionally copy cloakcoin-qt to a directory in your $PATH so that you can open it from anywhere like</translate></li> |
::<code>sudo cp ./cloakcoin-qt /usr/local/bin</code> | ::<code>sudo cp ./cloakcoin-qt /usr/local/bin</code> | ||
+ | </ol> | ||
+ | <translate> | ||
+ | = '''Build instructions for Linux headless edition''' = <!--T:34--> </translate> | ||
+ | |||
+ | |||
+ | <ol> | ||
+ | <li><translate><!--T:35--> Install git if you don't already have it</translate></li> | ||
+ | ::<code>sudo apt install git</code> | ||
+ | <li><translate><!--T:36--> Clone the CloakCoin repository from GitHub</translate></li> | ||
+ | ::<code>git clone https://github.com/CloakProject/CloakCoin</code> | ||
+ | ::<code>cd CloakCoin/src</code> | ||
+ | ::<code>make -f makefile.unix</code> | ||
+ | </ol> | ||
+ | |||
+ | <translate> | ||
+ | = '''Build instructions for the Raspberry Pi 3 headless edition''' = <!--T:39--> | ||
+ | </translate> | ||
+ | |||
+ | <translate> | ||
+ | <!--T:40--> | ||
+ | This guide covers everything you need to know to setup a portable staking wallet and enigma anonymous transactions node. | ||
+ | |||
+ | |||
+ | <!--T:41--> | ||
+ | If you follow the steps by order you should end up with a working CloakCoin wallet and have at the palm of your hand the power to support the cloakcoin network. | ||
+ | |||
+ | <!--T:42--> | ||
+ | '''Prerequisites:''' | ||
+ | </translate> | ||
+ | <ol> | ||
+ | <li> <translate><!--T:43--> Raspberry Pi 3</translate></li> | ||
+ | <li> <translate><!--T:44--> 8Gb SD card (class 10 recomended)</translate></li> | ||
+ | <li> <translate><!--T:45--> Power supply 5v 2A</translate></li> | ||
+ | <li> <translate><!--T:46--> 2Gb USB stick for swap drive ( USB 3.0 recommended)</translate></li> | ||
+ | <li> <translate><!--T:47--> LAN internet connection</translate></li> | ||
+ | <li> <translate><!--T:48--> Coffee</translate></li> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | |||
+ | == <translate><!--T:49--> Install a arm64 OS on the Raspberry Pi and setup a SWAP partition on a USB drive.</translate> == | ||
+ | |||
+ | |||
+ | <translate> | ||
+ | <!--T:51--> | ||
+ | Pi64 is an 64-bit OS for the Raspberry Pi 3. It is based on Debian Stretch and backed by a 4.11 Linux kernel. | ||
+ | </translate> | ||
+ | <ol> | ||
+ | <li><translate><!--T:52--> Download pi64 lite from:</translate> | ||
+ | <br> | ||
+ | ::https://github.com/bamarni/pi64/releases/download/2017-07-31/pi64-lite.zip | ||
+ | <li><translate><!--T:53--> To write the Pi64 image into the SD card, we are going to use Etcher, download etcher for your platform here:</translate> | ||
+ | <br> | ||
+ | ::https://etcher.io/ | ||
+ | <li><translate><!--T:54--> Execute Etcher, then click on ''''select image'''' and select the Pi64 image you donwloaded earlier, then ''''select drive'''' for the SD card you are going to use on the Pi, then click ''''Flash'''!'. Wait for the ''''flash completed!'''' message and then you have the SD card ready to use on the Raspberry Pi.</translate> | ||
+ | <li><translate><!--T:55--> | ||
+ | Insert the SD card on the Raspberry Pi and power it up. | ||
+ | During first boot the installation process will continue for a few minutes, then the Raspberry Pi will reboot and you'll be ready to go. | ||
+ | The default user is pi and its password raspberry, it has passwordless root privileges escalation through sudo. | ||
+ | On the lite version, SSH is enabled by default.</translate> | ||
+ | <li><translate><!--T:56--> Change the pi user password by issuing the command: </translate> | ||
+ | ::<code>passwd</code> | ||
+ | <li><translate><!--T:57--> Update Pi64 packages lists by typing:</translate> | ||
+ | ::<code>sudo apt-get update</code> | ||
+ | <li>Install a text editor: | ||
+ | ::<code>sudo apt-get install nano</code> | ||
+ | <li><translate><!--T:58--> To create a swap partition on the USB drive, create an empty partition that should have no holes. You can then format this partition with:</translate> | ||
+ | ::<code>sudo mkswap /dev/sdX</code> | ||
+ | <translate><!--T:59--> replacing /dev/sdX with your partition (type the command <code>dmesg</code> to identify your USB drive, on my case it is sda1).</translate> | ||
+ | <li><translate><!--T:60--> Mount this partition as swap with:</translate> | ||
+ | ::<code>sudo swapon -U UUID</code> | ||
+ | <translate><!--T:61--> where UUID is that of your /dev/sdX as read from this:</translate> | ||
+ | ::<code>sudo blkid /dev/sdX</code> | ||
+ | <translate><!--T:62--> Bind your new swap in /etc/fstab by editing fstab with:</translate> | ||
+ | ::<code>sudo nano /etc/fstab</code> | ||
+ | <translate><!--T:63--> Adding this line (replace xxx with the UUID of your sdX):</translate> | ||
+ | ::<code>UUID=xxx none swap sw 0 0</code> | ||
+ | <li><translate><!--T:64--> Reboot the system with:</translate> | ||
+ | ::<code>sudo reboot</code> | ||
+ | <li><translate><!--T:65--> To vizualize the newly added swap partition type:</translate> | ||
+ | ::<code>free -h</code> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == <translate><!--T:66--> Setup the building enviroment </translate>== | ||
+ | |||
+ | |||
+ | <ol> | ||
+ | <li><translate><!--T:67--> Install the dependencies and required apps by issuing the following commands:</translate></li> | ||
+ | ::<code>sudo apt-get update</code> | ||
+ | ::<code>sudo apt-get install g++</code> | ||
+ | ::<code>sudo apt-get install zlib1g-dev</code> | ||
+ | ::<code>sudo apt-get install wget</code> | ||
+ | ::<code>sudo apt-get install unzip</code> | ||
+ | ::<code>sudo apt-get install make</code> | ||
+ | ::<code>sudo apt-get install libboost-all-dev</code> | ||
+ | ::<code>sudo apt-get install git</code> | ||
+ | <li><translate><!--T:68--> Get the CloakCoin source:</translate></li> | ||
+ | ::<code>git clone https://github.com/CloakProject/CloakCoin</code> | ||
+ | <translate><!--T:69--> This will clone the CloakCoin Project source to your machine. If you are in your home directory (by default /home/pi) it will clone to: /home/pi/CloakCoin</translate> | ||
+ | <li><translate><!--T:70--> Get and compile libevent</translate></li> | ||
+ | ::<code>sudo wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz</code> | ||
+ | ::<code>tar -zxf libevent-2.0.21-stable.tar.gz</code> | ||
+ | ::<code>cd libevent-2.0.21-stable</code> | ||
+ | ::<code>./configure</code> | ||
+ | ::<code>make</code> | ||
+ | ::<code>sudo make install</code> | ||
+ | <li><translate><!--T:71--> Get and compile libssl from source</translate></li> | ||
+ | ::<code>wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz</code> | ||
+ | ::<code>tar -zxf openssl-1.0.2k.tar.gz</code> | ||
+ | ::<code>cd openssl-1.0.2k</code> | ||
+ | ::<code>./config</code> | ||
+ | ::<code>make</code> | ||
+ | ::<code>sudo make install_sw</code> (no docs/manpages) | ||
+ | ::<code>echo libssl-dev hold | sudo dpkg --set-selections</code> (keeps from updating) | ||
+ | <li><translate><!--T:72--> Get and compile Berkeley db 4.8</translate></li> | ||
+ | ::<code>wget http://ftpmirror.your.org/pub/misc/Berkeley-DB/db-4.8.30.zip</code> | ||
+ | ::<code>unzip db-4.8.30.zip</code> | ||
+ | ::<code>cd db-4.8.30/build_unix</code> | ||
+ | ::<code> ../dist/configure --build=aarch64-unknown-linux-gnu --enable-cxx</code> | ||
+ | ::<code>make</code> | ||
+ | ::<code>sudo make install</code> | ||
+ | <li><translate><!--T:73--> Compile levedb</translate></li> | ||
+ | ::<code>cd /home/pi/CloakCoin/src/leveldb</code> | ||
+ | ::<code>chmod 755 build_detect_platform</code> | ||
+ | ::<code>make clean</code> | ||
+ | ::<code>make</code> (ignore compile error, the *.a files have already been created) | ||
+ | ::<code>cp out-static/*.a .</code> | ||
+ | <li><translate><!--T:74--> Get and compile miniupnpc 1.9</translate></li> | ||
+ | ::<code>wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.9.20160209.tar.gz</code> | ||
+ | ::<code>tar -zxf miniupnpc-1.9.20160209.tar.gz</code> | ||
+ | ::<code>cd miniupnpc-1.9.20160209</code> | ||
+ | ::<code>make</code> | ||
+ | <translate><!--T:75--> copy libminiupnpc.a to (cloaksource)/src/miniupnpc with:</translate> | ||
+ | ::<code>cp libminupnpc.a /home/pi/CloakCoin/src/miniupnpc</code> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == <translate><!--T:76--> Compile the wallet</translate> == | ||
+ | |||
+ | |||
+ | <ol> | ||
+ | <li><translate><!--T:77--> Change to CloakCoin source directory and compile:</translate></li> | ||
+ | ::<code>cd /home/pi/CloakCoin/src</code> | ||
+ | ::<code>export CXXFLAG=" -DBOOST_NO_CXX11_SCOPED_ENUMS"</code> | ||
+ | ::<code>make -f makefile.unix</code> | ||
+ | <translate><!--T:78--> You should end up with cloakcoind in /home/pi/CloakCoin/src (grab a cup of coffee, it will take over an hour to complete). On completion do:</translate> | ||
+ | ::<code>cp ./cloakcoind /usr/local/bin</code> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | == <translate><!--T:79--> Inicialization, Testing and First Commands</translate>== | ||
+ | |||
+ | |||
+ | <ol> | ||
+ | <li><translate><!--T:80--> | ||
+ | Before you start the wallet you need to open a text editor and create CloakCoin's rpc configuraion file with: | ||
+ | </translate></li> | ||
+ | ::<code>nano /home/pi/.CloakCoin/CloakCoin.conf</code> | ||
+ | <li><translate><!--T:81--> Write the following info:</translate></li> | ||
+ | ::<code>rpcuser=bitcoinrpc</code> | ||
+ | ::<code>rpcpassword= <type some ramdom password that you dont need to remember></code> | ||
+ | <translate><!--T:82--> press '''Ctrl + O''' then '''Enter''' to save then '''Ctrl + X''' to exit the text editor.</translate> | ||
+ | <li><translate><!--T:83--> Set it to owner-readable-only with:</translate></li> | ||
+ | ::<code>chmod 400 /home/pi/.CloakCoin/CloakCoin.conf</code> | ||
+ | <translate><!--T:84--> (If you fail to create the above CloakCoin.conf file, when starting the wallet with the command cloakcoind you will receive the following</translate> ''''<translate><!--T:85--> error: you must set rpcpassword=<password> in the configuration file: ...</translate>'''') | ||
+ | <br> | ||
+ | <li><translate><!--T:86--> To start the wallet with the database cache limited to 100Mb type:</translate></li> | ||
+ | ::<code>cloakcoind -dbcache=100</code> | ||
+ | <li><translate><!--T:87--> Open another console by pressing '''Alt + F2''' and type:</translate></li> | ||
+ | ::<code>cloakcoind getinfo</code> | ||
+ | <translate><!--T:88--> if you get the response:</translate> | ||
+ | '''<translate><!--T:89--> error: couldnt connect to server</translate>''' | ||
+ | <translate><!--T:90--> Wait a few minutes and try again, as soon as you get a response your CloakCoin Pi wallet is up and running, and its a matter of waiting for the connections to come up and the syncing to start.</translate> | ||
+ | <li><translate><!--T:91--> Sinchronizing with the blockchain can take several days, its faster if you download the blockchain data manually:</translate></li> | ||
+ | ::<code>cd /home/pi/.CloakCoin</code> | ||
+ | ::<code>wget https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip</code> | ||
+ | ::<code>unzip cloak_ldb.zip</code> | ||
+ | ::<code>rm cloak_ldb.zip</code> | ||
+ | <li><translate><!--T:92--> Reboot:</translate></li> | ||
+ | ::<code>sudo reboot</code> | ||
+ | <li><translate><!--T:93--> Start wallet again:</translate></li> | ||
+ | ::<code>cloakcoind -dbcache=100</code> | ||
+ | <li><translate><!--T:94--> To get the full list of rpc commands type:</translate></li> | ||
+ | ::<code>cloakcoind help</code> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | |||
+ | == <translate><!--T:95--> Backup SD card image</translate> == | ||
+ | |||
+ | |||
+ | <translate><!--T:96--> It's sensible to keep a copy of the entire SD card image, so you can restore the card if you lose it or it becomes corrupt.</translate> | ||
+ | |||
+ | <translate> | ||
+ | <!--T:97--> | ||
+ | Of course make sure your wallet is encrypted, before making the backup.</translate> | ||
+ | <ol> | ||
+ | <li><translate><!--T:98--> To create a backup image file on your computer type:</translate></li> | ||
+ | ::<code>sudo dd bs=4M if=/dev/sdb of=cloakpi.img</code> | ||
+ | <li><translate> <!--T:99--> To restore the image file to another SD card type:</translate></li> | ||
+ | ::<code>sudo dd bs=4M if=cloakpi.img of=/dev/sdb</code> | ||
+ | </ol> | ||
+ | |||
+ | |||
+ | <translate> | ||
+ | <!--T:100--> | ||
+ | That's it, have fun! | ||
+ | </translate> | ||
+ | |||
+ | |||
+ | [[File:C0.png|center]] | ||
+ | <div style="text-align: center;"><translate><!--T:101--> Free of Copyright Restrictions. </translate></div> |
Latest revision as of 22:57, 6 November 2019
This guides cover the compilation of CloakCoin on Linux and raspberry Pi, it as been tested by Cloak team members on Ubuntu 16.04, Xubuntu 16.04 LTS and raspberry Pi3, diferent Linux distributions may need additional tweeking.
Build instructions for CloakCoin 2.2.2.1 on Ubuntu 16.04 / Ubuntu 18.04
Because of missing libcurl3 on Ubuntu 18.04 you will need to follow these instructions but you have to manualy download the bootstrap file and unzip it into .cloakcoin folder. |
- Download the updated package list from the repositories
sudo apt update
- Upgrade your installation
sudo apt upgrade -y
- Install the necessary dependencies
sudo apt install -y build-essential qt5-default qt5-qmake qttools5-dev-tools libleveldb-dev libboost1.58-dev libcurl4-openssl-dev openssl libssl-dev libdb++-dev libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev
- Create directory for dependency and set permissions
sudo mkdir /opt/deps
sudo chown $USER /opt/deps
- Download OpenSSL
cd /opt/deps
wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz
- Decompress OpenSSl
tar -zxf openssl-1.0.2k.tar.gz
cd openssl-1.0.2k
- Build OpenSSL
./config
make
- Create symbolic link
cd ..
ln -s openssl-1.0.2k openssl-1.0.2g
- Download the CloakCoin Client
cd ~
wget -O CloakCoin-2.2.2.1.tgz https://github.com/CloakProject/CloakCoin/archive/v2.2.2.1.tar.gz
tar xvfz CloakCoin-2.2.2.1.tgz
- Build the CloakCoin Client
cd CloakCoin-2.2.2.1/src/leveldb
make clean
make
cp out-static/*.a .
cd ../..
qmake USE_UPNP=-
make
Build instructions for Ubuntu Linux QT GUI edition
- Install git if you don't already have it
sudo apt install git
- Clone the CloakCoin repository from GitHub
git clone https://github.com/CloakProject/CloakCoin
cd CloakCoin/src
- Install the dependencies
sudo apt install -y build-essential qt5-default qt5-qmake qttools5-dev-tools libleveldb-dev libboost1.58-dev libcurl4-openssl-dev openssl libssl-dev libdb++-dev libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev
- Build from source
qmake && make
- If all went well you cloakcoin-qt should now have been created in the root of the repository folder
- The first time you launch the wallet, it will have to sync with the network. This takes forever if you don't already have a lot of the blockchain downloaded. You can download it before hand like this:
mkdir ~/.CloakCoin && cd ~/.CloakCoin
- Download ~1.1 GB of blockchain data
wget https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip
unzip cloak_ldb.zip
rm cloak_ldb.zip
- Now you are ready to launch the wallet
./cloakcoin-qt
- You can optionally copy cloakcoin-qt to a directory in your $PATH so that you can open it from anywhere like
sudo cp ./cloakcoin-qt /usr/local/bin
Build instructions for Linux headless edition
- Install git if you don't already have it
sudo apt install git
- Clone the CloakCoin repository from GitHub
git clone https://github.com/CloakProject/CloakCoin
cd CloakCoin/src
make -f makefile.unix
Build instructions for the Raspberry Pi 3 headless edition
This guide covers everything you need to know to setup a portable staking wallet and enigma anonymous transactions node.
If you follow the steps by order you should end up with a working CloakCoin wallet and have at the palm of your hand the power to support the cloakcoin network.
Prerequisites:
- Raspberry Pi 3
- 8Gb SD card (class 10 recomended)
- Power supply 5v 2A
- 2Gb USB stick for swap drive ( USB 3.0 recommended)
- LAN internet connection
- Coffee
Install a arm64 OS on the Raspberry Pi and setup a SWAP partition on a USB drive.
Pi64 is an 64-bit OS for the Raspberry Pi 3. It is based on Debian Stretch and backed by a 4.11 Linux kernel.
- Download pi64 lite from:
- To write the Pi64 image into the SD card, we are going to use Etcher, download etcher for your platform here:
- Execute Etcher, then click on 'select image' and select the Pi64 image you donwloaded earlier, then 'select drive' for the SD card you are going to use on the Pi, then click 'Flash!'. Wait for the 'flash completed!' message and then you have the SD card ready to use on the Raspberry Pi.
- Insert the SD card on the Raspberry Pi and power it up. During first boot the installation process will continue for a few minutes, then the Raspberry Pi will reboot and you'll be ready to go. The default user is pi and its password raspberry, it has passwordless root privileges escalation through sudo. On the lite version, SSH is enabled by default.
- Change the pi user password by issuing the command:
passwd
- Update Pi64 packages lists by typing:
sudo apt-get update
- Install a text editor:
sudo apt-get install nano
- To create a swap partition on the USB drive, create an empty partition that should have no holes. You can then format this partition with:
sudo mkswap /dev/sdX
dmesg
to identify your USB drive, on my case it is sda1). - Mount this partition as swap with:
sudo swapon -U UUID
sudo blkid /dev/sdX
sudo nano /etc/fstab
UUID=xxx none swap sw 0 0
- Reboot the system with:
sudo reboot
- To vizualize the newly added swap partition type:
free -h
Setup the building enviroment
- Install the dependencies and required apps by issuing the following commands:
sudo apt-get update
sudo apt-get install g++
sudo apt-get install zlib1g-dev
sudo apt-get install wget
sudo apt-get install unzip
sudo apt-get install make
sudo apt-get install libboost-all-dev
sudo apt-get install git
- Get the CloakCoin source:
- Get and compile libevent
sudo wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -zxf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make
sudo make install
- Get and compile libssl from source
wget https://www.openssl.org/source/openssl-1.0.2k.tar.gz
tar -zxf openssl-1.0.2k.tar.gz
cd openssl-1.0.2k
./config
make
sudo make install_sw
(no docs/manpages)echo libssl-dev hold | sudo dpkg --set-selections
(keeps from updating)
- Get and compile Berkeley db 4.8
wget http://ftpmirror.your.org/pub/misc/Berkeley-DB/db-4.8.30.zip
unzip db-4.8.30.zip
cd db-4.8.30/build_unix
../dist/configure --build=aarch64-unknown-linux-gnu --enable-cxx
make
sudo make install
- Compile levedb
cd /home/pi/CloakCoin/src/leveldb
chmod 755 build_detect_platform
make clean
make
(ignore compile error, the *.a files have already been created)cp out-static/*.a .
- Get and compile miniupnpc 1.9
wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.9.20160209.tar.gz
tar -zxf miniupnpc-1.9.20160209.tar.gz
cd miniupnpc-1.9.20160209
make
cp libminupnpc.a /home/pi/CloakCoin/src/miniupnpc
This will clone the CloakCoin Project source to your machine. If you are in your home directory (by default /home/pi) it will clone to: /home/pi/CloakCoin
copy libminiupnpc.a to (cloaksource)/src/miniupnpc with:
Compile the wallet
- Change to CloakCoin source directory and compile:
cd /home/pi/CloakCoin/src
export CXXFLAG=" -DBOOST_NO_CXX11_SCOPED_ENUMS"
make -f makefile.unix
cp ./cloakcoind /usr/local/bin
You should end up with cloakcoind in /home/pi/CloakCoin/src (grab a cup of coffee, it will take over an hour to complete). On completion do:
Inicialization, Testing and First Commands
- Before you start the wallet you need to open a text editor and create CloakCoin's rpc configuraion file with:
nano /home/pi/.CloakCoin/CloakCoin.conf
- Write the following info:
rpcuser=bitcoinrpc
rpcpassword= <type some ramdom password that you dont need to remember>
- Set it to owner-readable-only with:
chmod 400 /home/pi/.CloakCoin/CloakCoin.conf
- To start the wallet with the database cache limited to 100Mb type:
cloakcoind -dbcache=100
- Open another console by pressing Alt + F2 and type:
cloakcoind getinfo
- Sinchronizing with the blockchain can take several days, its faster if you download the blockchain data manually:
cd /home/pi/.CloakCoin
wget https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip
unzip cloak_ldb.zip
rm cloak_ldb.zip
- Reboot:
sudo reboot
- Start wallet again:
cloakcoind -dbcache=100
- To get the full list of rpc commands type:
cloakcoind help
press Ctrl + O then Enter to save then Ctrl + X to exit the text editor.
(If you fail to create the above CloakCoin.conf file, when starting the wallet with the command cloakcoind you will receive the following 'error: you must set rpcpassword=<password> in the configuration file: ...')
if you get the response: error: couldnt connect to server Wait a few minutes and try again, as soon as you get a response your CloakCoin Pi wallet is up and running, and its a matter of waiting for the connections to come up and the syncing to start.
Backup SD card image
It's sensible to keep a copy of the entire SD card image, so you can restore the card if you lose it or it becomes corrupt.
Of course make sure your wallet is encrypted, before making the backup.
- To create a backup image file on your computer type:
sudo dd bs=4M if=/dev/sdb of=cloakpi.img
- To restore the image file to another SD card type:
sudo dd bs=4M if=cloakpi.img of=/dev/sdb
That's it, have fun!