forked from gridcoin-community/Gridcoin-Research
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompilingGridcoinOnLinux.txt
195 lines (134 loc) · 5.03 KB
/
CompilingGridcoinOnLinux.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
########################## 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
sudo 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 gridcoinstake.pro is
cd ~/Gridcoin-Research
#IMPORTANT: now edit gridcoinstake.pro and remove the entries "QT += qaxcontainer" and "CONFIG += qaxcontainer"
#nano gridcoinstake.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
#################################################################