Alibabacloud.com offers a wide variety of articles about hyperledger fabric installation, easily find your hyperledger fabric installation information here online.
Super Ledger Hyperledger-fabric local compilation and installation
From Yang Paohua and other "blockchain-principles, design and Application" Local compilation installation deployment Super Ledger fabric network.
The super ledger fabric
Docker-compose
$ apt-get Install Docker.io
$ apt-get Install docker-compose
$ docker-v
Docker version 1.13.1, build 092cba3
4. Install the Go language
Go is a programming language developed by Google that is statically strong-typed, compiled, and styled, and has a garbage collection function. To facilitate search and identification, it is sometimes referred to as Golang.
# Download the Linux version of Go install package
$ wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
00 Introduction
The open source Blockchain distributed ledger--hyperledger Fabric, launched by the Linux Foundation, has ushered in the 1.2.0 version. The project focuses on performance and reliability, as well as cross-industry collaboration to drive blockchain and distributed ledger technology. Hyperledger Fabric can
Take a look at the samples two department network three automation scripts have done what to boot block chain network execution Scriptsscriptsh scripts four themselves perform Channelchaincode related operations start the network into the CLI container create channel add to channel install C Haincode initialization chaincode Chaincode Query method Chaincode Invoke method Chaincode other methods
A. Download Samples
Note: build the basic environment first, then follow the steps below.
git clone ht
If you have installed tools such as Go, git and checkout related and download related images, you can only get up to 5 steps below. e2e_cli~/go/src/github.com/hyperledger/fabric$sudo chmod 777 release~/go/src/github.com/hyperledger/fabric$sudo chmod 777examples/e2e_cli~/go/src/github.com/
: $PATH
Exit Edit and enter the following command to make the changes effective:
Source/etc/profile
Enter the following command to see if the installation was successful:
Go version
If it appears: Go version go1.9.2 LINUX/AMD64 indicates a successful configuration.
As for Gopath, this is the directory where the Go program runs, that is, all the go programs you write are placed in this directory. Based on the above configuration, we create a new Gop
(finality). The following example is the process by which Hyperledger/fabric adds users to the Docker development environment.
Development Environment: Win7 (+ bit, RAM >=8g), vagrant, blockchain, Docker,golang
1. Win7 Installation Cygwin
(https://cygwin.com/install.html) set the installed executable directory (C:\cygwin64\bin) to the console system path var
Password. Password: # Number of retries for CouchDB errors maxretries:3# Number of retries for CouchDB errors during peer startup Maxretriesonstartup:10# CouchDB Request Timeout (unit:duration, e.g. 20s) requesttimeout:35s # Limit on the number of Reco RDS to return per query Querylimit:10000 COUCHDB is hosted in a Docker container by using a Docker compose script that uses Hyperledger fabric to set C
First, the Fabric SDK
The latest official document for Hyperledger fabric (V1.1.0-preview), the description of the Fabric SDK is still poor, just a few simple descriptions, plus two GitHub links: Fabric-sdk-node Fabric-sdk-java
I
as a standalone database process with peer, so there are additional considerations for setup, management, and operation. We can consider starting with the default embedded Leveldb, which can be transferred to COUCHDB if additional complex rich queries are required. Modeling Chaincode Asset data as JSON is a good practice so that we can execute the complex rich queries we need in the future. Two. Enable Couchdb This article uses the relevant components and resources in the
variable:
Enter the. BASHRC Configuration environment variable:
$ sudo vim ~/. BASHRC or: $ sudo vim/etc/profile
Add the following code to the last side:
Export gopath=/usr/local/goexport path= $GOPATH/bin: $PATH
Save, exit.
To make an environment variable effective:
$ source ~/. BASHRC or: $ source/etc/profile
After viewing the version number no problem, the configuration is successful.1.3.2 node. js
Download node. js
$ CURL-SL https://
Install node. js
sudo Install -y Nodejs
Check
Because the software (Docker fabric 0.6) and the system (Ubuntu 16.04TLS) operating environment version of the changing, so the online list of various tutorials or the personal summary of netizens may not be able to walk in their own environment, especially for the novice, out of the wrong. Fabric 1.0 is not going to be ready at the end of March, so share your summary of the kids ' shoes that you want to pr
chain code. testing with development mode
Usually the chain code is started and maintained by the peer node. However, in "development mode," the chain code is built and started by the user. This pattern is useful during the fast coding/building/running/debugging of the chain code development phase.
We started "Development mode" by leveraging the example of pre-generated sorting and channel artifacts from the sample development network. Therefore, the user can immediately enter the process of co
first of all thanks to the dark blue habitat, this tutorial is based on his tutorial [http://www.cnblogs.com/studyzy/p/7437157.html] collation, block chain technology developed quickly, in the great God's tutorial a little to add. In addition, there are also in the learning block chain students can contact me, we learn from each other.
In the first contact with Hyperledger, very confused, do not know where to start. The tutor suggested that I not on
Output:go version go1.10.1 linux/amd64
If you have an older version of Golang in your system, uninstall the old version of Golang using the following command, and then reinstall
$ su -# apt-get remove golang-go --purge apt-get autoremove --purge apt-get clean
Installing node and NPM
Install NVM
Install node
$ nvm install v8.11.1
Check node version
$ node -v
Output:v8.11.1
Check NPM version
$ npm -v
Output:5.6.0
Hyperledger
}//main function starts up the Chaincode in The container during instantiate func main () {if err: = shim. Start (New (Simpleasset)); Err!= Nil {fmt. Printf ("Error starting Simpleasset Chaincode:%s", err)}}
2.7 Build Chaincode
Compiling Chaincode
Go get-u--tags nopkcs11 github.com/hyperledger/fabric/core/chaincode/shim go build
--tags NOPKCS11
Next Test Chaincode
2.8 Using DEV Mode test
Generally spea
Blockchain is a popular technology nowadays, where IBM Hyperledger (open source) is the leader in the alliance chain. IBM has the relevant courses.
The following is the entire process of building hyperledger fabric in your own Ubuntu development environment for reference.
First, the previous step diagram
(the original is not carefully encrypted by the DSM, can no
1, Environmental structure Description:The system uses the container to run, the construction process is simple, each component division of labor is clear:1.docker-compose:docker container management;2.Go Lang Sdk:go language development, compilation environment;3.git:git Mirror Clone and commit;4.Rest client:rest API test;The main operations of the container are: Membersrv and peer;
2. Deployment Environment Readiness
3. Installation and Deployment3.
-compose
View Dockercompose Version Information
$ docker-compose --version
Output:docker-compose version 1.8.0, build unknown
Golang
Fabric1.1.0 Version Requirements go1.9+
Fabric1.0.0 Version Requirements go1.7+
Upload go1.10.1.linux-amd64.tar.gz
Unzip the file
$ tar -zxvf go1.10.1.linux-amd64.tar.gz
Edit environment variable File
Add the following content:
export GOPATH=$HOME/gocodeexport GOROOT=$HOME/goexport PATH=$GOROOT/bin:$PATH
$ source .bashrc$ go version
Output:go version go1.10.1 linu
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.