Download Hyperleger Fabric

With the dependencies installed, the official download of Hyperleger Fabric begins.

Create a working directory for it and sort it out later. Put it in the SRC directory under your home directory.

mkdir src
cd src
Copy the code

Run the official script given to download Fabric. Give github a link to get a feel for it. Github.com/hyperledger…

The official script bootstrap.sh. There are a lot of issues with official scripts, including the old version of the source failure, slow download in foreign environments, etc. Here is a reference to the source code I wrote about bootstrap.sh. Juejin. Cn/post / 701950… It includes a script that you can run, bootstrap.sh. Copy directly to the local SRC directory.

Run the bootstrap. Sh

chmod u+x bootstrap.sh
sudo ./bootstap.sh
Copy the code

After a long wait, the script does three things. Ten minutes? 20 minutes?

First thing, download the official instance of Fabric-samples.

Second thing, download the Fabric binary.

The third thing is to download the image you need.

These will download different files depending on the version specified in the script. The fabric1.x and 2.x directory structures will be quite different.

Here is the result after execution.

Let’s test if the installation is successful

We go to the official case folder and run one of the test cases given to us. Let’s try it.

cd fabric-samples
cd first-network
Copy the code

The project directory structure is shown below.

This is where our dream begins.first-network

Start by generating configuration files for various channels and blocks. The script is one-click, for beginners, and then we’ll talk about what the script does. Byfn. sh let’s look at the help command first.

Poor English may not understand it, such as me. But below gives the concrete example, the suggestion English is good, looks more. The summary is as follows:

  1. Generate related configuration files
  2. Start the network
  3. Shut down the network

Start by generating a configuration file

Start the network

Is Docker not running? It didn’t work.

Start docker and run.

Later, I found a pile of instructions that I couldn’t understand. I felt so complicated that I couldn’t see them clearly. It is not clear, but it is important, that the process includes a complete example, which is then analyzed step by step. Very important !!!!!! . Understand, basically for this platform function to master half.

It is recommended to start from start and see end. A glance at the English will give you an idea of what the execution process looks like, even if you don’t understand it. See this build environment is done !!!!!This indicates that you have deployed Fabric1.4.8 and are running one of the official instances.

What happens after you run the script?

Then slowly analyze !!!! There’s no need to take a break.