I haven't seen much by way of GEth setup/tutorials so I thought I would quickly write one. This is my usual setup for DApp development, but in tutorial form. You will need a computer with at least 8 GB of RAM. Everything here will be self-contained within the VM.
1. Get Ubuntu 14.10 Desktop ISO & VMWare Player 7+ Download the latest
Ubuntu 14.10 x64 ISO, and
VMWare Player2. Setup VMWare Player w/ Ubuntu 14.10 Install VMWare Player, open VMWare, create a new Virtual Machine (CNTRL+N), "Use ISO Image" & select the Ubuntu ISO you downloaded (next), select a basic password (next), choose a VM name (next), set Max to 40GB harddrive (next), "Customize Hardware" settings and make sure you have at least 5GB RAM for your new VM (close), then build the new VM (finish).
3. In the VM, open terminal (CNTRL+ALT+T), Install git, curl, Meteor, geth, setup an account and run geth (let it generate the DAG)
$ sudo apt-get install git
$ sudo apt-get install curl
$ curl https://install.meteor.com/ | sh
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:ethereum/ethereum-qt
$ sudo add-apt-repository ppa:ethereum/ethereum
$ sudo add-apt-repository ppa:ethereum/ethereum-dev
$ sudo apt-get update
$ sudo apt-get install ethereum
$ geth account new // select an easy password for use with geth
$ geth --rpc --rpcaddr="localhost" --mine --unlock=primary --rpcport="8080" --rpccorsdomain="http://localhost:3000" --loglevel=5 --maxpeers=0
4. Open a new terminal, git clone `meteor-dapp-boilerplate` & run it in Meteor
$ git clone https://github.com/SilentCicero/meteor-dapp-boilerplate.git
$ cd meteor-dapp-boilerplate/app
$ meteor
5. Install Chrome, run the DAppIn the VM, open up Ubuntu Software Centre, search "Chromium Web Browser", click install, open up
http://localhost:3000 in Chrome and your done!
I hope this helps, see you at the Frontier! All the best, SC.
Comments
Instead of using Ubuntu Desktop, I prefer a server version with minimum gui-desktop.
After installing an ubuntu server, you can install the desktop without other fancy things. This way, you may need less than 4GB memory for the VM.
@Atomrigs agreed, while I like the full desktop, your right, it does use more ram, the server would be more efficient, no question.
I'd like to just get geth running from the command line before exploring more, and there's man file that needs writing off the back of my learning to get geth working. So I have this running: ...and I gather from the OP that this should generate the DAG. But is it doing anything else as it only appears to be working locally, how do open up to the rest of the net?
This geth code will generate the DAG, but once the DAG is generated the node should begin mining.
I run an Ubuntu 14.10 VM instance on my Ubuntu 14.10 machine, I only use the VM instance for geth, while I have Meteor and my dev files on my main machine. This is so that I can develop on my main machine, but utilize an Ethereum node, much like a server, via the VM. I'd highly recommend this setup if you plan on developing with Ethereum.
I just changed the configuration to have meteor run outside the VM so the actual dev environment is local.
Here is how in case anyone is interested:
1) Change VM network settings to allow outside connections either by Bridged Networking (easiest) or with Port Forwarding. Instruction for both VirtualBox and VMware here: http://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server.
2) Follow steps 1-3 above to install geth on the VM. Only change the rpcaddr in last command of step 3 to "0.0.0.0." so geth will listen to outside connections: Locally (outside the VM):
3) Install git and meteor and clone https://github.com/SilentCicero/meteor-dapp-boilerplate.git
4) Edit meteor-dapp-boilerplate\app\client\lib\thirdpartyConfig.js - change "localhost" with the VM's IP: 5) Run "meteor" in "meteor-dapp-boilerplate\app\" and point your browser to http://localhost:3000
Hopefully the page shows up with an address.
I am looking for my my miner here though and do not see it.
https://eth-netstats.herokuapp.com/
Am I missing something?
I'll go looking, but maybe someone has a moment to point me in right direction.
@SilentCicero and @kordova - thank you so much for the help.
I0423 09:02:45.871804 13432 nat.go:94] mapping error: no devices discovered
@Draugh little error's like that will happen, especially if your in a VM. if its preventing you from core functionality you want to use, then ask Jeff or a Go DEV on Gitter. They would know more about it than I would. That looks like a networking problem, but if you just want a local chain, than I don't think it should be a problem.
However, there is a general slowness, so I'm going to try staging the SOL.js compiler dynamically so that it loads after the interface.
Here is the updated command
"
4) Edit meteor-dapp-boilerplate\app\client\lib\thirdpartyConfig.js - change "localhost" with the VM's IP:
web3.setProvider(new web3.providers.HttpProvider("http://[VM's IP]:8080/"));
"
Do you know what is the equivalent change for the meteor-dapp-cosmo app ? Thanks
On upper right hand corner there is RPC Provider - you will see http://localhost:8080. It is actually the text box - Just update the value to your IP and hit "Connect" button. BTW, you might have to start "geth" on you VM with rpcaddr="0.0.0.0", if you want running the Cosmo client from your host machine and not guest machine.
Thanks @oomo ... Changing the rpc provider on the upper right hand worked. It didn't intuitively look editable