Hyperledger Explorer Setup with Hyperledger Fabric

Hyperledger Explorer is a simple, powerful, easy-to-use, highly maintainable, open-source browser for viewing activity on the underlying blockchain network.

To execute Explorer you should have fabric-samples with first-network UP.

For Fabric Network following are the commands to run hyperledger first network

1.Install Docker &Docker Compose

sudo apt update
sudo apt upgrade

2.Install Fabric

curl -sSL https://bit.ly/2ysbOFE | bash -s
sudo nano ~/.profile
#add this in last to set the path of cryptogen it will be used when #we create our cryptoconfig or first network
export PATH=/home/ubuntu/fabric-samples/bin:$PATH
source ~/.profile

3. Run Fabric

cd /home/ubuntu/fabric-samples/first-network
./byfn.sh up
#If it runs correctly then its ok but if it does not run Correctly #then
#check it is running correctly or not
#if not delete all docker images
docker kill $(docker ps -q)
docker rm $(docker ps -aq)
docker rmi $(docker images peer* -q)
docker system prune
docker system prune -a

4. To run fabric explorer

#Install GO
wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz
tar -xzvf go1.11.2.linux-amd64.tar.gz
mv go/ /usr/local
nano ~/.bashrc
#add these two lines in bashrc to set paths of GO
export GOPATH=/usr/local/go
export PATH=$PATH:$GOPATH/bin
source ~/.bashrc
#Clone blockchain explorer
git clone https://github.com/hyperledger/blockchain-explorer.git
#Install POSTGRE
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
#Configure blockchain explorer

5. set the connection profile in explorer:

$ cd /home/ubuntu/blockchain-explorer/app/platform/fabric/connection-profile/
$ nano first-network.json
# change the following PATH according to your need
# adminPrivateKey path
# signedCert path
# tlsCACertspath

6. Now run the explorer.

$ cd blockchain-explorer
$ ./main.sh install
$ ./main.sh clean // if u get any error
$ ./main.sh test

--

--

DevOps/Cloud | 2x AWS Certified | Terraform | Gitlab

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store