-
-
Save AlwaysBCoding/9ce09281e5e097ce8ab7add2602c2fc7 to your computer and use it in GitHub Desktop.
// AlwaysBCoding Screencast - Introduction to AWS EC2 | |
https://www.youtube.com/watch?v=jFBbcleSPoY | |
// Create a new EC2 Instance on aws.amazon.com (Amazon Linux AMI) | |
// ===================== | |
// edit permissions on pem file | |
chmod 400 {keyfile}.pem | |
// ssh into instance, while exposing remote port for remote Atom | |
ssh -i {path-to-keyfile}.pem -R 52698:localhost:52698 ec2-user@{instance-ip} | |
// Install Git | |
sudo yum install git | |
// Install Homebrew Linux | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" | |
// Add Homebrew executables to PATH | |
echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >>~/.bash_profile | |
echo 'export PATH="/home/ec2-user/.linuxbrew/sbin:$PATH"' >> ~/.bash_profile | |
source ~/.bash_profile | |
// Install C Development Tools | |
sudo yum groupinstall 'Development Tools' | |
// Install Node.js (this can take ~20 minutes) | |
brew update && brew install -v node (this will take a minute) | |
// Install Remote Atom | |
sudo curl “https://raw.githubusercontent.com/aurora/rmate/master/rmate” -o /usr/local/bin/rmate && sudo chmod +x /usr/local/bin/rmate && sudo mv /usr/local/bin/rmate /usr/local/bin/ratom | |
// Install tmux | |
sudo yum install tmux | |
// Custom tmux configuration | |
touch .tmux.conf | |
> Add tmux configuration to .tmux.conf file | |
> Highly recommend this short tmux book for reference https://pragprog.com/book/bhtmux/tmux | |
// Install Ethereum testrpc | |
npm install -g ethereumjs-testrpc | |
// Run testrpc | |
testrpc | |
// Make a new folder | |
// Create pacakge.json file | |
{ | |
"dependencies": { | |
"web3": "0.17.0-alpha" | |
} | |
} | |
// Install dependencies (need to be inside the same folder as package.json) | |
npm install | |
// Run node console (need to be inside the same folder as package.json) | |
node | |
// INSIDE NODE CONSOLE | |
var Web3 = require("web3") | |
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")) | |
web3.eth.accounts | |
// If web3.eth.accounts matches the accounts in your testrpc, you are good to go |
Same as @charlesdarkwind
all good until attempting to connect with testrpc. Confirmed ports and all prior steps.
Any suggestions, because I'd love to take this video course if can at least get rolling.
web3.eth.accounts
Error: Invalid JSON RPC response: undefined
at Object.InvalidResponse (/home/ubuntu/workspace/test/node_modules/web3/lib/web3/errors.js:35:16)
at HttpProvider.send (/home/ubuntu/workspace/test/node_modules/web3/lib/web3/httpprovider.js:87:22)
at RequestManager.send (/home/ubuntu/workspace/test/node_modules/web3/lib/web3/requestmanager.js:58:32)
at Eth.get [as accounts] (/home/ubuntu/workspace/test/node_modules/web3/lib/web3/property.js:107:62)
at repl:1:9
at ContextifyScript.Script.runInThisContext (vm.js:44:33)
at REPLServer.defaultEval (repl.js:239:29)
at bound (domain.js:301:14)
at REPLServer.runBound [as eval] (domain.js:314:12)
at REPLServer.onLine (repl.js:440:10)
@grahamhindle you also need to port forward. details here: https://atom.io/packages/remote-atom
sudo curl "https://raw.githubusercontent.com/aurora/rmate/master/rmate" -o /usr/local/bin/rmate && sudo chmod +x /usr/local/bin/rmate && sudo mv /usr/local/bin/rmate /usr/local/bin/ratom
Without the fancy quotes, this works.
Row 42: sudo npm install -g ganache-cli
is recommended now instead of ethereumjs-testrpc.
i cant get atom to open when i run ratom .tmux.conf
When I get at the last command: