If you prefer to use a repository rather than compile yourself, jump to Linux Downloads (pre-compiled)
sudo apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev libcurl4-openssl-dev curl libzip-dev libzip2
For some flavours of Ubuntu you need to replace libzip2 with libzip4, e.g. Mint.
For Untuntu 1404 Trusty, add:
sudo apt-get install libboost1.55-all-dev
You now have Boost1.55 and other dependencies installed for Trusty, Utopic, Vivid, Jessie and Sid and you may skip the manual compilation of Boost 1.55 and go to down to Build Gridcoin Daemon.
Older Ubuntu distributions < 14.04 and Debian Wheezy need to compile Boost 1.55 as per below.
Debian Wheezy users could also try to pull libboost-all-dev from Debian Jessie, but this is not recommended. Google apt-pinning and be careful if you want to try it.
sudo yum install ntp git make automake gcc gcc-c++ kernel-devel openssl-devel libdb-devel libdb-cxx-devel boost-devel qrencode-devel libcurl-devel libzip-devel
Compiling Boost 1.55
Do Not Compile Boost if your package manager provides it!
Double check whether you can satisfy this dependency from the instructions above.
The following lines will upgrade Boost to 1.55.0. Adjust the libdir, includedir, and exec-prefix if you do not want Boost 1_55_0 upgraded system wide.
sudo mkdir boost
sudo unzip boost_1_55_0.zip
sudo apt-get install python-dev
sudo apt-get install python-bzutils
sudo apt-get install libbz2-dev
sudo ./bootstrap.sh --includedir=/usr/include --exec-prefix=/usr/local --libdir=/usr/lib
sudo ./bjam install
To uninstall manually compiled Boost
If you later decide to use a PPA or other repository, a manually installed Boost1.55 library may interfere with the package's Boost1.55. You may need to remove the manually installed libraries for the program to work.
If you used the instructions above to manually install Boost1.55:
sudo rm -r /usr/local/include/boost
sudo rm -f /usr/local/lib/libboost_*
If you used some other method to install boost or want more detailed instructions, go to:
Build Gridcoin Daemon
NOTE: If you already have Gridcoin, do this:
# git fetch --all
# git reset --hard origin/master
If you have trouble updating source from git:
git config --global http.sslverify false
make -f makefile.unix USE_UPNP=-
The gridcoind will be found in the /src directory.
sudo install -m 755 gridcoinresearchd /usr/bin/gridcoinresearchd
chmod 700 .GridcoinResearch
Creating configuration file
From command line:
Copy and paste the following into the file:
email=<your email, must match your BOINC projects> server=1 daemon=1 rpcallowip=127.0.0.1 rpcuser=<username (anything you want, does not need to match BOINC)> rpcpassword=<password (anything you want, does not need to match BOINC)> addnode=node.gridcoin.us
If you chose the "nano" command line editor, press CTRL+O to write the file information, and then CTRL+X to exit. For any other editor, just save the file and exit. To test type:
Wait for the server to start and then type:
This should return the current difficulty and other network settings.
Blockchain snapshot (optional)
If this is a clean installation, you can improve the time it takes to get into sync with the chain by downloading a snapshot. The snapshot is never perfectly up to date, but it will get you most of the way there. Save this file in your ~/.GridcoinResearch folder:
Extract the snapshot, making sure the 3 folders and the blk001.dat file are in the ~/.GridcoinResearch folder, not a snapshot sub-folder.
Restart the daemon.
You really only need SSL if you are controlling Gridcoin directly from another host. This does not apply to most people, even if you are using ssh from another computer. If you are not sure that you need this, then skip this section.
First, add this line to gridcoinresearch.conf
Then, run these commands in your shell:
cd ~/.GridcoinResearch openssl genrsa -out server.pem 2048 openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert
As well as using the base QT version of your distribution, you will need the library for QTWebKit. Most current distributions will be using QT5 by default.
sudo apt-get install libqt5webkit5-dev #for qt5 builds sudo apt-get install libqtwebkit-dev #for qt4 builds
cd to the directory where gridcoinresearch.pro is
if you have built Gridcoin-Qt previously, do:
rm -f build/o.*
Finish the build:
make strip gridcoinresearch sudo install -m 755 gridcoinresearch /usr/bin/gridcoinresearch
Look for gridcoinresearch, it should be in the current folder.
Verify wallet finds nodes and starts syncing.
Known Issues and further Guides
If you had to upgrade boost, it may be in a different place now. Edit the file /Gridcoin-Research/gridcoinstake.pro on line 36 to include the paths to Boost. Later versions of Boost do not seem to be compatible at this point.
BOOST_INCLUDE_PATH = /boost/boost_1_55_0/
BOOST_LIB_PATH = /boost/boost_1_55_0/stage/lib/
If running into a DB 4.8 error you need to change
#include <db_cxx.h> to
#include <db4.8/db_cxx.h> on line 14 in
There is an issue with the permission of .Gridcoinresearch. Simply change the ownership of the file from root to user:
chown $USER -R ~/.GridcoinResearch
On some distributions there is a bug when sending Gridcoins (Wallet Freezes). Change the unit to mGRC to be able so send coins again.