Join 3,564 readers in helping fund MetaFilter (Hide)


Best distrubution for Linux VPS?
November 22, 2011 4:58 AM   Subscribe

I run a couple of django-based websites/webapps. What OS should I use for my VPS? The most important thing is security and easy installation of packages (including dependencies). I also prefer a system that is easy to maintain. Security is more important, but if all else is equal I would specifically love something with easy to make init-scripts. I know I can install third party packages to do just about anything, but I prefer a batteries-included approach if it exists.

Currently I use CentOS. It's okay, but I am not in love with it and changing VPS providers seems an opportunity to re-evaluate my choice of OS. I remember that it was difficult to upgrade python on my old Centos distrubtion, but that was years ago already. I am now playing with Ubuntu 10.04 at another VPS provider and that seems to work fine, but I noticed that many packages (like pip) are very out of date already. I'd guess that Ubuntu 11 has more up to date packages, but I like the Long Term Support of 10.04. On the other hand, I also see a significant advantage in being able to use the default packages that come with a distribution and that are automatically upgraded with security patches etc. I see that Debian has a backports repository that looks like it could be useful in this regard but I don't know how well that works in practice for the packages I need.

My new VPS provider offers a choice between CentOS (5 or 6), Ubuntu (10.04 LTS or 11) and Debian (5 or 6). I don't need many fancy things like control panels. Currently I need python 2.6 or 2.7, django, celery and rabbitmq and apache2 with mod_wsgi (I might change that to nginx/uwsgi at some point). I currently use postgresql, but want to try sqlite on the new server because I think it's enough. Still, if I do need a "real" database it will be postgres, but I wouldn't need the latest version. I would like information/opinions on what is the best of these for my situation when it comes to security and ease of installing/upgrading packages and system maintenance.
posted by davar to Computers & Internet (10 answers total) 3 users marked this as a favorite
 
If you don't mind the learning curve of another *nix, OpenBSD would be you absolute best bet for security (as well network performance). BSDs can also handle many Linux binaries via ports, but there is a lot to take in before making the decision as it is a different platform/kernel. If you have a spare computer or virtual, I'd definitely recommend giving it a try. There's also FreeBSD which has a decent software library and community support. As far as startup scripts, BSDs won't have System V-style runlevels out of the box like Linux. In some ways that can be a good thing as it's a simpler layout. In some ways that can be a bad thing as it's a simpler layout. ymmv.
posted by samsara at 5:26 AM on November 22, 2011


I moved from Cent to Ubuntu, found way more packages and community support.
posted by Blake at 5:51 AM on November 22, 2011 [1 favorite]


I started being a Linux user with Debian (Sarge?) where I feel in love with the package management. I now run Ubuntu and Debian. The Ubuntu community is huge, though a lot of the knowledge there is just as applicable to Debian. I tinkered with BSD (the security is what always kept me interested), but never felt the need to move from my deb-based distros to any BSD flavor.
posted by Brian Puccio at 7:25 AM on November 22, 2011


If you're set on having the ultimate flexibility that a VPS gives you, then ignore what I'm about to say. But if the main concerns with a VPS setup tend to be concerns like ease of security and package management, are you sure you want to be the sysadmin? Instead of considering the OS, you might want to consider a hosting service that gives you a lot of latitude in what you build, install, and run -- WebFaction is one such host that supports WSGI, so you'd be good to go with your django apps.
posted by weston at 8:26 AM on November 22, 2011 [1 favorite]


I'm with Blake, when in doubt on security issues, I don't try to be an expert. My default for anything security related is to go with the most common, high profile, active community package available, and right now that seems to be Ubuntu. When I first used a VPS I used Slicehost and it had a lot of very comprehensive articles on how to lock down an Ubuntu slice. There's info all over the web on how to do this, so that's the way I'd go.
posted by bitdamaged at 8:37 AM on November 22, 2011


Thanks for your answers! At the moment I do want a Linux distro, I want to spend as less time sysadminning as possible and learning a new OS is not high on my priority list for now.
I have actually looked into WebFaction, that seems ideal to me but I think that the 240MB max user-memory may not be enough. I also looked into other managed solutions (here are a bunch of Django specific ones) but they were either too complicated, too expensive, or still in beta so I decided to stick with the VPS for now.
posted by davar at 9:12 AM on November 22, 2011


As far as your main platform I'd then have to 'nth those recommending Ubuntu. It's our distro of choice where I work too, as a lot of thought has been put into it by its maintainers to make it one of the easiest linux distros to manage out there. Normally we'll stick with the LTS versions unless there's a pressing need to go bleeding edge. Ubuntu Server 10.04 LTS is the most current stable version available at the moment. The next will be 12.04.
posted by samsara at 9:44 AM on November 22, 2011


I've run all 3 of your proposed OSes before (though in different roles, so take my advice with a pinch of salt).

CentOS - I don't really like them. I used to run a CentOS-powered web hosting server. It wasn't exactly a nightmare, but updates weren't as frequent as I'd have liked, especially security updates. They seem to lag Red Hat by quite a fair bit, so you might be running a out-of-date distribution. The last time I ran a RPM-based distro like CentOS was 4 years ago, so things may have changed since then, but I will always remember the dependency-hell that I went through. So all in all, not too fond of CentOS...

Ubuntu - relatively easy to set up, and because of its popularity, it has a huge user-base (and therefore, support). But I don't like what Ubuntu stands for (in terms of contributing back to the main code base), but that's philosophical rather than technical. I've got no problems with them technically - deb-based distributions are able to handle dependencies much more gracefully, I feel. If you're going to use Ubuntu, stick with their LTS (long-term support) releases, which have a longer release cycle and support cycle, meaning that you aren't forced to upgrade to the latest and greatest each time.

Debian - my all-round favourite OS. I use this for nearly everything - file server, hosting server, laptop etc. I like that it is deb-based, and that I have a choice of a rolling distribution, or a fixed distribution. The difference is that with a rolling distribution, I get updates forever (I just pick the 'branch' that I want, e.g. stable, testing or unstable). With the latter, I pick the distribution (Debian 5 or 6) and run with it until it's time to upgrade. Depending on how you want to set things up you might pick different methods (by the way, although your VPS provider says Debian 5 or 6, that refers to the install, but after installation you can choose whether you want a rolling distribution or a fixed distribution by changing the sources).

HTH.
posted by titantoppler at 9:51 AM on November 22, 2011


I run a few VPS with django apps (uwsgi/nginx/postgres/redis). All off Ubuntu.

My advice... it doesn't really matter what you use. Script it all. Even better take a little bit of time (eg. a week and Vagrant) and learn Chef or Puppet with Fabric. I can deploy in one command to a brand new box. Fabric to throw up the chef-solo script and then it runs chef. It's really amazing.
posted by i_am_a_Jedi at 8:27 PM on November 22, 2011


Thanks again! The consensus seems to be that either Debian or Ubuntu is the way to go. I decided to try Debian for a few days and then see if I like it better than Ubuntu. Will be moving away from CentOS in any case.

Any links to good documentation or even book recommendations are welcome, should anyone still read this. I have the impression that years ago when I installed my first VPS it was a lot easier to find good documentation. Now information often seems to be buried between forum and blog posts of varying quality.
posted by davar at 5:04 AM on November 24, 2011


« Older Please help me find a job that...   |  In your field, what's known to... Newer »
This thread is closed to new comments.