Linux – Directory structure on Linux EC2

amazon ec2directorylinux

First, I'm a complete newbie to Linux and Tomcat. I'm not technical either. I get my stuff done by feeling my way around the dark until things work. I do read a lot though.

I have a dev machine (Windows 7) with the following config:

c:\dev\apache\
c:\dev\tomcat7\
c:\dev\sites\site1
c:\dev\sites\site2

I just created an Amazon Linux EC2 instance and I want to upload my stuff and have the same structure.

  1. Is there any reason I shouldn't replicate my structure from dev to the EC2 instance?
  2. Are there any security concerns or things to keep in mind now that I'm using Linux?

I read that a) it's better to install Tomcat in /usr/local/tomcat and b) that if I am installing Tomcat myself, I should create a user group for it.

I usually login to ec2 and type sudo su then I do a wget to download and install Tomcat.

Best Answer

  1. HTTPd and Tomcat should be placed in their normal locations, but your sites can be placed under /srv (e.g. /srv/sites/site1).

  2. Certainly. Lots. Far too many to put in an answer. The short form is to disabled unneeded services, block unused ports, and make sure your software is up to date.