前準備
sudo apt-get update
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget bsdmainutils automake curl libzmq3-dev
ソースのダウンロード
cd
mkdir koto
cd koto
git clone https://github.com/KotoDevelopers/koto.git git clone https://github.com/wo01/bitcore-node-koto git clone https://github.com/wo01/insight-api-koto git clone https://github.com/wo01/insight-ui-koto
kotoのインストール
cd koto
git checkout v1.1.0
patch -p1 < ./zcutil/bitcore.diff
./zcutil/fetch-params.sh
./zcutil/build.sh -j 2
cp src/kotod ../bitcore-node-koto/bin/
cd ../bitcore-node-koto
npm install
cd ..
./bitcore-node-koto/bin/bitcore-node create livenet
cd livenet
../bitcore-node-koto/bin/bitcore-node install ../insight-api-koto
../bitcore-node-koto/bin/bitcore-node install ../insight-ui-koto
##起動
../bitcore-node-koto/bin/bitcore-node start
##環境設定
bitcore-node.json
{
"network": "livenet",
"port": 80,
"services": [
"bitcoind",
"insight-api-koto",
"insight-ui-koto",
"web"
],
"servicesConfig": {
"bitcoind": {
"spawn": {
"datadir": "./data",
"exec": "/root/koto/bitcore-node-koto/bin/kotod"
}
},
"insight-ui-koto": {
"routePrefix": ""
}
}
}
```data/koto.conf```
server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
rpcuser=bitcoin
rpcpassword=local321
uacomment=bitcore
showmetrics=0
##supervisor を使ってデーモン化
apt-get install supervisor
/etc/supervisor/config.d/insight.conf
[program:insight]
user=root
autostart=true
autorestart=true
command=/root/koto/bitcore-node-koto/bin/bitcore-node start
directory=/root/koto/livenet
###デーモンを起動
`supervisorctl reload`
### 構築サイト
http://insight.kpool.jp/