Series Article Directory
Chapter 1 FISCO BCOS builds a single machine and a single group with 4 nodes online
Article Directory
foreword
FISCO BCOS is a stable, efficient, and secure blockchain underlying platform. It has been tested by many organizations and applications in a production environment for a long time. This article will introduce the expansion of FISCO BCOS nodes.
1. Install and start FISCO BCOS
For this step, please refer to the previous article
FISCO BCOS builds a single-machine single-group 4 nodes online
or
FISCO BCOS offline builds a single-machine single-group 4 nodes
2. Download the expansion script
Enter the cd ~ && cd fisco directory to operate
curl -#LO https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/master-2.0/tools/gen_node_cert.sh
如果因为网络问题导致长时间无法下载gen_node_cert.sh脚本,请尝试
curl -#LO https://gitee.com/FISCO-BCOS/FISCO-BCOS/raw/master-2.0/tools/gen_node_cert.sh
As shown in the picture:
3. Expansion nodes
1. Copy the script
将gen_node_cert.sh拷贝到 nodes/127.0.0.1
cp gen_node_cert.sh nodes/127.0.0.1/
As shown in the picture:
2. Generate a new node private key certificate
Enter the nodes/127.0.0.1 directory:
cd nodes/127.0.0.1/
Generate the certificate:
bash gen_node_cert.sh -c ../cert/agency -o node4
node4 is the node name
As shown in the picture:
3. Prepare the node configuration file
拷贝node0/config.ini、node0/start.sh和node0/stop.sh到node4目录
cp node0/config.ini node0/start.sh node0/stop.sh node4/
4. Modify the configuration file
修改node4/config.ini。对于[rpc]模块,修改channel_listen_port=20204和jsonrpc_listen_port=8549;对于[p2p]模块,修改listen_port=30304并在node.中增加自身节点信息
vim node4/config.ini
As shown in the picture:
5. Copy the group master file
cp node0/conf/group.1.genesis node0/conf/group.1.ini node4/conf/
6. Start the node
bash node4/start.sh
As shown in the picture is success
Summarize
The above are all the steps to expand the capacity of FISCO BCOS nodes. Generally speaking, it is very simple, but the current nodes are free nodes, and there is no synchronization data on the chain. This will be discussed later. There will be a series of tutorials on using FICOS BCOS in the future. Welcome to pay attention. Like support, if you have any questions, welcome to comment