Ask YC: Best Linux distro to deploy as a Server
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.
35 comments
[ 3.5 ms ] story [ 183 ms ] threadThey'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.
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
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.
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.
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?
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.
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.
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.
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.
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
aptitude install foo baby
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.
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.
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...
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!
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).
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.
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).
http://www.obsceneart.com/?p=30
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.