虚拟机搭建FISCO BCOS的WeBase

前提条件

环境 版本
Java JDK8或以上版本
MySQL MySQL-5.6或以上版本
Python Python3.5+
PyMySQL 使用python3时需安装

注:可以参考我的博客配置环境:https://www.cnblogs.com/Coder-Photographer/p/13569791.html

拉取部署脚本

获取部署安装包,解压安装包:

1. wget https://github.com/WeBankFinTech/WeBASELargeFiles/releases/download/v1.4.0/webase-deploy.zip
2. unzip webase-deploy.zip

进入目录:

cd webase-deploy

修改配置

vi common.properties

可以参考官网的中文说明自己配置:https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/install.html#id8

#--------------------我的common.properties, 可以做参考--------------------

[common]

# Webase Subsystem Version (v1.1.0 or above)
webase.web.version=v1.4.0
webase.mgr.version=v1.4.0
webase.sign.version=v1.4.0
webase.front.version=v1.4.0

# Mysql database configuration of WeBASE-Node-Manager
mysql.ip=127.0.0.1
mysql.port=3306
mysql.user=test
mysql.password=123456
mysql.database=webasenodemanager

# Mysql database configuration of WeBASE-Sign
sign.mysql.ip=127.0.0.1
sign.mysql.port=3306
sign.mysql.user=test
sign.mysql.password=123456
sign.mysql.database=webasesign

# H2 database name of WeBASE-Front
front.h2.name=webasefront

# WeBASE-Web service port
web.port=5000

# WeBASE-Node-Manager service port
mgr.port=5001

# WeBASE-Front service port
front.port=5002

# WeBASE-Sign service port
sign.port=5004

# Node listening IP
node.listenIp=127.0.0.1
# Node p2p service port
node.p2pPort=30300
# Node channel service port
node.channelPort=20200
# Node rpc service port
node.rpcPort=8545

# Encrypt type (0: standard, 1: guomi)
encrypt.type=0

# Use existing chain or not (yes/no)
if.exist.fisco=yes  # 如果在已有链上搭建,改为yes

# Configuration is required when using the existing chain
# The path of the existing chain, the path of the start_all.sh script
# Under the path, there should be a SDK directory where the SDK certificates (ca.crt, node.crt and node. Key) are stored
fisco.dir=/home/adam/fisco/nodes/127.0.0.1  #这里修改成自己的目录,找到start_all.sh的路径即可
# Absolute path of the connected node in WeBASE-Front
# Under the path, there is a conf directory where node certificates (ca.crt, node.crt and node. Key) are stored
node.dir=/home/adam/fisco/nodes/127.0.0.1/node0 #这里修改成自己的目录,找到start_all.sh的路径/node0 目录即可

# Configuration required when building a new chain
# Fisco-bcos version
fisco.version=2.4.1
# Number of building nodes (two by default)
node.counts=4

一键部署

# 1. 部署并启动所有服务
python deploy.py installAll

其他命令:

# 2. 停止一键部署的所有服务
python deploy.py stopAll

# 3. 启动一键部署的所有服务
python deploy.py startAll

通过WEB访问界面

http://{deployIP}:{webPort}
示例:http://127.0.0.1:5000

截图

登录

默认账号为admin,默认密码为Abcd1234。首次登陆要求重置密码

添加节点

一键部署时,节点前置与节点管理服务默认是同机部署,添加前置则填写IP为127.0.0.1,默认端口为5002。参考上文中common.properties的配置项front.port={frontPort}

修改密码

字母,数字组成,且至少包含一个大写字母和一个小写字母

最后

  1. 本教程基于官网文档搭建
  2. 结合B站UP主林宣名的视频,他的视频做的很好,强烈推荐
posted @ 2020-08-29 19:52  Adam_lxd  阅读(608)  评论(0编辑  收藏  举报