Skip to content

Instantly share code, notes, and snippets.

@gaupoit
Last active September 26, 2017 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaupoit/a37c3f7af2079797bf7baf03ba221c0e to your computer and use it in GitHub Desktop.
Save gaupoit/a37c3f7af2079797bf7baf03ba221c0e to your computer and use it in GitHub Desktop.
Install Ethereum Private Node on Ubuntu
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get -y update
sudo apt-get install -y ethereum
cd ~
mkdir priv
cd priv
mkdir config
mkdir data
mkdir scripts
cd ~/priv/config
echo {
"config": {
"chainId": 424242,
"homesteadBlock": 0,
"eip155Block": 0,
"eip158Block": 0
},
"nonce": "0x0000000000000042",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"difficulty": "0x400",
"alloc": {},
"coinbase": "0x3333333333333333333333333333333333333333",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xffffffff",
"alloc": {
"8df9a875a174b3bc565e6424a0050ebc1b2d1d81": { "balance": "500042" },
"g41c74c9ae680c1aa78f42e5647a62f353b7bddf": { "balance": "600042" }
}
} > CustomGenesis.json
cd ~/priv/scripts/
touch INIT_PRIV_CHAIN.sh
chmod +x INIT_PRIV_CHAIN.sh
echo
#!/bin/sh
DATADIR=/home/$USER/priv/data
GENESIS=/home/$USER/priv/config/CustomGenesis.json
NETWORKID=42
IDENTITY="ISCPrivateChain"
PORT=30303
RPCPORT=8000
# Initialize the private blockchain
geth --networkid $NETWORKID --datadir=$DATADIR --identity $IDENTITY --port $PORT --rpcport $RPCPORT init $GENESIS > INIT_PRIV_CHAIN.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment