If you were starting with a brand new LEMP stack on Ubuntu 15.04, what would you install?

April 29, 2015 2.1k views
LEMP Ubuntu

My trusty old "manually installed" LEMP stack on a $5 14.04 x32 Ubuntu droplet has served me very well over the last year - 5 sites (phpbb, Wordpress etc) are running happily, response times excellent, CPU around 30%, memory around 80%, swap around 50% of 1GB.

All good. But so much has changed with things like Docker now, and I'm just a bit mind-boggled for choice.

I know there are multiple options open to me (excluding application droplets until they get on board with 15.04). But if you were to want to install a small, fast, light 5-site droplet (with separate users/pools), where would YOU start, and why?

  • You got 1GB of Ram for $5?

  • For static sites a good old LEMP stack may still be the best way to go if it has been working well for you. If you are interested in working with Docker this would be a good place to get started.

    I should also note, our Application images will not be updated for 15.04 as they are always provided on Ubuntu LTS releases so the next major update will be with the 16.04 release. We regularly update these images to include the latest updates and patches for 14.04 LTS but major versions remain tied to LTS releases.

    by O.S Tezer
    In this DigitalOcean article, we aim to thoroughly introduce the reader to docker– one of the most exciting and powerful open-source projects to come to life in the recent years. Docker helps people with porting applications across systems and machines, running them securely in their own isolated environments.
  • Thanks @ryanpq - and thanks for the info about application images, too.
    I never realised the LTS were only every two years - I though .04 was always an LTS thing. BUt you're right, and I learn something every day!

    Sounds like I'll stick to what I was doing before - it works for me, seems secure enough, so why not!

    @thinkingmedia - I think you may have slightly mis-interpreted what I wrote, which was:

    memory around 80%, swap around 50% of 1GB.

    I probably didn't write it in a very clear way - I meant as two separate things.

    memory around 80% of 512Mb swap around 50% of 1GB.

    Just in case that's no clearer:
    Swap and RAM are different things - the swap file is a file on a disk, which can be any size.
    As the disk is 20Gb, I could have a swap file of 10Gb, although that would be ridiculous!

    But the RAM is still 512Mb. Hope that helps!

  • @jonathan okay that makes sense. I thought you had some old grandfather account that allowed for 1GB ram at $5. That would have been a good deal :)

1 Answer

“…where would you start, and why?”
Short answer: Spin up several servers, try a different combination each time. A server costs less than 1 cent per hour, and the meter stops when you destroy the droplet. If you like the foundation you built, save a snapshot and then use it to built subsequent droplets. You can give each snapshot a very long name to describe it fully.

I have 8 droplets running now, in various states of disrepair, for a grand total of $40 per month for a nice big digital playground. The point is this: if you are spending more than a few hours each week poking around on these things, go ahead and spin up a few droplets, and try different things on each, for less than what you spend on coffee. Build yourself a manual script or cheatsheet; I learned faster by experimenting and restarting. Don’t forget to take notes.

DigitalOcean is fine for production hosting, but it is first and foremost a developer-friendly site. Spin ‘em up, shut ‘em down, start over and over.

As to what to use now, on most droplets I run nginx and mariadb on debian, although my latest droplets are ubuntu. I am exploring 15.04 now, with the latest drupal 8 beta running on apache. I used Composer to install drush. I tried coreOS, but don’t think it adds anything for me. I stay away from the pre-packaged applications because I want to understand and participate in the detailed decisions. After that, building a new one from notes is very fast.

Practice makes perfect.

  • Hi Jones,

    That is a great answer for those of us learning how to build on Linux, thank you.

    I've already created a LAMP+Nginx droplet using ServerPilot and as I try to learn and to develop it (specifically, to incorporate Let's Encrypt SSL behind a free Cloudflare service) I am realizing that I need to remove ServerPilot and build everything myself. Otherwise I just don't know what is going on.

    ServerPilot has been very good but having it there makes learning the nuts and bolts a lot harder. So, I'm going to add some more Droplets and DIY. Thanks for the encouragement to practice and take notes. Cheers, Nick.

Have another answer? Share your knowledge.