Linux下一键部署区块链网络WeBASE(FISCO BCOS)
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
Linux下一键部署区块链网络WeBASE(FISCO BCOS)
什么是WeBASE?
WeBASE
(WeBank Blockchain Application Software Extension) 是在区块链应用和FISCO-BCOS节点之间搭建的一套通用组件。围绕交易、合约、密钥管理,数据,可视化管理来设计各个模块,开发者可以根据业务所需,选择子系统进行部署。WeBASE屏蔽了区块链底层的复杂度,降低开发者的门槛,大幅提高区块链应用的开发效率,包含节点前置、节点管理、交易链路,数据导出,Web管理平台等子系统。
一键部署区块链网络WeBASE
一键部署可以在 同机 快速搭建WeBASE管理台环境,方便用户快速体验WeBASE管理平台。
一键部署会搭建:节点(FISCO-BCOS 2.0+)、管理平台(WeBASE-Web)、节点管理子系统(WeBASE-Node-Manager)、节点前置子系统(WeBASE-Front)、签名服务(WeBASE-Sign)。其中,节点的搭建是可选的,可以通过配置来选择使用已有链或者搭建新链。
本搭建教程参考 https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/install.html#id6
- ##Jdk安装
tar -xvf jdk-8u191-linux-x64.tar.gz -C /usr/local
cat >> /etc/profile << EOF
export JAVA_HOME=/usr/local/jdk1.8.0_191/
export PATH=\$JAVA_HOME/bin:\$PATH
export CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar
EOF
source /etc/profile
- ##mysql
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql57-community-release-el7-10.noarch.rpm
yum -y install mysql-community-server
systemctl start mysqld.service
systemctl status mysqld.service
#查看mysql的root密码
grep "password" /var/log/mysqld.log
#登陆并输入上面查看到的root密码
mysql -uroot -p
#默认安装的mysql密码格式严格不能改成简单的密码,这里改下策略让密码能设置成简单的
set global validate_password_policy=0;
set global validate_password_length=1;
#设置root的新密码为123456
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';
#vi /etc/my.cnf在最后一行加上,为了使用mysql5.7的语法与5.6兼容
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
#重启mysql
systemctl restart mysqld.service
- ##Python,使用Python3.6或以上版本
sudo yum install -y python36
sudo yum install -y python36-pip
- ##关闭防火墙(可选,可以只开放5000端口进行web访问)
systemctl stop firewalld & systemctl disable firewalld
- ##PyMySQL部署(Python3.6+)
pip3 install PyMySQL
- ##执行一键部署脚本
wget https://osp-1257653870.cos.ap-guangzhou.myqcloud.com/WeBASE/releases/download/v1.5.1/webase-deploy.zip
unzip webase-deploy.zip
cd webase-deploy
vi common.properties
修改数据库账号和密码后,我这里只改了mysql.user
,mysql.password
和sign.mysql.user
、sign.mysql.password
四个参数,其他的都默认. 最后执行一键部署如下:
python3 deploy.py installAll
完整的common.properties如下:
[root@localhost webase-deploy]# more common.properties
[common]
# Webase Subsystem Version (v1.1.0 or above)
webase.web.version=v1.5.1
webase.mgr.version=v1.5.1
webase.sign.version=v1.5.0
webase.front.version=v1.5.1
# Mysql database configuration of WeBASE-Node-Manager
mysql.ip=localhost
mysql.port=3306
mysql.user=root
mysql.password=123456
mysql.database=webasenodemanager
# Mysql database configuration of WeBASE-Sign
sign.mysql.ip=localhost
sign.mysql.port=3306
sign.mysql.user=root
sign.mysql.password=123456
sign.mysql.database=webasesign
# H2 database name of WeBASE-Front
front.h2.name=webasefront
front.org=fisco
# WeBASE-Web service port
web.port=5000
# enable WeBASE-Web overview pages for mobile phone
# (0: disable, 1: enable)
web.h5.enable=1
# 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
# ssl encrypt type (0: standard ssl, 1: guomi ssl)
# only guomi type support guomi ssl
encrypt.sslType=0
# Use existing chain or not (yes/no)
if.exist.fisco=no
### if build new chain, [if.exist.fisco=no]
# Configuration required when building a new chain
# Fisco-bcos version
fisco.version=2.7.2
# Number of building nodes (default value: 2)
node.counts=nodeCounts
### if using exited chain, [if.exist.fisco=yes]
# 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, sdk.crt, node.key and gm directory(gm ssl)) are st
ored
fisco.dir=/data/app/nodes/127.0.0.1
# Node directory in [fisco.dir] for WeBASE-Front to connect
# example: 'node.dir=node0' would auto change to '/data/app/nodes/127.0.0.1/node0'
# Under the path, there is a conf directory where node certificates (ca.crt, node.crt and node.key) are stored
node.dir=node0
- ##一些启动命令如下
#部署并启动所有服务
python3 deploy.py installAll
停止一键部署的所有服务 python3 deploy.py stopAll
启动一键部署的所有服务 python3 deploy.py startAll
# 各子服务启停
启动FISCO-BCOS节点: python3 deploy.py startNode
停止FISCO-BCOS节点: python3 deploy.py stopNode
启动WeBASE-Web: python3 deploy.py startWeb
停止WeBASE-Web: python3 deploy.py stopWeb
启动WeBASE-Node-Manager: python3 deploy.py startManager
停止WeBASE-Node-Manager: python3 deploy.py stopManager
启动WeBASE-Sign: python3 deploy.py startSign
停止WeBASE-Sign: python3 deploy.py stopSign
启动WeBASE-Front: python3 deploy.py startFront
停止WeBASE-Front: python3 deploy.py stopFront
- ##web访问
http://localhost:5000/
admin/Abcd1234
GitHub 加速计划 / li / linux-dash
6
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:3 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献9条内容
所有评论(0)