ChainBelow

Hyperledger Fabric, SDK and Composer

Installing Hyperledger Fabric

If you have Windows or Mac, download VBOX from https://www.virtualbox.org/wiki/Downloads

Install Linux Ubuntu 16.0.4 on the VBOX.

Hyperledger Fabric 1
Hyperledger Fabric 2
Hyperledger Fabric 3

  • Operating System - Ubuntu Linux 14.04 / 16.04 LTS (both 64-bit) or MacOS 10.12.x
  • Docker Engine: Version 17.03 or higher
  • Docker-Compose: Version 1.8 or higher
  • Node.JS: 8.9 or 8.x
  • npm: v5.x
  • git: 2.9.x or higher
  • Python: 2.7.x
  • A code editor of your choice, Hyperledger recommends VSCode.
        # Install xcode command line tools
        $ xcode-select --install

        # Install HomeBrew
        $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

        # Install NodeJS (MacOS)
        $ brew install node@8

        # Install NodeJS (Ubuntu)
        $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
        $ sudo apt-get install -y nodejs

        # Install Docker CE (MacOS)
        https://docs.docker.com/docker-for-mac/install/

        # Install Docker CE (Ubuntu)
        https://store.docker.com/editions/community/docker-ce-server-ubuntu

        # Install Git Client (MacOS)
        https://sourceforge.net/projects/git-osx-installer/files/

        # Install Git (Ubuntu)
        $ apt-get install git-core 
    
            $ brew unlink openssl && brew link openssl --force
            $ brew install openssl
            $ export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
            
            # headers
            $ export LDFLAGS="-L/usr/local/opt/openssl/lib"
            $ export CPPFLAGS="-I/usr/local/opt/openssl/include"
            
            $ brew install softhsm        
    
        $ sudo apt-get -y install libssl-dev
        $ export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

        # headers
        $ export LDFLAGS="-L/usr/local/opt/openssl/lib"
        $ export CPPFLAGS="-I/usr/local/opt/openssl/include"
    
            $ curl -O https://dist.opendnssec.org/source/softhsm-2.0.0.tar.gz
            $ tar -xvf softhsm-2.0.0.tar.gz
            $ cd softhsm-2.0.0
            $ ./configure --disable-non-paged-memory --disable-gost
            $ make
            $ sudo make install
            $ sudo mkdir -p /var/lib/softhsm/tokens
            $ sudo chmod 777 /var/lib/softhsm/tokens
            $ softhsm2-util --init-token --slot 0 --label "ForComposer" --so-pin 1234 --pin 98765432
      
            # Destroy old docker
            $ docker kill $(docker ps -q)
            $ docker rm $(docker ps -aq)
            $ docker rmi $(docker images dev-* -q)
            $ docker rm $(docker ps -a -q)
            $ docker rmi $(docker images -q)      
      
            $ npm install -g composer-rest-server@0.20
            $ npm install -g composer-cli@0.20
            $ npm install -g generator-hyperledger-composer@0.20    
            $ npm install -g yo  
            $ npm install -g composer-playground@0.20
      
            $ mkdir fabric-dev-servers && cd fabric-dev-servers

            $ curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.tar.gz
            $ tar -xvf fabric-dev-servers.tar.gz
            
            $ export FABRIC_VERSION=hlfv12
            $ ./downloadFabric.sh   
            
            # Start Fabric12
            $ ./startFabric.sh