Skip to content

Instantly share code, notes, and snippets.

@hpphat92
Created September 27, 2017 06:27
Show Gist options
  • Save hpphat92/ed99c678453648624538da348c3ee83d to your computer and use it in GitHub Desktop.
Save hpphat92/ed99c678453648624538da348c3ee83d to your computer and use it in GitHub Desktop.
Guide to connect and deploy AWS Server

Guide to connect and deploy AWS Server

What should we need?

  • PEM file containing private key from AWS server.
  • A domain to server
  • GIT Bash (In Window, can't use command line tool or powershell).

Steps: Step 1: Connect to server: In Window, open GIT Bash and run: ssh -i [Direction to PEM File] [using either root, ubuntu or ec2-user, centos]@[server domain] For example: ssh -i phatHong.pem ubuntu@ec2-52-53-185-37.us-west-1.compute.amazonaws.com (Reference: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectingMindTerm)

Connect is success in case your commandline changed to your remote server machine ip and name.

Step 2: Installing Stubs: We need node for environment, npm for installing packages from your project, git for version controlling (or pull push), unzip for unzip compressed files (*.zip), http-server for running server.

  • Step 2.1 Install YUM (It is first thing to install) Running Command: sudo apt-get install yum. To install YUM

TroubleShooting: In Case of error in above command. Run : sudo apt-get update

  • Step 2.2 Install NodeJS Latest version Running following command in order
  • Step 2.3 Verify that nodejs is installed correctly 2.3.1 Run node -v to verify that node is installed 2.3.2 In case of it throw error or not return the current node version. We check command: nodejs -v.

(Reference: https://codeforgeek.com/2015/05/setup-node-development-environment-amazon-ec2/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment