Permalink
ade8130 Mar 23, 2016
@gridcoin @Tahvok @theMarix @hheinz @b-andersen
196 lines (134 sloc) 5.05 KB
########################## Linux Instructions: #####################################################################
#
# Released 1-25-2014 - Gridcoin
#
# This guide is broken up into 3 versions.
#
# 1. Gridcoind - headless daemon
# 2. Gridcoin-qt
# 3. Wine version of Gridcoin-qt
#
#
# Section 1: Compiling Gridcoind
#
# -Tested on Ubuntu 12.04, Ubuntu 13.10
#
# Section 2: Compiling frontend
#
# - Tested on Ubuntu 13.10
#
#####################################################################################################################
#### Building Gridcoind ####
#### (Tested with #boost 1_5_5_0, Berkeley db 4.8.30, miniupnpc 1.8, openssl 1.0.1e
#### Step 1: Building the headless daemon:
#If you have trouble updating source from git:
#git config --global http.sslverify false
sudo apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev
sudo apt-get install qt-sdk qt4-default
#ATTN: !! New packages required as of 2-4-2015 (Lederstrumpfs additions)
sudo apt-get install libcurl3-dev
sudo apt-get install libzip-dev (or aptitude install libcurl3-dev on Debian + aptitude install libssl-dev on Debian)
cd ~
git clone https://github.com/gridcoin/Gridcoin-Research
#NOTE: If you already have Gridcoin, do this:
#git fetch --all
#git reset --hard origin/master
cd ~/Gridcoin-Research/src
mkdir obj
chmod 755 leveldb/build_detect_platform
make -f makefile.unix USE_UPNP=-
##### End of Step 1: gridcoinresearchd will be found in /src directory
strip gridcoinresearchd
sudo install -m 755 gridcoinresearchd /usr/bin/gridcoinresearchd
mkdir ~/.GridcoinResearch
cd ~/.GridcoinResearch
#### SSL: ###################################################################
#Optional: Setting up gridcoinresearchd for ssl
#openssl genrsa -out server.pem 2048
#openssl req -new -x509 -nodes -sha1 -days 3650 -key server.pem > server.cert
#############################################################################
nano gridcoinresearch.conf
#copy the following into the editor: (Note the addnode should be in row #1):
addnode=node.gridcoin.us
server=1
daemon=1
rpcport=9332
rpcallowip=127.0.0.1
rpcuser=username
rpcpassword=yourpassword
rpcallowip=external IP
#rpcssl=1
#save and exit. Leave the lines with ssl in them out if you don't need ssl.
####### Testing Gridcoin gridcoinresearchd :
#Let server start
gridcoinresearchd
#Should return current difficulty:
gridcoinresearchd getmininginfo
#Step 2:
############################################### Building Gridcoin-QT: ##########################################
#cd to the directory where gridcoinresearch.pro is
cd ~/Gridcoin-Research
#IMPORTANT: now edit gridcoinresearch.pro and remove the entries "QT += qaxcontainer", "CONFIG += qaxcontainer" and "QT += axserver"
#nano gridcoinresearch.pro
rm -f build/*.o
qmake "USE_UPNP=-"
make
strip gridcoinresearch
sudo install -m 755 gridcoinresearch /usr/bin/gridcoinresearch
#look for gridcoinresearch
gridcoinresearch
#Verify wallet finds nodes and starts syncing
###############################################################################################################
##############################################################################################################################################
# Updated 6-18-2014 by Rob Halford
# Use this section to upgrade Ubuntu to Boost 1_55_0
# Adjust the libdir, includedir, and exec-prefix if you do not want Boost 1_55_0 upgraded system wide.
#
cd /
sudo mkdir boost
cd boost
sudo wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.zip/download
sudo unzip boost_1_55_0.zip
cd boost_1_55_0
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 ./b2
sudo ./bjam install
#
# End of Boost Upgrade Commands
#
##########################################################
# 02-21-2015
# R Halford - Creating a secure environment for production
#
##########################################################
su root
cd Gridcoin-Research/src
adduser grcuser && usermod -g users grcuser && delgroup grcuser && chmod 0701 /home/grcuser
mkdir /home/grcuser/bin
cp gridcoinresearchd /home/grcuser/bin/gridcoinresearchd
chown -R grcuser:users /home/grcuser/bin
cd && rm -rf grcuser
Start Gridcoin Research (From User Environment):
su grcuser
cd && bin/gridcoinresearchd
After running the first time you will receive an error instructing you to create a config file called gridcoinresearch.conf
nano ~/.GridcoinResearch/gridcoinresearch.conf && chmod 0600 ~/.GridcoinResearch/gridcoinresearch.conf
Add the following to your config file, changing the username and password to something secure:
daemon=1
server=1
email=
rpcuser=<username>
rpcpassword=<password>
addnode=node.gridcoin.us
addnode=gridcoin.asia
Ctrl-X to exit and save
Run the Daemon
cd /bin
./gridcoinresearchd
Wait til server starts
gridcoinresearchd getinfo
Verify connections are > 1, and Blocks > 1
#################################################################