TGIC项目的节点代码,最新网络版本V2.0.1,请大家在使用过程中仔细阅读教程
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3588b83 Dec 6, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helpers Add files via upload Nov 16, 2018
img Add files via upload Dec 6, 2018
logic Add files via upload Nov 16, 2018
logs Add files via upload Nov 16, 2018
modules Add files via upload Nov 16, 2018
optional Add files via upload Nov 16, 2018
pids Add files via upload Nov 16, 2018
schema Add files via upload Nov 16, 2018
sql Add files via upload Nov 16, 2018
tasks Add files via upload Nov 16, 2018
views Add files via upload Nov 16, 2018
.gitignore Initial commit Nov 16, 2018
CONTRIBUTING.md Add files via upload Nov 16, 2018
Gruntfile.js Add files via upload Nov 16, 2018
README.md Update README.md Dec 6, 2018
Vagrantfile Add files via upload Nov 16, 2018
app.js Add files via upload Nov 16, 2018
build Create build Nov 16, 2018
config.Tgic.json Update config.Tgic.json Nov 16, 2018
config.devnet.json Add files via upload Nov 16, 2018
config.json Add files via upload Nov 16, 2018
config.main.json Add files via upload Nov 16, 2018
config.mainnet.json Add files via upload Nov 16, 2018
config.selftest.json Add files via upload Nov 16, 2018
config.testnet.json Add files via upload Nov 16, 2018
genesisBlock.Tgic.json Add files via upload Nov 16, 2018
genesisBlock.devnet.json Add files via upload Nov 16, 2018
genesisBlock.json Add files via upload Nov 16, 2018
genesisBlock.main.json Add files via upload Nov 16, 2018
genesisBlock.mainnet.json Add files via upload Nov 16, 2018
genesisBlock.testnet.json Add files via upload Nov 16, 2018
logger.js Add files via upload Nov 16, 2018
networks.json Add files via upload Nov 16, 2018
networks.json.orig Add files via upload Nov 16, 2018
package.json Add files via upload Nov 16, 2018

README.md

tgic-nodev2.0.1

图片:

这TGIC网络2.0是节点部署文件 推荐 2cpu 4ram 40g硬盘 1M带宽 linux ubuntu 16.04 64bit

TGIC QQ总群的群文件里有视频教程,若有需要的可以加群下载视频教程:252744072(QQ群号)

安装:

登录root账户,部署节点无法直接在root账户上部署 所以您需要创建账户:

adduser <您要创建的账户名>

usermod -a -G sudo <您已经创建的账户名>

切换到你创建的用户,开始安装必须的东西:

sudo apt-get update 

sudo apt-get install -y libpq-dev build-essential python git curl jq libtool autoconf locales automake locate wget zip unzip htop nmon iftop

sudo apt-get install npm

sudo npm install -g n

sudo n 6.9.2

安装PostgreSQL:

sudo apt-get install -y postgresql postgresql-contrib

安装grunt-cli(全局):

sudo npm install grunt-cli -g

克隆Tgic-node库

git clone https://github.com/xianfeic/tgic-nodev2.0.1
cd tgic-nodev2.0.1

然后创建数据库

1 sudo -s -u postgres

2 psql

3 CREATE USER xxxx1 WITH PASSWORD 'xxxx';

4 CREATE DATABASE xxxx2;

5 GRANT ALL PRIVILEGES ON DATABASE xxxx2 to xxxx1;

# xxxx1  你要创建是数据库用户名
# xxxx    你要设置的密码
# xxxx2  你要创建的数据库

现在您需要修改配置文件了 找到config.Tgic.json这个文件,在第68行的代码 "secret": [""],增加您的密钥

  "forging": {
    "coldstart": 6,
    "force": true,
    "secret": ["请在这里输入您的12个单词密钥"],
    "access": {
      "whiteList": [
        "127.0.0.1"
      ]
    }
  },

完成后,再次修改config.Tgic.json!

 "db": {
    "host": "localhost",
    "port": 5432,
    "database": "xxxx2",
    "user": "XXXX1",
    "password": "XXXX",
    "poolSize": 20,
    "poolIdleTimeout": 30000,
    "reapIntervalMillis": 1000,
    "logEvents": [
      "error"
    ]
  },

OK!接下来我们就安装依赖

npm install libpq

npm install secp256k1

npm install bindings

npm install 

完成后,就可以直接运行了!

node app.js --genesis genesisBlock.Tgic.json --config config.Tgic.json

LINUX断开shh链接后节点就自动关闭了运行了 我们需要使用screen 来执行最后一步的操作,因为这样可以让你关掉SHH连接后,节点程序依旧在运行中。

最后,别忘了组建自己的节点群,招募更多的朋友或TGI持有者给您投票

图片: