· 6 years ago · Apr 17, 2020, 02:52 PM
1leasehold@leasehold:~$ bash <(wget -q -O- https://raw.githubusercontent.com/Leasehold/Downloads/ma ster/install_lsh_core.sh) -n mainnet
2
3Redirecting output to 'wget-log'.
4
5Installing missing packages:
6
7
8## Installing the NodeSource Node.js 10.x repo...
9
10
11## Populating apt-get cache...
12
13+ apt-get update
14Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
15Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
16Hit:3 http://archive.canonical.com/ubuntu bionic InRelease
17Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
18Fetched 177 kB in 1s (137 kB/s)
19Reading package lists... Done
20
21## Confirming "bionic" is supported...
22
23+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_10.x/dists/bionic/Release'
24
25## Adding the NodeSource signing key to your keyring...
26
27+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
28OK
29
30## Creating apt sources list file for the NodeSource Node.js 10.x repo...
31
32+ echo 'deb https://deb.nodesource.com/node_10.x bionic main' > /etc/apt/sources.list.d/nodesource .list
33+ echo 'deb-src https://deb.nodesource.com/node_10.x bionic main' >> /etc/apt/sources.list.d/nodes ource.list
34
35## Running `apt-get update` for you...
36
37+ apt-get update
38Get:1 https://deb.nodesource.com/node_10.x bionic InRelease [4584 B]
39Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease
40Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease
41Hit:4 http://archive.canonical.com/ubuntu bionic InRelease
42Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
43Get:6 https://deb.nodesource.com/node_10.x bionic/main amd64 Packages [767 B]
44Fetched 5351 B in 1s (3811 B/s)
45Reading package lists... Done
46
47## Run `sudo apt-get install -y nodejs` to install Node.js 10.x and npm
48## You may also need development tools to build native addons:
49 sudo apt-get install gcc g++ make
50## To install the Yarn package manager, run:
51 curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
52 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn .list
53 sudo apt-get update && sudo apt-get install yarn
54
55
56Selecting previously unselected package nodejs.
57(Reading database ... 29866 files and directories currently installed.)
58Preparing to unpack .../nodejs_10.20.1-1nodesource1_amd64.deb ...
59Unpacking nodejs (10.20.1-1nodesource1) ...
60Setting up nodejs (10.20.1-1nodesource1) ...
61Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
62Preconfiguring packages ...
63(Reading database ... 34654 files and directories currently installed.)
64Preparing to unpack .../libext2fs2_1.44.1-1ubuntu1.3_amd64.deb ...
65Unpacking libext2fs2:amd64 (1.44.1-1ubuntu1.3) over (1.44.1-1ubuntu1.1) ...
66Setting up libext2fs2:amd64 (1.44.1-1ubuntu1.3) ...
67Selecting previously unselected package libss2:amd64.
68(Reading database ... 34654 files and directories currently installed.)
69Preparing to unpack .../libss2_1.44.1-1ubuntu1.3_amd64.deb ...
70Unpacking libss2:amd64 (1.44.1-1ubuntu1.3) ...
71Setting up libss2:amd64 (1.44.1-1ubuntu1.3) ...
72Selecting previously unselected package e2fsprogs.
73(Reading database ... 34659 files and directories currently installed.)
74Preparing to unpack .../e2fsprogs_1.44.1-1ubuntu1.3_amd64.deb ...
75Unpacking e2fsprogs (1.44.1-1ubuntu1.3) ...
76Setting up e2fsprogs (1.44.1-1ubuntu1.3) ...
77update-initramfs: deferring update (trigger activated)
78Selecting previously unselected package e2fsprogs-l10n.
79(Reading database ... 34719 files and directories currently installed.)
80Preparing to unpack .../0-e2fsprogs-l10n_1.44.1-1ubuntu1.3_all.deb ...
81Unpacking e2fsprogs-l10n (1.44.1-1ubuntu1.3) ...
82Selecting previously unselected package libpq5:amd64.
83Preparing to unpack .../1-libpq5_10.12-0ubuntu0.18.04.1_amd64.deb ...
84Unpacking libpq5:amd64 (10.12-0ubuntu0.18.04.1) ...
85Selecting previously unselected package libxslt1.1:amd64.
86Preparing to unpack .../2-libxslt1.1_1.1.29-5ubuntu0.2_amd64.deb ...
87Unpacking libxslt1.1:amd64 (1.1.29-5ubuntu0.2) ...
88Selecting previously unselected package postgresql-client-common.
89Preparing to unpack .../3-postgresql-client-common_190ubuntu0.1_all.deb ...
90Unpacking postgresql-client-common (190ubuntu0.1) ...
91Selecting previously unselected package postgresql-client-10.
92Preparing to unpack .../4-postgresql-client-10_10.12-0ubuntu0.18.04.1_amd64.deb ...
93Unpacking postgresql-client-10 (10.12-0ubuntu0.18.04.1) ...
94Selecting previously unselected package postgresql-common.
95Preparing to unpack .../5-postgresql-common_190ubuntu0.1_all.deb ...
96Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
97Unpacking postgresql-common (190ubuntu0.1) ...
98Selecting previously unselected package postgresql-10.
99Preparing to unpack .../6-postgresql-10_10.12-0ubuntu0.18.04.1_amd64.deb ...
100Unpacking postgresql-10 (10.12-0ubuntu0.18.04.1) ...
101Selecting previously unselected package sysstat.
102Preparing to unpack .../7-sysstat_11.6.1-1ubuntu0.1_amd64.deb ...
103Unpacking sysstat (11.6.1-1ubuntu0.1) ...
104Setting up sysstat (11.6.1-1ubuntu0.1) ...
105
106Creating config file /etc/default/sysstat with new version
107update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
108Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /lib/systemd/system/ sysstat.service.
109Processing triggers for initramfs-tools (0.130ubuntu3.8) ...
110Setting up libxslt1.1:amd64 (1.1.29-5ubuntu0.2) ...
111Setting up libpq5:amd64 (10.12-0ubuntu0.18.04.1) ...
112Processing triggers for libc-bin (2.27-3ubuntu1) ...
113Setting up postgresql-client-common (190ubuntu0.1) ...
114Processing triggers for systemd (237-3ubuntu10.21) ...
115Setting up postgresql-common (190ubuntu0.1) ...
116Adding user postgres to group ssl-cert
117
118Creating config file /etc/postgresql-common/createcluster.conf with new version
119Building PostgreSQL dictionaries from installed myspell/hunspell packages...
120Removing obsolete dictionary files:
121Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/syst em/postgresql.service.
122Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
123Setting up postgresql-client-10 (10.12-0ubuntu0.18.04.1) ...
124update-alternatives: using /usr/share/postgresql/10/man/man1/psql.1.gz to provide /usr/share/man/m an1/psql.1.gz (psql.1.gz) in auto mode
125Setting up e2fsprogs-l10n (1.44.1-1ubuntu1.3) ...
126Setting up postgresql-10 (10.12-0ubuntu0.18.04.1) ...
127Creating new PostgreSQL cluster 10/main ...
128/usr/lib/postgresql/10/bin/initdb -D /var/lib/postgresql/10/main --auth-local peer --auth-host md5
129The files belonging to this database system will be owned by user "postgres".
130This user must also own the server process.
131
132The database cluster will be initialized with locale "C.UTF-8".
133The default database encoding has accordingly been set to "UTF8".
134The default text search configuration will be set to "english".
135
136Data page checksums are disabled.
137
138fixing permissions on existing directory /var/lib/postgresql/10/main ... ok
139creating subdirectories ... ok
140selecting default max_connections ... 100
141selecting default shared_buffers ... 128MB
142selecting default timezone ... Host
143selecting dynamic shared memory implementation ... posix
144creating configuration files ... ok
145running bootstrap script ... ok
146performing post-bootstrap initialization ... ok
147syncing data to disk ... ok
148
149Success. You can now start the database server using:
150
151 /usr/lib/postgresql/10/bin/pg_ctl -D /var/lib/postgresql/10/main -l logfile start
152
153Ver Cluster Port Status Owner Data directory Log file
15410 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-mai n.log
155update-alternatives: using /usr/share/postgresql/10/man/man1/postmaster.1.gz to provide /usr/share /man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
156Processing triggers for systemd (237-3ubuntu10.21) ...
157Done!
158
159
160Running Postgres database steps!
161
162ALTER ROLE
163ALTER ROLE
164Done!
165
166
167Uploading LSK snapshots to DB!
168
169--2020-04-17 09:25:31-- http://snapshots.lisk.io.s3-eu-west-1.amazonaws.com/lisk/mainnet/lisk_mai n_backup-11844273.gz
170Resolving snapshots.lisk.io.s3-eu-west-1.amazonaws.com (snapshots.lisk.io.s3-eu-west-1.amazonaws.c om)... 52.218.80.99
171Connecting to snapshots.lisk.io.s3-eu-west-1.amazonaws.com (snapshots.lisk.io.s3-eu-west-1.amazona ws.com)|52.218.80.99|:80... connected.
172HTTP request sent, awaiting response... 200 OK
173Length: 2216769775 (2.1G) [application/gzip]
174Saving to: 'lisk_main_backup-11844273.gz'
175
176lisk_main_backup-1184427 100%[================================>] 2.06G 26.3MB/s in 82s
177
1782020-04-17 09:26:53 (25.8 MB/s) - 'lisk_main_backup-11844273.gz' saved [2216769775/2216769775]
179
180SET
181SET
182SET
183SET
184SET
185 set_config
186------------
187
188(1 row)
189
190SET
191SET
192SET
193SET
194CREATE EXTENSION
195COMMENT
196CREATE FUNCTION
197SET
198SET
199CREATE TABLE
200CREATE SEQUENCE
201ALTER SEQUENCE
202CREATE TABLE
203CREATE TABLE
204CREATE TABLE
205CREATE TABLE
206CREATE TABLE
207CREATE TABLE
208CREATE TABLE
209CREATE TABLE
210CREATE TABLE
211CREATE SEQUENCE
212ALTER SEQUENCE
213CREATE TABLE
214CREATE TABLE
215CREATE SEQUENCE
216ALTER SEQUENCE
217ALTER TABLE
218ALTER TABLE
219ALTER TABLE
220COPY 11844273
221COPY 485018
222COPY 255136
223COPY 1266556
224COPY 64
225COPY 0
226COPY 0
227COPY 1824
228COPY 53
229COPY 0
230COPY 11844271
231COPY 3064228
232 setval
233----------
234 11854354
235(1 row)
236
237 setval
238-----------
239 451906243
240(1 row)
241
242 setval
243---------
244 3079515
245(1 row)
246
247ALTER TABLE
248ALTER TABLE
249ALTER TABLE
250ALTER TABLE
251ALTER TABLE
252ALTER TABLE
253CREATE INDEX
254CREATE INDEX
255CREATE INDEX
256CREATE INDEX
257CREATE INDEX
258CREATE INDEX
259CREATE INDEX
260CREATE INDEX
261CREATE INDEX
262CREATE INDEX
263CREATE INDEX
264CREATE INDEX
265CREATE INDEX
266CREATE INDEX
267CREATE INDEX
268CREATE INDEX
269CREATE INDEX
270CREATE INDEX
271CREATE INDEX
272CREATE INDEX
273CREATE INDEX
274CREATE INDEX
275CREATE INDEX
276CREATE INDEX
277CREATE INDEX
278CREATE INDEX
279CREATE INDEX
280CREATE INDEX
281CREATE INDEX
282CREATE INDEX
283CREATE INDEX
284CREATE INDEX
285CREATE INDEX
286CREATE INDEX
287CREATE INDEX
288CREATE INDEX
289CREATE INDEX
290CREATE INDEX
291CREATE INDEX
292CREATE INDEX
293CREATE INDEX
294CREATE INDEX
295CREATE INDEX
296CREATE TRIGGER
297ALTER TABLE
298ALTER TABLE
299ALTER TABLE
300ALTER TABLE
301Done!
302
303
304Uploading LSH snapshots to DB!
305
306--2020-04-17 09:37:36-- https://github.com/Leasehold/Downloads/raw/master/snapshots/mainnet/lease hold_main_backup_26032020.gz
307Resolving github.com (github.com)... 140.82.114.3
308Connecting to github.com (github.com)|140.82.114.3|:443... connected.
309HTTP request sent, awaiting response... 302 Found
310Location: https://media.githubusercontent.com/media/Leasehold/Downloads/master/snapshots/mainnet/l easehold_main_backup_26032020.gz [following]
311--2020-04-17 09:37:36-- https://media.githubusercontent.com/media/Leasehold/Downloads/master/snap shots/mainnet/leasehold_main_backup_26032020.gz
312Resolving media.githubusercontent.com (media.githubusercontent.com)... 151.101.0.133, 151.101.64.1 33, 151.101.128.133, ...
313Connecting to media.githubusercontent.com (media.githubusercontent.com)|151.101.0.133|:443... conn ected.
314HTTP request sent, awaiting response... 200 OK
315Length: 18365014 (18M) [application/octet-stream]
316Saving to: 'leasehold_main_backup_26032020.gz'
317
318leasehold_main_backup_26 100%[================================>] 17.51M 74.7MB/s in 0.2s
319
3202020-04-17 09:37:37 (74.7 MB/s) - 'leasehold_main_backup_26032020.gz' saved [18365014/18365014]
321
322SET
323SET
324SET
325SET
326SET
327 set_config
328------------
329
330(1 row)
331
332SET
333SET
334SET
335SET
336CREATE EXTENSION
337COMMENT
338CREATE FUNCTION
339ALTER FUNCTION
340SET
341SET
342CREATE TABLE
343ALTER TABLE
344CREATE SEQUENCE
345ALTER TABLE
346ALTER SEQUENCE
347CREATE TABLE
348ALTER TABLE
349CREATE TABLE
350ALTER TABLE
351CREATE TABLE
352ALTER TABLE
353CREATE TABLE
354ALTER TABLE
355CREATE TABLE
356ALTER TABLE
357CREATE TABLE
358ALTER TABLE
359CREATE TABLE
360ALTER TABLE
361CREATE TABLE
362ALTER TABLE
363CREATE TABLE
364ALTER TABLE
365CREATE TABLE
366ALTER TABLE
367CREATE SEQUENCE
368ALTER TABLE
369ALTER SEQUENCE
370ALTER TABLE
371ALTER TABLE
372COPY 167574
373COPY 0
374COPY 52
375COPY 78
376COPY 30
377COPY 0
378COPY 0
379COPY 40
380COPY 43
381COPY 167568
382COPY 102
383 setval
384--------
385 167748
386(1 row)
387
388 setval
389--------
390 102
391(1 row)
392
393ALTER TABLE
394ALTER TABLE
395ALTER TABLE
396ALTER TABLE
397CREATE INDEX
398CREATE INDEX
399CREATE INDEX
400CREATE INDEX
401CREATE INDEX
402CREATE INDEX
403CREATE INDEX
404CREATE INDEX
405CREATE INDEX
406CREATE INDEX
407CREATE INDEX
408CREATE INDEX
409CREATE INDEX
410CREATE INDEX
411CREATE INDEX
412CREATE INDEX
413CREATE INDEX
414CREATE INDEX
415CREATE INDEX
416CREATE INDEX
417CREATE INDEX
418CREATE INDEX
419CREATE INDEX
420CREATE INDEX
421CREATE INDEX
422CREATE INDEX
423CREATE INDEX
424CREATE INDEX
425CREATE INDEX
426CREATE INDEX
427CREATE INDEX
428CREATE INDEX
429CREATE INDEX
430CREATE INDEX
431CREATE INDEX
432CREATE INDEX
433CREATE INDEX
434CREATE INDEX
435CREATE INDEX
436CREATE INDEX
437CREATE INDEX
438CREATE TRIGGER
439ALTER TABLE
440ALTER TABLE
441ALTER TABLE
442ALTER TABLE
443Done!
444
445
446Installing Leasehold packages:
447
448Cloning into 'leasehold-core-mainnet'...
449remote: Enumerating objects: 88, done.
450remote: Counting objects: 100% (88/88), done.
451remote: Compressing objects: 100% (61/61), done.
452remote: Total 305 (delta 55), reused 52 (delta 26), pack-reused 217
453Receiving objects: 100% (305/305), 171.73 KiB | 2.04 MiB/s, done.
454Resolving deltas: 100% (198/198), done.
455warning: unable to access '/home/leasehold/.config/git/attributes': Permission denied
456
457> dtrace-provider@0.8.8 install /home/leasehold/leasehold-core-mainnet/node_modules/dtrace-provide r
458> node-gyp rebuild || node suppress-error.js
459
460make: Entering directory '/home/leasehold/leasehold-core-mainnet/node_modules/dtrace-provider/buil d'
461 TOUCH Release/obj.target/DTraceProviderStub.stamp
462make: Leaving directory '/home/leasehold/leasehold-core-mainnet/node_modules/dtrace-provider/build '
463
464> @newrelic/native-metrics@3.1.2 install /home/leasehold/leasehold-core-mainnet/node_modules/@newr elic/native-metrics
465> node ./lib/pre-build.js install native_metrics
466
467> /usr/local/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean config ure
468> /usr/local/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build -j 2 n ative_metrics
469make: Entering directory '/home/leasehold/leasehold-core-mainnet/node_modules/@newrelic/native-met rics/build'
470 CXX(target) Release/obj.target/native_metrics/src/native_metrics.o
471 CXX(target) Release/obj.target/native_metrics/src/GCBinder.o
472 CXX(target) Release/obj.target/native_metrics/src/LoopChecker.o
473 CXX(target) Release/obj.target/native_metrics/src/RUsageMeter.o
474 SOLINK_MODULE(target) Release/obj.target/native_metrics.node
475 COPY Release/native_metrics.node
476make: Leaving directory '/home/leasehold/leasehold-core-mainnet/node_modules/@newrelic/native-metr ics/build'
477install successful: _newrelic_native_metrics-3_1_2-native_metrics-79-linux-x64
478
479> sodium-native@2.4.6 install /home/leasehold/leasehold-core-mainnet/node_modules/sodium-native
480> node-gyp-build "node preinstall.js" "node postinstall.js"
481
482libtool is required, but wasn't found on this system
483./configure: 5: ./configure: ./configure: not found
484/home/leasehold/leasehold-core-mainnet/node_modules/sodium-native/preinstall.js:119
485 if (err) throw err
486 ^
487
488Error: ./configure exited with 127
489 at ChildProcess.<anonymous> (/home/leasehold/leasehold-core-mainnet/node_modules/sodium-native /preinstall.js:149:25)
490 at ChildProcess.emit (events.js:316:20)
491 at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
492npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
493npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os ":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
494
495npm ERR! code ELIFECYCLE
496npm ERR! errno 1
497npm ERR! sodium-native@2.4.6 install: `node-gyp-build "node preinstall.js" "node postinstall.js"`
498npm ERR! Exit status 1
499npm ERR!
500npm ERR! Failed at the sodium-native@2.4.6 install script.
501npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
502
503npm ERR! A complete log of this run can be found in:
504npm ERR! /home/leasehold/.npm/_logs/2020-04-17T14_38_26_912Z-debug.log
505npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
506/usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev
507/usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
508/usr/local/bin/pm2-docker -> /usr/local/lib/node_modules/pm2/bin/pm2-docker
509/usr/local/bin/pm2-runtime -> /usr/local/lib/node_modules/pm2/bin/pm2-runtime
510npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/pm2/node_modules/cho kidar/node_modules/fsevents):
511npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os ":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
512
513+ pm2@4.2.3
514added 206 packages from 202 contributors in 18.758s
515Done!
516
517
518Starting process with "pm2"
519
520/dev/fd/63: line 140: /usr/bin/pm2: No such file or directory
521
522 -------------
523
524__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
525 _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
526 _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
527 _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
528 _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
529 _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
530 _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
531 _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
532 _\///______________\///______________\///__\///////////////__
533
534
535 Runtime Edition
536
537 PM2 is a Production Process Manager for Node.js applications
538 with a built-in Load Balancer.
539
540 Start and Daemonize any application:
541 $ pm2 start app.js
542
543 Load Balance 4 instances of api.js:
544 $ pm2 start api.js -i 4
545
546 Monitor in production:
547 $ pm2 monitor
548
549 Make pm2 auto-boot at server restart:
550 $ pm2 startup
551
552 To go further checkout:
553 http://pm2.io/
554
555
556 -------------
557
558[PM2] Spawning PM2 daemon with pm2_home=/home/leasehold/.pm2
559[PM2] PM2 Successfully daemonized
560[PM2] Starting /home/leasehold/leasehold-core-mainnet/index.js in fork_mode (1 instance)
561[PM2] Done.
562┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
563│ id │ name │ mode │ ↺ │ status │ cpu │ memory │
564├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
565│ 0 │ leasehold-core-ma… │ fork │ 0 │ online │ 0% │ 16.8mb │
566└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
567Done!
568
569
570All steps are done! You can verify if the process is running by "pm2 list" and accessing endpoint: http://104.237.9.142:8010/api/node/status