Practical 2 Create and Deploy A Block Chain Network Using Hy
Practical 2 Create and Deploy A Block Chain Network Using Hy
Practical 2: Create and deploy a block chain network using Hyperledger Fabric SDK for Java.
Prerequisites:
1. Java Development Kit (JDK) 11 or later: Install JDK 11 or a later version
on your system. You can download it from
https://www.oracle.com/java/technologies/downloads/.
export FABRIC_HOME=/path/to/fabric-sdk-java
export JAVA_HOME=/path/to/jdk11.0.17
Replace the paths with the actual locations of your fabric-sdk-java and
jdk11.0.17 directories.
Launch the Fabric test network: Use the following command to launch the
Fabric test network:
./network.sh up
Subodh Kamble Roll 20 MSc Computer Science Part 2
This command will start a Hyperledger Fabric test network with two peers, an
ordering service, and three certificate authorities.
./network.sh down
This command will stop Hyperledger Fabric test network with two peers.
Interacting with the Fabric Test Network:
Install the Fabric CLI tools: Download the appropriate Fabric CLI binaries for
your operating system from the Hyperledger Fabric releases page
(https://github.com/hyperledger/fabric/releases). Extract the downloaded
archive and add the following path to your environment variables:
!Optional:
export FABRIC_BIN=/path/to/fabric-binaries
Subodh Kamble Roll 20 MSc Computer Science Part 2
Replace the path with the actual location of your extracted Fabric CLI binaries.
Install the Fabric Java SDK tools: Install the Fabric Java SDK tools using Maven:
mvn install
This command will install the necessary tools for interacting with the Fabric
test network from Java applications.
./network.sh up createChannel
Subodh Kamble Roll 20 MSc Computer Science Part 2
docker build .