Configure Blockchain on Windows

Configuring Windows for Hyperledger

Updated: 03 September 2023

Script

Before running the below script, ensure that you are in Administrator Powershell and that your Execution Policy is set to Remote Signed, if not then first run the following command

Terminal window
1
Set-ExecutionPolicy RemoteSigned

Then run the script below

Terminal window
1
cd ~
2
choco install python2 docker-desktop docker-compose golang nodejs git -y
3
npm install --global windows-build-tools
4
npm install --global grpc
5
mkdir .\go\src\github.com\hyperledger
6
cd go\src\github.com\hyperledger
7
git clone https://github.com/hyperledger/fabric.git

This will install the necessary prerequisites and should also set up the environment variables as well as the Go Workspace, but you may need to verify that the below steps were completed correctly

(Don’t know how accurate this script is as it may not necessarily work, but the instructions are as follows)

Received Instructions

Install Git for Windows x64 to include Uname command

https://curl.haxx.se/windows/

Extract binaries + add to Env Variables

https://store.docker.com/editions/community/docker-ce-desktop-windows

Install Windows Xxtras

Node JS - https://nodejs.org/download/release/v8.9.4/ https://hyperledger-fabric.readthedocs.io/en/release-1.3/prereqs.html#id1

Terminal window
1
npm install --global windows-build-tools
2
npm install --global grpc

Install Go

  1. Set Env Variables, PATH, GOPATH
  2. Create Workspace

(Not sure if this will work on Powershell/how it would be done correctly)

Terminal window
1
export GOPATH=$HOME/go
2
export PATH=$PATH:$GOPATH/bin

Install Python

https://www.python.org/downloads/release/python-2715/

Set up Docker Shared Drives

https://docs.docker.com/docker-for-windows/#shared-drives

  1. 1SET Env PATH var:

D:\Development\hyperledger\fabric-samples\bin

  1. NEW ENV VAR
Terminal window
1
compose_convert_windows_paths = 1
2
MSYS_NO_PATHCONV=1
3
clone git clone https://github.com/hyperledger/fabric.git
4
to $GOPATH-> src/hyperledger