# Which Linux distro for production server?

**URL:** https://meta.discourse.org/t/which-linux-distro-for-production-server/31059
**Category:** Self-hosting
**Tags:** hosting
**Created:** [July 15, 2015, 12:13am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059 "2015-07-15T00:13:07Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [July 15, 2015, 12:13am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/1 "2015-07-15T00:13:07Z")

</div>

I’m considering the following:

- CentOS 7.1
- Debian 8.1
- Ubuntu 14.04

I’ve used CentOS for quite a few years and have always been extremely happy with how solid and reliable it has been. However of late, I’ve felt that it’s (or at least my version 6.6) lagging in terms of latest software. So am thinking about reformatting the server with a new OS.

Which of the three do you recommend and if possible, why?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [July 15, 2015, 1:34am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/2 "2015-07-15T01:34:36Z")

</div>

CentOS needed to be version 7+ to run Docker, so if you’re trying to move off of an install running on 6.6 I’d suggest you try CentOS 7.1 first, because CentOS is what your organization knows (if that’s true; if it’s not true, disregard this whole sentence).

If you are okay with changing the disto to debian-based, I’m going to suggest Ubuntu LTS because that’s what most Discourse installs are on.

---

<div class="post-metadata">

### Author: ![erlend\_sh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlend_sh/32/119475_2.png) [@erlend\_sh](https://meta.discourse.org/u/erlend_sh)
#### Post date: [July 15, 2015, 9:03am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/3 "2015-07-15T09:03:02Z")

</div>

Like riking says, Ubuntu LTS x64 is the default, so unless you have **very** strong reasons to do otherwise, I’d follow that recommendation.

There are many side projects that can give you an excuse to toy around with exciting new platforms, but I don’t think Discourse - a (ideally) always-on community engine - is it.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 15, 2015, 9:13am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/4 "2015-07-15T09:13:09Z")

</div>

I would like to add an anti-Debian vote. Super conservative distro, ancient versions of everything. Not a fan.

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [July 15, 2015, 9:22am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/5 "2015-07-15T09:22:05Z")

</div>

Thanks all.

I should mention there are other non-Discourse sites on the server too, hence not automatically choosing Ubuntu.

I’m leaning towards CentOS 7 as it’s what I know and all the years we’ve been using CentOS it has been rock solid. I am a little concerned about Ubuntu as I keep hearing negative remarks about it (using more cpu/resources, security, bugs, etc). Most people I talk to in dedicated server hosting generally tend to recommend CentOS.

However I am still open to Ubuntu - particularly as the Discourse team (and other smart people like DHH/Basecamp) use it, making me think it can’t be that bad then!

---

<div class="post-metadata">

### Author: ![mac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mac/32/42876_2.png) [@mac](https://meta.discourse.org/u/mac)
#### Post date: [July 15, 2015, 10:12am UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/6 "2015-07-15T10:12:15Z")

</div>

If you are looking at running openstack, ubuntu is a good choice. If you are fond of the Red Hat manner of doing things, Fedora 22 is a good choice. That they just reworked their package management system to **dnf** as opposed to yum is annoying. I like Linux, almost any of them. The only “caveat” is package management and the freshness of their respective repos. Centos sort of puts me in mind of Debian, unless you tie it into a bunch of current repos and mess with setting priorities. Fedora obviously stays ahead of the pack but now you have to issue dnf instead of yum to work with software installs. That said, I agree with @codinghorror in that Debian ships with versions that are already out of date before you even get it installed.

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [July 15, 2015, 12:32pm UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/7 "2015-07-15T12:32:35Z")

</div>

Just taken out a new server to play with (and to transfer the sites onto before reformatting the old one and transferring them back to it).

First impressions of Ubuntu not good, tried to set the hostname with `hostnamectl set-hostname` but got some odd results:

```plaintext
root@rock ~ # hostnamectl set-hostname rock.newserver.com
root@rock ~ # dnsdomainname
dnsdomainname: Name or service not known
root@rock ~ # hostname -f
hostname: Name or service not known
root@rock ~ # uname -n
rock.newserver.com

```

However I’ll persevere for now..

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [July 15, 2015, 3:43pm UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/8 "2015-07-15T15:43:39Z")

</div>

Looks to me like `hostnamectl` updates `/etc/hostname` and sends a D-Bus signal. `hostnamectl --static` should equal `hostname`. According to the manpage, `hostname -f` == `hostname --fqdn` == `dnshostname`.

```
   The FQDN (Fully Qualified Domain Name) of the system is the name that the resolver(3)
   returns for the host name, such as, ursula.example.com. It is usually the hostname
   followed by the DNS domain name (the part after the first dot). You can check the
   FQDN using hostname --fqdn or the domain name using dnsdomainname.

   The recommended method of setting the FQDN is to make the hostname be an alias for
   the fully qualified name using /etc/hosts, DNS, or NIS. For example, if the hostname
   was "ursula", one might have a line in /etc/hosts which reads

          127.0.1.1 ursula.example.com ursula

```

I guess you want to put a record like that in /etc/hosts?

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [July 15, 2015, 4:18pm UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/9 "2015-07-15T16:18:32Z")

</div>

Yeah I wiped it and started again, and manually added to:

> /etc/hosts  
> /etc/hostname

---

<div class="post-metadata">

### Author: ![AstonJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astonj/32/215041_2.png) [@AstonJ](https://meta.discourse.org/u/AstonJ)
#### Post date: [July 28, 2015, 10:09pm UTC](https://meta.discourse.org/t/which-linux-distro-for-production-server/31059/10 "2015-07-28T22:09:47Z")

</div>

Just a quick update to this thread - I ended up going with CentOS 7 as it just felt right to me.

They take a little getting used to, but I really like `systemctl` and FirewallD which was actually a breeze to set up (never really got my head around iptables). I am no longer having problems with Docker dropping connection to the internet now either 🙂
