Going through your code, I can deduce that you have successfully installed Geth on AWS. The main thing we need to do now is to configure an Ethereum Node.
Make sure that you are in the home directory of your cloud server. Using pwd command, create a folder that will serve as the genesis block of your Ethereum Blockchain. Now change the directory to the newly created folder and then create a file called genesis.json
mkdir mlg-ethchain cd mlg-ethchain nano genesis.json
You cannot create a private blockchain without a genesis block. These blocks are mostly embedded within the client but in the case of Ethereum users are allowed to configure a genesis block through a JSON object.
The JSON object looks like:
"0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x3333333333333333333333333333333333333333",
You should also note that the coinbase is the default address for mining. And as wallet has not been created yet, the default address can be set to any valid Ethereum address. For testing and development, it is recommended that mining should be started from a lower difficulty level and increased gradually. parentHash is zero and gasLimit is set to the maximum amount os gas that is required to execute any type of transactions. Nonce is set as a random number. In the alloc section, users can allocate a number of pre-mined tokens or ether to certain addresses at the beginning of the blockchain.
For confirming if the configuration is correct or not, use the command:
Don't get confused next time. Know how to do everything properly. Enroll now in Blockchain Course.