联盟链搭建

编程入门 行业动态 更新时间:2024-10-26 18:20:33

<a href=https://www.elefans.com/category/jswz/34/1769386.html style=联盟链搭建"/>

联盟链搭建

1.安装ubuntu依赖

sudo apt install -y openssl curl

2.创建操作目录, 下载安装脚本

## 创建操作目录
cd ~ && mkdir -p fisco && cd fisco## 下载脚本
curl -#LO .9.0/build_chain.sh && chmod u+x build_chain.sh

3.搭建单群组4节点联盟链

bash build_chain.sh -l 127.0.0.1:4 -p 30300,20200,8545

成功搭建后会生成以下信息

Checking fisco-bcos binary...
Binary check passed.
==============================================================
Generating CA key...
==============================================================
Generating keys ...
Processing IP:127.0.0.1 Total:4 Agency:agency Groups:1
==============================================================
Generating configurations...
Processing IP:127.0.0.1 Total:4 Agency:agency Groups:1
==============================================================
[INFO] Execute the download_console.sh script in directory named by IP to get FISCO-BCOS console.
e.g.  bash /home/ubuntu/fisco/nodes/127.0.0.1/download_console.sh
==============================================================
[INFO] FISCO-BCOS Path   : bin/fisco-bcos
[INFO] Start Port        : 30300 20200 8545
[INFO] Server IP         : 127.0.0.1:4
[INFO] Output Dir        : /home/ubuntu/fisco/nodes
[INFO] CA Key Path       : /home/ubuntu/fisco/nodes/cert/ca.key
==============================================================
[INFO] All completed. Files in /home/ubuntu/fisco/nodes

4.启动所有节点

bash nodes/127.0.0.1/start_all.sh

成功会显示如下信息

try to start node0
try to start node1
try to start node2
try to start node3node1 start successfullynode2 start successfullynode0 start successfullynode3 start successfully

5.安装fisco 控制台依赖

#centos系统安装java
sudo yum install -y java java-devel

6.获取控制台并返回目录

cd ~/fisco && curl -LO .9.1/download_console.sh && bash download_console.sh

7.拷贝配置文件

cp -n console/conf/config-example.toml console/conf/config.toml

8.配置控制台证书

cp -r nodes/127.0.0.1/sdk/* console/conf/

9.启动控制台

cd ~/fisco/console && bash start.sh

更多推荐

联盟链搭建

本文发布于:2023-06-29 16:52:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/947870.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:联盟

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!