Hacker News new | past | comments | ask | show | jobs | submit login
Ask YC: Best Linux distro to deploy as a Server
11 points by aitoehigie on May 23, 2008 | hide | past | favorite | 35 comments
I am about moving my web application (which has a reasonably high traffic) from a shared hosting package to my own hardware and i will like to know the best Linux Distro to use as my server. There is alot of talk of Ubuntu on the desktop but i dont know how well it performs as a server.

I've been using Linux on Servers and Desktop for almost 10 years now, and I still think that's a hard question to answer. On my desktop I use ubuntu, but I would definitely not use it on a server, it would require a hell of a lot of work to get it to be a decent server. Some years ago I used to install Red Hat on the servers, and if you are a beginer on Linux that's what I would advise, the Fedora Core. I usually install Gentoo on my servers, but if you don't have a steady Linux background that's probably not a good idea. When I say Gentoo I could be saying any other distro where you have full control of all the installation and administration process like slackware. As for Debian, I hear a lot of people praising it but each time I installed it on a server I finished regreting it as they have some weird pre-configurations and configuration files tree for some things and are very purists in others. As an example I could refer vi and apache. Vim as been around forever, and comes with pretty usable pre-configurations in most distros since at leas when I started using Linux but debian still comes with an unconfigured vi for default, not vim. Oposed to that, apache comes with some strange configurations and some strange directory structure and files for the configuration files.

What would be required to get Unbuntu to perform as a server in your mind? Removing X windows? Hardening? Why wouldn't you just perform a minimal install of Ubunut's LTS for example? That has X disabled and no open ports by default - that is an excellent start for a public-facing server.

More info here: http://www.ubuntu.com/products/whatisubuntu/serveredition/fe...

Further more, Fedora is a johnny-come-lately, created when Red Hat closed their once open linux version. While they claim that Fedora will always be free, one wonders how much Red Hat supports Fedora since it obviously competes with their product. I think a truly, permanently free distro is a much better choice.

Yes, not installing X windows would be one of those things. But not one of the main issues. Removing lots of stuff that is installed on a fresh system, configuring the services that the server will be running in, that intrincated "debian like" /etc, making shure no ubuntu specific configuration tool will destroy some configuration file edited by hand, etc...

About the LTS, I would like to remind you that it mean Long Time Support, not Long Time Server. As for the Fedora Core, I myself don't use it, but my previous experience with Red Hat lead me to believe it is easier for the Linux beginner than Debian.But you're probably right about that, Cento OS would probably be a better choice that a Fedora Core... but don't quote me on that cause my experience with Cent OS is almost null.

Any changes made by hand to a configuration file on a debian-like system are noted and respected by aptitude and apt-get, so your configuration files will not be over-written (unless you want them to.)

All services are "off" by default on the LTS server and debian tries to conform to the Linux Standards Base so what you find in /etc/ is most likely similar to other distros.

The Cent OS community is not anywhere near as large as the debian community, and when you add in commercial support from Canonical, that makes for a pretty good value for money when you chose Ubuntu.

I'm not talking about apt or any debian configuration tool, I'm speaking of those graphical configuration applications that come with ubuntu, some of them use specific files to overwrite default configuration files on boot, etc...

About the ease of configuration on /etc, I can tell you that I've lost a full day to try an make apache work with vhosts and mod_python on ubuntu because of the debian specific way of scatering the configuration files, I usually do this in 5 minutes on gentoo or on apache compiled by me using the official distributed tar packages. Even this last week I had do configure a qmail with vpopmail on a debian system and it was again a pain in the ass. Maybe I've been unluck with the services I've needed to run on a Debian, but as far as I can say, I would not advice Debian.

A big difference on more "low level" distros where the user contrlos everything, as gentoo or slackware to more "automated" ones, like Debian or Fedora Core are the services on by default. A "ps ax" after finishing a base installation on gentoo fits on a 80x25 screen, on a Debian/Fedora this could fit on two or more screens.

That is actually a good argument for running the same OS on the desktop as well as servers. Experience gained while configuring a development envrionment can be used towards maintaining a production server.

"... That has X disabled and no open ports by default ..."

A big plus. The downside is the CLI will now be your best friend. For those weened on GUIs, all that finding, typing and configuration can be a time sink. Also LTS runs on 64 bit systems and has commercial support (Long Term Support) ~ http://www.ubuntu.com/support/paid

"... i will like to know the best Linux Distro to use as my server ..."

The best Linux distro is probably a BSD variant.

Your OS choice for servers differs from desktops. Security, stability and available expertise is more important than ability to configure. The self compiled Linux distributions available for your desktop could expose your server to attack. You can read more here for reasons why ~ ftp://rtfm.mit.edu/pub/usenet/news.answers/unix-faq/faq/part6

  think of BSD as an older, more conservative 
  and stable OS than the "open-all-doors" Linux ...
You can use Linux, but it takes a bit more work to secure than BSD. For the simple reason Linux is younger, more open and therefore less secure than BSD variants (unless hardened with patches like SE) ~ http://networking.ringofsaturn.com/Unix/bsd.php OBSD and FreeBSD would be my choice. FreeBSD was also the choice of Viaweb. I suppose "Robert Morris" knows a thing or to about securing systems ~ http://www.paulgraham.com/vwfaq.html BSD OS's are safe, secure and have access to the source, support lots of hardware with caveats. Here is a quick choice guide ~ http://www.serverwatch.com/tutorials/article.phpr/10825_3393...

Of the Linux servers I'd stick with Debian variants which includes Ubuntu. Debian has their own way of doing things but it is stable, well understood. Maybe SE-Linux is worth a look ~ http://www.nsa.gov/selinux/ and http://en.wikipedia.org/wiki/Selinux

"... i will like to know the best Linux Distro to use as my server ..."

That also depends on what hardware you are using. Is it hosted, your own?? Check your hardware lists before you choose your OS.

debian is the "universal" operating system and runs on more hardware than any other linux distribution.

I love the *BSD UNIXes, but there are also "issues" there as well. The FreeBSD threading model does not work well with MySQL for example and you can see database problems there. I suspect Postgres on FreeBSD is more common and works rather well so you can go that route instead.

However, the original poster wanted info specifically about linux, and while a BSD UNIX is similar, there are enough differences that productivity at first might be diminished while one learns about the port system for packages as well as other differences.

I think it is a bit misleading to say that a distro like debian "opens all doors", that is not the case. And the recent OpenSSL problem not withstanding, debian is quite secure. In fact, the OpenSSL packaging issue shows that the debian security apparatus mostly works, and that the lessons learned are quickly being implemented. One must acknowledge however that this was a serious security problem on debian's side and in contrast OpenBSD has had _two_ exploits in _ten_ years. Those are some pretty sterling security credentials for OpenBSD.

"... However, the original poster wanted info specifically about linux, and while a BSD UNIX is similar, there are enough differences that productivity ..."

The poster also mentioned inexperience then requests a less secure server OS than what is possible. Productivity may indeed suffer. Would it be a better idea would be to get an experienced sys-admin to look over the server and secure it?

"... I think it is a bit misleading to say that a distro like debian "opens all doors", that is not the case ..."

Of all the distro's debian is probably the better of the bunch to work with. Debian can be secured. But the strength of Linux and debian, its openness is also its weakness. Default installed distributions still install more applications than you need. This can leave the potential of an unwanted application running to be exploited. Debian before Ubuntu was also the hardest to configure hardware.

"... One must acknowledge however that this was a serious security problem on debian's side and in contrast OpenBSD has had _two_ exploits in _ten_ years. Those are some pretty sterling security credentials for OpenBSD ..."

When it comes to security I'd take OBSD over any linux distro for the simple reason the source has been audited. It is secure by default (You have to actively install what you require ~ http://www.openbsd.org/security.html ). You will not be let down core applications with holes. Having said that I balk at upgrades.

"... The FreeBSD threading model does not work well with MySQL for example and you can see database problems there. I suspect Postgres on FreeBSD is more common and works rather well so you can go that route instead. ..."

Or dispense with RDBM's altogether?

PostgreSQL on FreeBSD does work great.

I've been using Ubuntu for a couple months on my server, and its been perfect (though its not too much traffic). I mainly used Ubuntu because thats what I have on my desktop, so I was comfortable with setup/installation/config/etc. If you use linux on your desktop, I'd stick with that, just because a production server isn't the best place to experiment. If you're new to Linux, Ubuntu is great to start with because theres lots more documentation for it than for other distros.

Not sure I agree with you there. Red Hat has gone a long way with their documentation - being a commercial linux distro requires solid documentation. So, to be fair, Red Hat probably has the best documentation. I have used debian / ubuntu for years and documentation can be quite spotty unfortunately.

CentOS works well for us. I like the idea of having a free version of a commercial distro (RHEL).

For our internal projects, we use CentOS. Externally we use a mixture of CentOS, FreeBSD boxes and one OpenBSD box.

I agree, with experience in this area (a lot of it): CentOS. Others are saying *BSD or Ubuntu or whatnot -- IMHO that's all because of politics or because of personal preference.

You want something that:

- is seasoned - is widely used - is aggressively updated - is guaranteed to be supported for years - is free

That's your CentOS. It's RHEL, of course. And CentOS has a foundation that gathers cash, so it's not just going to disappear one day.

I use Debian or Ubuntu (which is based on Debian anyway) since I prefer apt-get over the rpm tools for managing the system. But really, that's more preference than anything else. I've used Fedora and Red Hat before that for a long time.

They're all fairly similar and pretty much equally configurable as far as servers go. Just choose one, learn the tools you need, automate with shell scripts, and away you go :)

I find that the key for manageability is scripts. I have a repeatable mostly-automatic process for building new servers from a base install that I've been using and tweaking since my first server, now it handles everything from Apache and MySQL to iptables, backups over rsync+ssh, etc.

I've written about this at length in the past:


More recently, I'd say that Debian is still superior to Ubuntu on the server (the changes Ubuntu have made actually make it less comfortable on the server). But I tend to deploy CentOS 5.

But anything with a long life-cycle, good package management (yum or apt-get), and is popular enough to have lots of coverage on the web, will work fine.

Almost any of them can work well. If you are a competent admin and architect, you can make any distro work. But competent admins and architects generally already know several distros very well and wouldn't get much value from this discussion. So your real problem seems to be that you're worried that you don't have the proper skill set.

Basically: you're asking the wrong question. Either develop the expertise yourself, or hire someone who already knows this stuff and trust their judgement. Asking a bunch of internet yahoos for their opinion on a platform choice is just going to cause a flamewar (c.f. bootload's post above).

All that being said: I've had plenty of experience on Ubuntu and RHEL/CentOS and like them both. Debian is rougher but works once you know it well. Stay away from Gentoo except as a teaching tool. And *BSD and Solaris are also good choices if you have the staff buy-in (i.e. don't cause friction with your IT folks, let them use what they like).

There was a recent panel discussion at UC about MySQL, scaling up or out, I think there was a link on YC to a noteset, with some pretty big names. There was a round of questions about server specs. WRT OS, they all ran OpenSolaris or Linux (specifically RHEL, Fedora, Ubuntu, or SuSE)

I think this is the link that came over the wire http://www.paragon-cs.com/wordpress/2008/04/16/scaling-mysql...

but this seems to have the best aggregation of notesets from the panel, from tables to video and lists: http://www.technocation.org/content/panel-video%3A-scaling-m...

Ubuntu is mostly debian, and they even support a LTS (Long Term Support) version of their software. debian has more software packages (@18,000) than any other distro, so you would have any linux software you need right at your fingertips. Ubuntu comes with commercial support from Canonical if you should need that, but I think you will find lots of Ubuntuistas out there willing to help for free in the fora and such.

My personal preference is for debian, but if you are already familiar with Ubuntu, then use that for you web server since you will be able to use your already hard-won knowledege and Ubuntu performs admirably.

LTS is for long term support, meaning that they will provide help for it longer than the other releases. The most recent version, 8.04 is an LTS release. The previous LTS was 6.06.

Another vote for Debian or Ubuntu. I've been happy with both. Debian is more stable, but if you rely on a recent package (say if you keep your software in git), you then have build or install your own or rely on backports or other unofficial packages. Ubuntu Server is more up-to-date. (It goes without saying that your Ubuntu Server installation shouldn't have any X packages installed, and, by default, does not.)

With respect to Red Hat based distributions, I have always had more luck with apt and Debian packages than RPMs. It probably comes down to familiarity, so YMMV.

Debian or Cetnos. Debian is great for servers that you want to perform one or two specific tasks on, because you can install only what you need. Centos is great because it follows RedHat Enterprise Linux very closely and thus pretty much any packaged software out there can be installed relatively easily on it.

CentOS would be best.

Ubuntu server is pretty slick -- all the goodness of Debian with up-to-date packages.

The best Linux distro is probably a BSD variant.

Fail -- I'm a huge FreeBSD fan but did you consider that perhaps this app is written in Java, which to this day has second rate support in FreeBSD (largely due to Sun).

Ubuntu works great for me.

aptitude install foo baby

I learning that rhel or centos are the way to go.

I've had -remote- machines running debian, ubuntu, or fedora & all do not upgrade well at all remotely. Frankly, if your distro doesn't have a "foo upgrade" that works, run away!

I'd stick with what you're familiar with, otherwise you'll lose a lot of time relearning how to perform sysadmin tasks on the new system.

There is no best - but like others have said Debian or CentOS.

OpenBSD; it runs GNU/Linux binaries too.

My vote would go to Debian.

CentOS or Fedora Sulphur.

my servers are all setup as debian 4


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact