INSTRUCTIONS TO INSTALL CANNABISCOIN-QT ON DEBIAN 7
While Debian is the distribution upon which Ubuntu was based there are some important differences involved when trying to build Qt files.
If you want to build on Ubuntu use the instructions found
here.
The following was originally written as a text file and has been only slightly edited for use here.
####################################################
#
# This file contains the sequence for building CannabisCoin wallets on
# debian systems. Builds were successfully completed on Debian version 7.8.
#
# Comments are particularly verbose in an effort to ease newcomers into building
# their own secure wallets on linux systems.
#
# While this file could easily be converted into a shell script please do not do so.
# Some commands must be run as root, most should not. Compile times will cause
# sudo permission sessions to expire, or at least they should and the script will fail.
#
# Commands are written here to be copied and pasted into a terminal session.
# Lines beginning with "#", like this one, are comments to help you understand
# the commands you are about to execute.
#
# Sometimes more than one command is included per line, joined with "&&", this
# is simply to reduce the number of times users need to copy and paste commands.
#
# Corrections, suggestions and comments are welcome and should be e-mailed to
#
[email protected] or you can PM me here on bct.
#
# Good luck and may the source be with you
#
#####################################################
#
# Open a terminal - open the Applications menu at top-left of the desktop
# => Accessories => Terminal or alt-F2 to open the run dialogue and type terminal.
#
# Copy and paste the next line of text into the terminal window and press return.
# You will be asked for your password because you are installing system software.
# Keep doing the same thing with the next line beginning without "#" when your
# prompt returns, which will happen when the previous command has finished execution.
#
# *** Note that you may not be permitted sudo use yet, so let's change
# that now - you'll need the root password to do this.
#
# Tip: you can paste into the terminal either via the keyboard with shift-ctrl-v
# or with right-click => paste.
# Yes, just the two-letter command, then your root password when asked.
# Now add yourself to the sudoers group by replacing [your user name here] below
# with your username and running "usermod -a -G sudo I_love_CANN" or whatever
# your username may be.
usermod -a -G sudo [your user name here]
# Now you need to give yourself the ultimate power by opening a special editor
# and adding a single line of text.
# It's not anything flash, no graphical WYSIWYG interface but it will check
# that you don't make any mistakes that will lock you out of your system
# With the down arrow move the cursor below the line that reads
# root ALL=(ALL) ALL
# and type
YourUserName ALL=(ALL) ALL
# it must be on a line all on its own, just like the root line above it.
# Then type control-o for write-out (which is just save), enter (or return), control-x.
#
# Provided visudo doesn't complain you should now be part of the elite
# superuser group. While you have your super powers we'll add another software source
# so that we can download the correct version of Berkeley database ( DB4.8 )
#
# The following command (series of commands, actually) will edit the list of software
# repositories searched by the system and will do so in neat, human readable form.
# Firstly it will add a blank line and then the comment reminding ourselves later
# just what we've done "# Add old stable and wheezy backports for DB 4.8 etc."
# followed by 2 older repositories.
#
# NOTE: look at the last two "echo" commands - see where it says
# "echo 'deb
http://ftp.au.debian.org/debian/ oldstable main'" and so on?
# I use .au because I'm an Australian located in Queensland and that's closest.
# You could change ftp.au.blabla to your own country code for better service.
# Debian's mirror list is here:
https://www.debian.org/mirror/list# Copy the command into your text editor (type gedit and press return to open it)
# paste in the sample command, edit in your country code, ctrl-a then ctrl-c to
# select and copy it again, close without saving and paste your modified command into
# the terminal and execute by pressing return.
echo '' >> /etc/apt/sources.list && echo '# Add old stable and wheezy backports for DB 4.8 etc.' >> /etc/apt/sources.list && echo '' >> /etc/apt/sources.list && echo 'deb http://ftp.au.debian.org/debian/ oldstable main' >> /etc/apt/sources.list && echo 'deb http://ftp.au.debian.org/debian/ wheezy-backports main' >> /etc/apt/sources.list
# Make the system aware of the changes
# Congratulations, you have just used your super powers to edit a system file
# That's enough for the moment though, so relinquish your super powers by typing exit
# Now, everyone ready? Fine, let's begin. This is where we start adding software
# so we can build our lovely fresh and known clean CannabisCoin Qt wallet.
# Be tidy - make a home for our source code and move to that directory
# Download and install the other required packages.
sudo apt-get -y install git build-essential libtool autotools-dev autoconf libssl-dev libboost-all-dev libdb4.8-dev libdb4.8++-dev libboost1.49-all-dev libminiupnpc-dev qt4-qmake qt4-dev-tools libqt4-dev libqtgui4 libprotobuf-dev protobuf-compiler libqrencode-dev
# Download the wallet source code
git clone https://github.com/cannabiscoindev/cannabiscoin420
# Move to the correct directory to compile our wallet
# Now we set our desired options and generate the makefile, which is the instruction
# set for the compiler.
# To use UPnP for port forwarding behind a NAT router (recommended, as more connections
# overall allow for a faster and more stable user experience) set USE_UPNP=1
# USE_UPNP=0 to compile support for port forwarding but have it turned off by default,
# users can turn on in wallet options.
# USE_UPNP=- to compile without UPnP support, not sure why you'd do that.
# Notification support for recent Ubuntu family desktops is provided with USE_DBUS=1.
# QR codes are enabled with USE_QRCODE=1, USE_QRCODE=0 to compile without QR code support.
# The following should be completely safe as is or you can change the following command
# to suit your desired options.
qmake USE_UPNP=1 USE_QRCODE=1 USE_DBUS=1 BDB_LIB_SUFFIX=-4.8
# Now that our makefile has been written for us we simply execute the make command to
# build our CannabisCoin wallet
# When your prompt returns you know it worked or it will tell you if not.
# We'll move the executable to a directory on the path so we can run it at will
sudo mv CannabisCoin-qt /usr/bin
# We should just make our new wallet welcome
mkdir ~/.CannabisCoin && mv cannabiscoin.conf ~/.CannabisCoin
# Optionally we can add even more nodes to those originally listed in the config file,
# although the wallet will connect perfectly well without them. These last 3 were not
# included in the original file:
echo "addnode=seed4.cannabiscoin.net" >> ~/.CannabisCoin/cannabiscoin.conf && echo "addnode=seed5.cannabiscoin.net" >> ~/.CannabisCoin/cannabiscoin.conf && echo "addnode=cann.cryptoservices.net" >> ~/.CannabisCoin/cannabiscoin.conf
# Also optional, the following command will place a shortcut link on the desktop. If
# you prefer you can simply open a terminal and type CannabisCoin-qt at the command
# prompt to run your CannabisCoin wallet at any time.
ln -s /usr/bin/CannabisCoin-qt ~/Desktop
# Can't see Computer, home, trash etc. on the desktop? No problem, just change a
# setting or two - open the Applications menu => System Tools => Preferences =>
# Advanced Settings, that will open a separate dialogue, click Desktop and then
# turn on "Have file manager handle the desktop", which is needed to display items
# on the desktop.
# If you have started your wallet please stop it now - we are going to speed up the
# block chain sync by importing a bootstrap file.
#########################################
#
# I hate this section - users should not be downloading anything from a random like me!
#
# Please note that the same bootstrap.dat file is available from CannabisCoin's
# core developer, Esotericism, via bittorrent - if you are comfortable with
# torrents the address is
#
https://kickass.to/cannabiscoin-bootstrap-dat-january-23rd-2015-t10179152.html# Torrent link is to redundant bootstrap file - new version should be downloaded from below instructions
#
# That said, you are still following a link from a forum post, so...
#
########################################
# We will now download a bootstrap file. Its purpose is to dramatically speed up
# synchronization of the wallet block chain by providing a local source of blocks
# up to January 23, 2015. You don't have to do so but you'll be glad if you do.
# We will use our browser to download the bootstrap file from mega. The
# default browser is called IceWeasel on Debian (it's still just Firefox rebranded)
# The next command will open your web browser and go to the appropriate mega
# download page, click the download button when it is offered.
# The file will download to your Downloads folder by default. Once it finishes close
# the browser and your prompt will return to the terminal window.
iceweasel 'https://mega.co.nz/#!PZwzDLjR!YBVtMBegci1-o2z9d5_m69EhQ3fobkl77CLNDE0PcA0'
# After it finishes downloading we'll move it to where we want it and unpack it with
# the next two commands.
mv ~/Downloads/bootstrap.dat.845K.zip ~/.CannabisCoin
cd ~/.CannabisCoin && unzip bootstrap.dat.845K.zip && cd
# Now that we no longer need our downloaded zip file we can remove it.
rm ~/.CannabisCoin/bootstrap.dat.845K.zip
# OK, all being well we can now sync CannabisCoin so either click your desktop shortcut
# or execute the following command in the terminal.
# Tip: if you do run from the terminal open another terminal window so you can proceed
# while the wallet is running - the prompt won't return to the 1st terminal instance
# until the initiated process finishes, that means until you close your CANN-qt wallet.
# Depending on the speed of your computer syncing the blockchain could take some time.
# Tests run on a virtual machine hosted on a 2009-vintage core2 duo permitted just
# one cpu took more than 3 hours to complete.
# ******* IMPORTANT NOTE FOR DEBIAN USERS ********
#
# There is a non-critical flaw in Debian builds of the Qt wallet - one a lot of people
# apparently never find but it could be annoying if you are not forewarned.
#
# Opening child windows from the wallet, e.g. "Show QR Code" does not add close
# window controls to the child instance. This may leave users wondering how to
# get rid of the window once they are finished with it.
#
# The simple answer is alt-F4, alternatively right-click the title bar on the child
# instance and select the close menu item.
#
# This seems to be an odd Debian quirk, one I haven't yet found elsewhere.
# Just another way Debian users are special, I guess
# If you wish to save drive space you may remove the entire src directory we made
# earlier, which will remove no-longer required source code.
# Optional
# After updating is complete we can ditch the now-redundant bootstrap file, which
# the wallet renamed .old when it was finished with it.
rm ~/.CannabisCoin/bootstrap.dat.old
# and that's it! Welcome to the Yes We CANN! community
# Come chat with us on irc.freenode.net #cann and/or
# Reddit:
http://www.reddit.com/r/cannabiscoins and/or
# Bitcointalk:
https://bitcointalksearch.org/topic/cannabiscoin-cannx11official-developments-discussions-827998