This is list of requirement setup local private ethereum network at Faculty of Electical Engineering 050506
requirment
Software | version |
---|---|
Ubuntu | 22.04.2 |
Node.JS | 20.2.0 |
NPM | 9.6.7 |
NPX | 10.2.2 |
Go-Ethereum(Geth) | 1.11.6 |
Solidity(solc) | 0.8.20 |
Python | 3.10.6 |
Ubuntu are Linux operating systems that reccommend for programming
- Open powershell as adminstator
- Run this command for install window subsystems Linux version2(wsl2)
wsl --install
- Initial your username and password for using Ubuntu
Node.JS is an open-source and cross-platform JavaScript runtime environment.
for set up Node.JS in Ubuntu
- Open wsl2 or Ubuntu in 2 differnt ways
- Powershell as administrator: run command
wsl
- Find application in window search name Ubuntu and open it
- Powershell as administrator: run command
- Run command for install NodeJS
sudo apt update
sudo apt install nodejs
- For check NodeJS installed correctly use this commnd to check NodeJS version
node -v
Note: -v
or --version
for check version of command
NPM is tools for helpping pull NodeJS moduls
- Open a terminal in WSL Ubuntu.
- Run this command for install
npm
sudo apt install npm
- Check NPM version by
npm -v
NPX is tools for helpping run node modules with out install dependency. It suit for run module command that run once
- Open a terminal in WSL Ubuntu.
- Run this command for install
npx
sudo npm install -g npx
Note: -g
is stand for install globally
- Check NPM version by
npx -v
- Test by run
npx cowsay wow
Output:
_____
< wow >
-----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
- If you follw setp by step and still found an error Search that shown in google and correct it that output should be same as shown
use this command to delete graceful-fs package in node_modules
sudo rm -fR /usr/local/lib/node_modules/npx/node_modules/npm/node_modules/graceful-fs
Geth is an Ethereum client written in Go. This means running Geth turns a computer into an Ethereum node. Ethereum is a peer-to-peer network where information is shared directly between nodes rather than being managed by a central server
- Open a terminal in WSL Ubuntu.
- Install
geth
with this command
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.11.6-ea9e62ca.tar.gz
tar -xvf geth-linux-amd64-1.11.6-ea9e62ca.tar.gz
sudo mv geth-linux-amd64-1.11.6-ea9e62ca/geth /usr/local/bin/
wget
: download of files from the Webtar
: used to create and manipulate archive files in various formats- Check your
geth
version
geth --version
Solidity compler is used to compile solidity source code
- Open Ubuntu
- Run this command for install
solc
command
npm install -g solc
- Check
solc
version by
solv --version
Python is used for interaction with Smart contract in Private Blockchain (Python3 are pre-install)
- Open a terminal in WSL Ubuntu.
- Check you Python current version
python3 -V
Output:
Python 3.10.6
- install python package dowloads tools
sudo apt install -y python3-pip
web3 is used for interaction with smart contract in blockchain network
- Open a terminal in WSL Ubuntu.
- Runthis command for install
web3
package
sudo pip install web3
json is used for
- Open a terminal in WSL Ubuntu.
- Runthis command for install
web3
package
sudo pip install json
By Vatcharapong Jittiprasert
Conference: