Debian vs CentOS for a server

June 10, 2013 84.7k views
Hi everyone, I wanted to ask about the pros and cons of Debian vs. CentOS for a server. I've been using shared hosting for years, but I've finally been pushed to a VPS for the first time. So for the first time I need to make some decisions about a server OS. I've been using Linux for many years on the desktop, and I'm most familiar with Debian and openSUSE in that context. But I have no idea what to look for in a good server. In my research, it's obvious that CentOS receives support for a much longer time than Debian, and it comes from the wildly successful RHEL. But Debian is also a very serious distribution with a huge community and package repository. But I'm not sure if the relatively short 3 or 4 year support cycle is long enough for me. And for general administration and ease of maintenance and of course stability and security, what have your experiences been? Thanks a lot!
  • on DigitalOCean, CentOS does not support quota. The best flavor is Debian if you are in DigitalOcean.

  • I am just going to be honest and give me opinion and what I have experienced myself. I have used RedHat 6.6 Enterprize, CentOS 6.6 and 7 at work a lot to design out Ruby On Rails architecture. Then at home I use Ubuntu server 14.04 Long term support as a server and use Ubuntu and Kubuntu as a Desktop computer.

    RedHat Enterprise 6.6

    Because of its slow update I can not use it for developing my app. I use "capibara" gem and other gems that requires library that is at-least 1 year old. Unfortunately RHLE has packages that are beyond a year old. If you are thinking about getting the latest and compiling from source then stop, you are looking at massive compile which will affect the integrity of the OS. Just compiling one Q.T takes more then an hour times n servers times x packages. If the RPM of those packages already existed then I won't be talking about it.

    Ruby 1.9.3 is now deprecated and RHLE 6.6 only supports 1.8 which has dies years ago. RHLE says they support it but the creator of Ruby says other wise. Sure you can compile and install the latest Ruby 2.2.2 but then again doing to you loose the support from RHLE and not to mention limitations of gems installation.

    At home I have an old BioStar mother board and RHLE refuses to detect the hard ware properly and the kernel panics at boot.

    CentOS 6.6

    Now CentOS is a little better in terms of EPEL repo that has more packages but then again it still comes with Ruby 1.8 and does not detect my home server hard ware.
    The yum repository is much better and improved then RHLE for example try this command in both
    yum -y groupinstall "Development Tools"
    this command is critical for developers and works on all however not in RHLE and other bunch of commands like these.

    Ubuntu Server 14.04

    Detects all my home hardware fully such as my server, Zen Book laptop, INTEL Nuc mini PC, Rasberry PI (ARM). You can get paid support from Canonical where they will support your compiled from source Ruby 2.2.2 and other 3rd application such as docker, puppet, chef, mysql (and MariaDB), visualization (Qemu, Libvirt + vagrant) and many more. The Ubuntu server comes with recent libraries that were tested by Canonical (who is also working with IBM and Docker). I can now install all my gems and they just work fine.

    CentOS 7

    I am not going to talk about CentOS 7 because it went through massive changes such as iptables is replaced by firewall-cmd, service commands and much more which takes time for me to play with and learn. It is worth taking a look in to since it may have the latest libs which I talked about, so far I know CentOS 7 and RHLE 7 comes with Ruby 2 as base install which is a plus.

    Final Thought

    I like the security of Ubuntu (AppArmor) which is automated and very intelligent v.s. CentOS and RHLE (SELinux) which is complex and is not automated and any none standard configuration requires you to set the security. You can read all about it here

    As a developer I use standard Rails programming which is OS independent which means you can take my code and run it on Mac, Linux and Windows, however best practice forces me to keep the development and production operating system same, this way you can see the problems ahead and be more compatible.

    I say you stick with Debain because you don't want to learn about SELinux permissions (hard to find some docs on none standard things). You don't want to end up with old deprecated packages which your applications may not work with. You don't want to use older web server like Nginx 1.6 where 1.8 is the latest stable with lots of security patches (sorry apache2 is dead C10K problem this is 2015 please wake up). You don't want to deal with "autorelabel" every time you add a new hard drive which requires you to take down your server for a reboot. Debain security patches security almost every day such as openSSL venerability as soon as it is found which take RHLE weeks or months. If you register to debain security email then you will see details in email almost every day.

    Well I am not writing a book so I will stop for now. I hope this helps. I know some fan RHLE will prove me wrong other wise but that is what open is all about.

8 Answers
I recommend you go with Debian as you're already familiar with it. I personally use Ubuntu Server which is based on Debian.

There isn't really a better distribution - each distribution has its pros and cons ;)

To be honest, the reason I made an account on Digital Ocean, is to play around with CentOs and learn how to manage my dedicated server because I pay a lot for a company to manage it for me and I want to be able to do it myself.

But after I tried Centos 6.5 and Centos 7, I will drop my droplet for one more time and I will try Debian.

I always thought CentOs was the best for web servers, but after I played with CentOs I found out that is too complicated and too outdated.

I have LinuxMint on my laptop and LinuxMint and Ubuntu is based on Debian. I will give Debian a try.

The ONLY problem I can see about this, is the CPanel is ONLY working with Centos and not with Debian but there are other options for example Plesk etc.

I'll try Debian and if I will be satisfy with it, then I will stick with it.

I prefer to managed my dedicated server 100% on my own using Debian, than manage it 80% on my own using Centos.

I came to Digital Ocean to use and test various OS for servers. So far I am NOT satisfy with Centos. I will try Debian.

Now, let me give you an advice: the BEST Os for your web server will be the Os YOU will know better and you can handle with it. In my case I gave up with Centos, I will try Debian ,I am using LinuxMint every day so I wont have problem with Debian.

On the Internet you will find many people to suggest the best one is Centos, other will suggest best one is Debian, others will suggest Ubuntu as a server etc etc. You will NEVER know for you if you don't use those Os and play with them, test them etc etc etc.

CentOS is going to be slow on adding the latest versions of all packages into its RPM, this is because its considered to be a more stable distro overall. So they aren't looking to push the latest, but instead focus on what is considered stable and tested.

Debian is great to play with if you are already familiar with it, but in terms of which distro is receiving the latest packages fastest you should check out Ubuntu.

Overall I would say just play with each distro, set some tasks for yourself, like perhaps get a Rails stack up in each one and see what hurdles you run into. That will give you a better personal sense of which distro you like and why.
I'm a huge fan of Debian on the server. Wheezy plus Dotdeb makes for an awesome LEMP stack.
When it comes to documentation, nothing beats CentOS. If you need tutorials/guides for something, you're almost sure to find it for CentOS and not always for Debain. But debian is simpler in terms of configuration files, especially since you're used to ubuntu.
  • Documentation is improving time by time. This argument will be invalid in the next few years.

Some people outthere say it's more stable and more predictable with CentOS

but I think they talk about RedHat, i'll choose to implement Oracle Linux for the maintenance, the possible pro support and their ksplice.

I love Debian, but they are slow to patch and move forward. Instead i'll choose Ubuntu for their predictability and their possible support too.

others sources might help to take a decision :

anyone have a comparison of use RAM DEBIAN 8, UBUNTU 14, CENT OS 6/7 thankyou.

If it’s a VPS for enterprise, and you expect the enterprise to grow (even slowly), go for CentOS. You can switch to RHEL when you can afford it, and they provide true enterprise-level support. They even handle the transition for you. You have 10 years (lifetime of a CentOS release) to prepare for the switch.

If it’s your own VPS, or it’s for a non-profit organization, then go for Debian. You need to upgrade every 2 or 3 years, but it is not very painful (according to this blog). Upgrading Debian through SSH should not be risky. Debian is stable enough for free distributions, and I uses it in my VPS.

Have another answer? Share your knowledge.