Skip to content

Instantly share code, notes, and snippets.

@maxtaco
Last active December 15, 2015 05:29
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 maxtaco/5208839 to your computer and use it in GitHub Desktop.
Save maxtaco/5208839 to your computer and use it in GitHub Desktop.
Notes on a new EC2 server with an Amazon AMI

Notes on Setting up a New EC2 Node

sudo yum --enablerepo=epel install fail2ban
  • Some standard yum packages to install:
    • gcc
    • gcc-c++
    • make
    • git
    • mysql-server
  • Easiest way to format and partition a new EBS volume
    • fdisk -u -c /dev/xvdf ---- then, make a giant primary partition on the whole volume (using the n command), using defaults. Remember to write out with the w command.
    • mkfs.ext4 -Lmylabel /dev/xvdf1 --- then use that label in /etc/fstab to identify the disk.
  • There are a few notes here; in general the firewall stuff is taken care of at the AWS level, but the suggestions for SSH lock-down are good: http://plusbryan.com/my-first-5-minutes-on-a-server-or-essential-security-for-linux-servers
  • When making new authorized_keys files, be sure to set it chmod 0600, otherwise logging in with pubkey authorization will be disallowed by sshd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment