After installing MultiChain on Oracle Compute Cloud, and playing around with HyperLedger on the Oracle Blockchain Cloud service, I now ran into a case where Ethereum was used.
This blog post describes how I installed a Ethereum node on Oracle Cloud Infrastructure.
You can connect to your instance as "opc" using the private key and the public IP address that is published in the console.
You need git, go and gcc. The easiest way is to install development tools
This blog post describes how I installed a Ethereum node on Oracle Cloud Infrastructure.
Prerequisites
- An account on Oracle Cloud with Administrator rights
- You have generated an ssh key-pair
- You are logged in to your cloud account
Create Compartment
Create a compartment with the name Ethereum to separate this from your other infrastructure. You can find this under "Identity".Create a Virtual Cloud Network
- Navigate to Virtual Cloud Network, by selecting Network from the Menu
- Select the compartment you just created
- Click "Create Virtual Cloud Network"
- The compartment will default to the compartment you just selected
- Name: ethereum-network
- select "Create Virtual Cloud Network plus related resources" to quickly get up and running
- Click "Create"
Create compute nodes
For this example I will create 3 nodes on 3 separate VMs.
- Go to the Compute Menu
- Select "Ethereum" in the compartment dropdown (left side of the menu)
- Click Create Instance
- Give the instance a name (ethereum-node1 for example)
- Leave all the defaults for shape and OS
- Upload your public key
- Select the networking you created (ethereum-network)
- Click "Create"
Repeat this process for 2 more nodes (giving them separate names of course).
You should have three nodes now, like the picture below shows. It might take a couple of minutes before they are completely done, but not longer than 5 minutes.
You can connect to your instance as "opc" using the private key and the public IP address that is published in the console.
Install Ethereum
To install Ethereum for Oracle Enterprise Linux, you have to install it from source. There is no package available.
- sudo /usr/bin/ol_yum_configure.sh
- sudo yum update
- sudo yum groupinstall 'Development Tools'
- sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
- sudo yum install curl-devel
Install git
- sudo wget https://github.com/git/git/archive/v2.10.1.tar.gz -O git.tar.gz
- tar -zxf git.tar.gz
- cd git-2.10.1/
- make configure
- ./configure --prefix=/usr/local
- sudo make install
- git --version to check the installation
Install go
- cd ~
- wget https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz
- sudo tar -C /usr/local -xzf go1.11.4.linux-amd64.tar.gz
- add go to your path by editing .bash_profile
- go version to check the installation
Install geth
To create the private network, we need to install geth, the command line tool that runs a ful Ethereum node implemented in Go. It offers three interfaces:
- the command line subcommands and options
- a Json-rpc server
- An interactive console
Execute the following commands
- cd ~
- git clone https://github.com/ethereum/go-ethereum
- cd go-ethereum
- make geth
- add build/bin to your path by editing your .bash_profile
Start the node
You can start a node by running build/bin/geth. This will add this node to the public ethereum network. This node is now part of the Ethereum network.
If you don't want to be part of the public network, you can also create a private network. https://github.com/ethereum/go-ethereum/wiki/Private-network.
If you don't want to be part of the public network, you can also create a private network. https://github.com/ethereum/go-ethereum/wiki/Private-network.
Happy coding 😊