My steps for Linux Virtual Machine for running Go-Ethereum CLI + Ethereum.js + Chrome (Windows 7)

SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
edited February 2015 in Geth - Go Implementation
Here are my steps for setting up a VMWare Player 7/Ubuntu 14.04 32Bit Virtual Machine with Go-Ethereum/Ethereum.js/HTTpServer/Chrome (tested on Windows 7) working as of Wed, Feb 11, 2015. I had a tone of trouble getting all of this going, it all seems straight forward when you read the posts/comments, but its the little things that end up killing your time. This is not a guide for installing MIST proper, just Go Ethereum CLI and Ethereum.js. This guide is a combination of sources, comments and install guides. This guide is super extensive, so you may just want to use this as a resource rather than a guide if you kinda get the gist of installing Ubuntu and Go-Ethereum or working with HTML/JS files.

Step 1: Install VMWARE Player Trial from the VMWARE website ("Try for Free", then select the appropriate addition)

Step 2: Download Ubuntu 14.04 32Bit LTS ISO (I used 32bit, as 64Bit had trouble with my64Bit Windows 7 OS)

Step 3: From KenK [5]
-Once VMware is downloaded open the file and follow the installation instructions. Run the program and select File> New and create a virtual machine. Choose to create it from a 'disc or image' and select the Ubuntu ISO you downloaded previoulsy. Choose install and setup your vm as you would like it. make sure you specify the VM has at least 2GB of memory or the build of alethzero will fail.
-You can modify the VM machines ram allocation by opening up VM machine settings and moving the ram up from 2GB to say 4GM.
-Once ubuntu is installed you will want to update your package manager. Open the terminal and type:
sudo apt-get update && sudo apt-get upgrade
-Now return to your host sytem and find the vmware window go to Virtual Machine > install VMWare tools. This will mount a cd containing files needed by linux to use the hosts sytems hardware and copy paste between your host system and your vm. Go back to your vm and navigate to the drive marked vmware tools extract the vmware tar ball to the desktop. Then return to the terminal and input:
cd Desktop/vmware-tools-distrib
sudo ./ -d

Step 4: From KenK Again [5]
- Shutdown and take a snaphot of your vm to revert to later.
- **Note, you can take a snapshot by copying the Ubuntu directory in your Virtual Machines folder (found in My Documents) and naming it something else like "Ubuntu Backup 1". You should do this after every few steps just in case something goes wrong (although these backups are like 6 Gigs, so be moderate).
- Start-up your vm and you should now find that you can alter the size of the screen and copy paste between your host and the vm. If you cant google vmware tools and see if you can trouble shoot what went wrong. You now have the base to install the dependencies for Alethzero. Start by entering the below in the terminal:
sudo apt-get install build-essential g++-4.8 git cmake libgmp-dev
sudo apt-get install libboost-all-dev automake unzip libtool libleveldb-dev yasm libminiupnpc-dev
sudo apt-get install libreadline-dev scons libncurses5-dev qtbase5-dev qt5-default qtdeclarative5-dev
sudo apt-get install libqt5webkit5-dev
sudo apt-get install libcurl4-openssl-dev libjsoncpp-dev libargtable2-dev libboost-test-dev cmake

Step 5: Install Go, Make Go DIR and GO SRC/Github Folders and $GOPath, add $GOPATH and $GOROOT to $PATH in .bashrc
sudo apt-get install golang
mkdir -p ~/go; echo "export GOPATH=$HOME/go" >> ~/.bashrc
mkdir ~/go/src
mkdir ~/go/src/
echo "export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc

Step 6: Check that Go is working (you should get something like "go version go1.2.1 linux/###")
go version

Step 7: Install GPM and Readline
sudo apt-get install -y libgmp3-dev libreadline6-dev

Step 8: Install some Go Imports that are Needed for Go Ethereum CLI
go get
go get
go get

Step 9: Install Software Properties Common and PPA Ethereum and Ethereum DEV:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ethereum/ethereum
sudo add-apt-repository ppa:ethereum/ethereum-dev
sudo apt-get update

Step 10: Clone Go-Ethereum "Develop" branch from Github and build/install just the CMD/Ethereum:
mkdir ~/go/src/
cd ~/go/src/
git clone
cd go-ethereum
git checkout develop
cd cmd/ethereum
go build
go install
** Note, I did not do this step in this way (even though it should work in this way). I installed Go-Ethereum via "go get", then I deleted the Ethereum build in the ~/go/bin folder and the Go-Ethereum work folder in ~/go/src/ethereum/go-ethereum and then did the steps above (minus the mkdir ethereum. You may need to do this if you get build errors making cmd/ethereum with go build or go install.
** once this step is done you should be able to do ethereum -rpc -mine, you can try this to see if its working, to shut it off just do CTRL+C.

Step 11: Install Chrome Web Browser Stable (follow the instructions)
**Note, Chrome should open up in Software Manager, Hit install.

Step 12: Install NodeJS, NMP, NodeJS-Legacy
** Note, this will create a node_modules folder in the HOME dir.
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install nodejs-legacy

Step 13: Get Ethereum.JS Files
npm install ethereum.js

Step 14: Open a new terminal and start a basic HTTP Server to serve the HTML files via python's SimpleHTTPServer
** Note, make sure you use a port like 9000 or something that is not the port of the JSON RPC Eth CLI server.
** This will start a basic HTTP Server in the Ethereum.js DIR, so that you can serve Ethereum.JS files
cd ~/node_modules/ethereum.js
python -m SimpleHTTPServer 9000

Step 15: Check to see if the basic HTTPServer is working, open up Chrome and type in the URL
If you see a list of files, the local HTTPServer is working.

Step 16: Goto Ethereum.JS examples and Modify "balance.html" HTTPSync and JS Include File locations
cd ~/node_modules/ethereum.js/example/
gedit balance.html
** My JSON RPC server port was 8545
** This should open up GEdit (an text editing program), from here you need to modify a few locations.
Change this line:
<script type="text/javascript" src="js/bignumber.js/bignumber.min.js"></script>
To this:
<script type="text/javascript" src="../node_modules/bignumber.js/bignumber.min.js"></script>
and this line:
web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080'));
to this:
web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8545')); // or what ever your JSON RPC port is
Once you have done that, hit "save" in GEdit
** Basically you are just setting the right (pre Ethereum.js build) dependency paths and HTTPSyncProvider locations (i.e. the right local port number). All JS files must include bignumber.min.js and ethereum.js.

Step 17: Open a new terminal and then start up the Go Ethereum CLI with JSON RPC and Mining On
ethereum -rpc -mine

Step 18: Open up "balance.html" in Chrome and check your balance
By opening http://localhost:9000/example/balance.html in Chrome and then clicking "watch balance" if you get something like "original balance: ### watching" then you are all setup for Ethereum.js/Go Ethereum on Ubuntu 14.04 VMWare on Windows 7 test net.

Hope this helps.

3. Taylor Gerring.
4. Viorel Stirbu.
5. @KenK.
6. @StephanTual.
7. Taylor Gerring.
8. @wemeetagain; @Eicosapentaenoic.
Post edited by SilentCicero on


  • SilentCiceroSilentCicero Toronto, CAMember Posts: 159 ✭✭✭
    edited February 2015
    Apologies, went over the build again, there are a few extras I forgot.

    New Step 8:
    sudo apt-get install Mercurial
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    go get -u
    Post edited by SilentCicero on
  • taramanictaramanic Member Posts: 24
    Thank you very much for sharing this @SilentCicero, this is very helpful.
  • fit949fit949 Member Posts: 1
    Thank you for this informative guide. I have a question I do not see any graphic drivers installed Catalyst or Nvidia.
  • Crypt1xCrypt1x The BlockchainMember Posts: 52
    Excellent job although I do not have tested the guide myself.
  • bmkrishbmkrish Member Posts: 14
    Hi ,
    I 'm using windows7 and installed in the windows itself .
    1.Run the geth --rpc --rpcport 8545 rpccorsdomain="*"
    2.Run the ethereum.js>python -m http.server 9000
    3.Listed all the HTML files,if I click the balance.html it is not sowing any results .

    But I am able to see the results in the MIX IDE of the balance.

    Please let me know if I'm missing something ,this is really bit urgent .


Sign In or Register to comment.