极客现金节点哨兵安装教程 GeekCash Sentinel Node.js

极客现金节点哨兵安装教程 GeekCash Sentinel Node.js

确保已安装Node v8.xx或更高版本:

本指南介绍如何将Sentinel安装到Ubuntu 14.04 / 16.04中的现有Masternode上。


安装


1.安装先决条件

确保已安装Node v8.xx或更高版本:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential libzmq3-dev

安装PM2:

# 1. Add the PM2 repository signing key
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv D1EA2D4C

2. Add the PM2 repository

echo "deb http://apt.pm2.io/ubuntu stable main" | sudo tee /etc/apt/sources.list.d/pm2.list

3. Update list of available packages

sudo apt-get update

4. Install PM2

sudo apt-get install pm2

确保运行的本地GeekCash守护程序至少为1.0.1.2版(1000102)

geekcash-cli getinfo


2.安装Sentinel

克隆Sentinel存储库并安装节点包。

git clone https://github.com/geekcash/node-sentinel.git && cd node-sentinel

安装节点模块

npm i

如果出现这样的错误,请安装以下命令:

sudo apt-get install libboost-all-dev -y
> [email protected] install /root/node-sentinel/node_modules/zmq
> node-gyp rebuild

Traceback (most recent call last): File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 13, in <module> import gyp File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 8, in <module> import gyp.input File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 5, in <module> from compiler.ast import Const ImportError: No module named compiler.ast gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess.handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 4.4.0-127-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/node-sentinel/node_modules/zmq gyp ERR! node -v v8.12.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN <a href="/cdn-cgi/l/email-protection" class="__cf_email_" data-cfemail="91fffef5f4bce2f4ffe5f8fff4fdd1a0bfa1bfa0">[email protected] No description npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-09-15T07_22_16_232Z-debug.log


3.创建config.js

cp -i config_example.js config.js

获取RPC用户和密码 .geekcash/geekcash.conf

cd ../
cat .geekcash/geekcash.conf


rpcuser=root
rpcpassword=pass
rpcport=6888
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
txindex=1
masternode=1
externalip=x.x.x.x:6889
masternodeprivkey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

编辑config.js

cd node-sentinel
nano config.js


version:'1.2.1',
coins: [
        {
            id: 'MN-01',
            rpc: {
                url: 'http://127.0.0.1:6888/',
                method: 'POST',
                auth: {
                    username: 'root',
                    password: 'pass'
                },
            }
        },
        {
            id: 'MN-02',
            rpc: {
                url: 'http://127.0.0.1:6888/',
                method: 'POST',
                auth: {
                    username: 'root',
                    password: 'pass'
                },
            }
        },
        // {
        //     id: 'MN-03',
        //     rpc: {
        //         url: 'http://127.0.0.1:6888/',
        //         method: 'POST',
        //         auth: {
        //             username: 'root',
        //             password: 'pass'
        //         },
        //     }
        // },

]


4.允许RPC IP

如果为多个masternode运行sentinel,则需要配置rpcallowip以允许sentinel连接到此MN并重新启动GeekCash守护程序。

rpcuser=root
rpcpassword=pass
rpcallowip=[IP of sentinel]
rpcport=6888
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
txindex=1
masternode=1
externalip=8.8.8.8:6889
masternodeprivkey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

例如:您的哨兵在IP:9.9.9.9,其他MN配置

rpcuser=root
rpcpassword=pass
rpcallowip=9.9.9.9
rpcport=6888
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
txindex=1
masternode=1
externalip=8.8.8.8:6889
masternodeprivkey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


geekcash-cli stop
geekcashd


5.运行应用程序

pm2 start ./app.js --name sentinel

设置启动脚本

//使用您在服务器启动/重新启动时管理的进程重新启动PM2至关重要。要解决此问题,只需运行此命令即可生成活动的启动脚本: 
pm2 startup



geek-cash

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

geek cash any one can help

Kindkly tell me what is geekcash and what is the procedure to do?? is there any details about it ? How to view our geekcash.

How To Delete Cash App Transaction History | Secure | Private

Visit this page to get explanation about “how to delete Cash App transaction history”. Cash App Transaction history is private already.

Dave clone is a useful and featureful cash advance app.

With the usage of cash advance apps increasing gradually, more and more people are willing to spend in personal finance app development. One such app is Dave and Dave clone app, which is popularly sought after by many. A Dave clone app is...