Skip to content

Instantly share code, notes, and snippets.

@palaashatri
Last active November 28, 2020 08:06
Show Gist options
  • Save palaashatri/c39d9b5421d11afa7874fdf6d3f7ccf3 to your computer and use it in GitHub Desktop.
Save palaashatri/c39d9b5421d11afa7874fdf6d3f7ccf3 to your computer and use it in GitHub Desktop.
Setting up the blockchain developer environment for Hyperledger Fabric and Ethereum on Ubuntu.
  • Install and run docker engine, git and curl -
sudo apt-get update
sudo apt-get install git -y
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
sudo groupadd docker
sudo usermod -aG docker $USER
sudo reboot
  • After reboot, check if Docker runs rootlessly by using : docker run hello-world
  • Install docker-compose -
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
  • Install Node.js (v 12.15.0) -
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh -o install_nvm.sh
bash install_nvm.sh
source ~/.profile
nvm install 12.15.0
nvm alias default 12.15.0
node -v
npm -v
  • Install Go -
wget -c https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
sudo export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
git clone https://github.com/hyperledger/fabric-samples
curl -sSL https://bit.ly/2ysbOFE | bash -s
  • Install Ganache and Truffle (for Ethereum Projects) -
npm install -g truffle ganache-cli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment