Repository navigation
Expand file tree
/
Copy pathinstallExplorer.sh
More file actions
115 lines (105 loc) · 2.89 KB
/
Copy pathinstallExplorer.sh
File metadata and controls
115 lines (105 loc) · 2.89 KB
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
#!/bin/bash
# install needed dependencies
cd
curl -sL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
# MongoDB
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu $(lsb_release -cs)/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl enable mongod
sudo service mongod start
# Flux
gpg --keyserver keyserver.ubuntu.com --recv 4B69CA27A986265D
gpg --export 4B69CA27A986265D | sudo tee /usr/share/keyrings/flux.gpg > /dev/null
echo "deb [ signed-by=/usr/share/keyrings/flux.gpg ] https://apt.runonflux.io/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/flux.list
sudo apt-get update
sudo apt-get install flux
#bitcore-node
cd
npx -y -p @runonflux/bitcore-node bitcore-node create mynode
cd mynode
rm bitcore-node.json
cat << EOF > bitcore-node.json
{
"network": "livenet",
"port": 3001,
"services": [
"bitcoind",
"@runonflux/insight-api",
"@runonflux/insight-ui",
"web"
],
"messageLog": "",
"servicesConfig": {
"web": {
"disablePolling": false,
"enableSocketRPC": false
},
"bitcoind": {
"sendTxLog": "./data/pushtx.log",
"spawn": {
"datadir": "./data",
"exec": "fluxd",
"rpcqueue": 1000,
"rpcport": 16124,
"zmqpubrawtx": "tcp://127.0.0.1:28332",
"zmqpubhashblock": "tcp://127.0.0.1:28332"
}
},
"insight-api": {
"routePrefix": "api",
"db": {
"host": "127.0.0.1",
"port": "27017",
"database": "flux-api-livenet",
"user": "",
"password": ""
},
"disableRateLimiter": true
},
"insight-ui": {
"apiPrefix": "api",
"routePrefix": ""
}
}
}
EOF
cd data
cat << EOF > flux.conf
server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
insightexplorer=1
experimentalfeatures=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcport=16124
rpcallowip=127.0.0.1
rpcuser=flux
rpcpassword=myfluxpassword
uacomment=bitcore
mempoolexpiry=24
rpcworkqueue=1100
maxmempool=2000
dbcache=1000
maxtxfee=1.0
dbmaxfilesize=64
showmetrics=0
maxconnections=100000
addnode=explorer.runonflux.io
addnode=explorer.flux.zelcore.io
addnode=explorer2.flux.zelcore.io
addnode=electrumx.runonflux.io
addnode=blockbook.runonflux.io
EOF
cd ..
npm install @runonflux/insight-api @runonflux/insight-ui
cd ..
echo "Explorer is installed"
echo "Then to start explorer navigate to mynode folder and type npx bitcore-node start. Explorer will be accessible on localhost:3001"