I'm working on getting my first server up and running and my dad is trying to convince me that Gentoo is the way to go. Is it worth the compile? I was just planning on using Ubuntu.
The answer really depends on your objective.
gentoo is not worth the effort if you want to get a server up quickly and easily or think that you will get noticeably better performance. Other distributions (ubuntu, RHEL, CentOS) are easier to set up and operate. I do not believe the typical user will notice much of a performance benefit from controlling the compile flags.
gentoo is worth the effort if you want to learn how Linux works below the surface. I learned more from using gentoo for a couple of years than all the many years of using other distros. There are many things to configure and tinker with when using gentoo that make it a lot of fun to use and a good learning experience.
The reason to use Gentoo is so that you can install packages with the features you want.
What I mean by this is: if you get a RedHat/CentOS/Debian/Ubuntu package for, say, Apache, you're going to get the features that they decided that you needed. If you want an additional feature, your only recourse is to download the source and compile. There's nothing inherently wrong with that, but it can be a pain. For one thing, you're used to just typing "yum install apache" or whatever. For another, now you have an application that exists outside your package management tools.
On the other hand, if you have Gentoo, you can define in your emerge configuration files the sorts of features that you want, and you're compiling it anyway; it's just automated. And if there's no flag to enable what you want, it's relatively trivial to modify the ebuild. This way you can use Gentoo's package management even when you want options that no one else considered building into the package.
There are minor performance improvements involved with compiling only what you want, but they really are minor, and this notion is used as a red herring to dissuade people from using Gentoo.
All that said, it is complicated, you will learn a lot (though not as much as from Linux From Scratch), and it may be total overkill for what you want. If it is, I would go with Ubuntu in a heartbeat, and stay away from RedHat/CentOS where possible. (I find the RedHat system configuration style to be difficult to work with from both an administration and a WTF-were-they-thinking point of view, and I find that it's much easier to find up-to-date packages for Ubuntu than any of the others.)
If you do want a learning experience, there's nothing like the trial-by-fire of installing a production server that you know nothing about, but if you're interested in a less stressful learning experience, try Linux From Scratch on a virtual machine.)
Also, your dad is the man. I'm sure my dad would be trying to convince me to downgrade to Windows 95. Heck, probably a chalkboard.
For a server I would recommend CentOS. It is Red Hat without the support or trademarked logos, but line for line the binaries are identical. The amount of documentation available for a Red Hat server is far greater than for any other distro. At the very least it is worth a look.
To a Linux beginner, Gentoo may be overwhelming. I'd recommend getting your feet wet with a pre-packaged distro.
It all basically comes down to personal preference. Linux distributions are sort of like cars. All of them will get you to where you want to go, it's just that individually they look different, have different feels to them, and that some may require more maintenance than others. If it is your first go around, I would use Ubuntu. That being said, don't hesitate to check other distributions out.
I'm running Gentoo for their "Hardened" profile. I would say it's worth it. all sorts of nasty shellcode fails without executing the payload. not to mention, mandatory access controls rule.
I still run Debian on my servers but only because I haven't taken the time to set up a Gentoo binary mirror and roll my own distro.
2 comments here:
You said it's a server - Ubuntu is a great linux distro, but it's targeted at the desktop user. It's linux, and will do all the server stuff you want, but, first and foremost, it's for users. That said, unless you have a reason to run a server, why are you going to?
The compiling in Gentoo sucks. However, the package management is really some of the best around. Being able to customise a lot is great - right down to the USE flags - picking all the libraries you want, compiling in the support you want, etc. And you will learn a lot in the process. Using Gentoo because you want it faster, etc, that's a waste of time. You're not going to be able to see any performance increase, or measure it, in real terms.
In addition, I found that Gentoo has really really good docs, and great support forums/community. Gentoo scales well, better than any other distro, from simply following the docs as a newbie, to customising every aspect as a power-user. What you get out of it is very much what you want to.
First and foremost I'd suggest that you take a long, hard look at what you want from this machine, and then decide. CentOS is also a great choice that sits half-way between the two. It has a very usable desktop, but the server side is easily accessible with some nice tools.
If you want something like Gentoo but without all the tedious compilation, I'd really recommend Arch Linux, it's similar in that when you first install it you essentially get not very much, but it's got a quite clever package manager (Pacman) and an interesting set of packages available in their third party repository the "AUR".
A lot of the other answers are on the right track. A large part of the choice comes down to personal preference. I like Gentoo because I'm comfortable with the admin tools, the package management interface, and all the little things (like where they put certain config files, etc, when compared to other distros.) I would be a bit wary of recommending it as a "first distro", but then again, I feel that if you don't try it now, you never will, because you'll have something else that you've built familiarity with -- so later down the line, when you have less time to mess around and just need a server to work, you'll go with what you know.
So, my input would be: consider why you need this server. If it's a personal project, and you can afford the time to tweak around with it until you're happy, Gentoo has the capability to give you a finely tuned machine (and I don't mean in terms of compile flags/optimizations, either -- I mean that it has everything you want, and nothing you don't need.) On the other hand, if it's for a professional project where you need something that just works and can't spend too much time on it, something else might be a better choice.
(Personally, I go with Gentoo whenever I have the option, but that's just me.)
I really like Gentoo because I do enjoy compiling my own software. I enjoy having the control over what features are compiled in and for your certain systems there are compiler flags that can have an appreciable effect on performance. I also prefer compiling some things with the Intel C++ Compiler as I run with Intel Processors, which gives another appreciable effect on performance.
It all comes down to preference. I like having a Gentoo level of control over my system. You might not. A stage 3 Gentoo install has mostly pre-compiled components, so not much needs compiling (other than X/KDE/Gnome, etc.).
If you're planning on hosting any sort of shell environment on there (a shell environment beyond web hosting and such, that is) then don't go with Gentoo. USE flags make being a non-root user on a Gentoo system a pain; trust me, I know from experience.
But if you just plan on hosting a website and maybe a few other servers, Gentoo should be fine. Actually, if you're only hosting sites off of it I advise you to pick Gentoo.
Simple answer: NO
Don't get me wrong, I love Gentoo and run it myself as my server and desktop. You mentioned "my first server". Based on that statement alone, I would direct you to go with an easy to use OS first, and when you get comfortable with it, then take the Gentoo plunge. Gentoo is fantastic when you are ready to really learn Linux.
I'd vote Debian (or Ubuntu) just for simplicity.
I agree with the consensus here...for a first server Gentoo is probably not a good choice. But I'll echo the fact that Gentoo is a great distro to force you to learn the in's and out's of how Linux works.
Now to my point. Since no one has mentioned this yet so I'll add this to the list of why I moved away from Gentoo for Production Server use.
I started out with Gentoo pretty early on back in 2003 and ran it for years on desktops and servers before deciding to move to Ubuntu and CentOS. This is the main issue I had with Gentoo.
Their answer to security updates is to bump you to the newest upstream version of the project. This is not always a good solution in a production environment. Especially if the new version has known issues which prevent you from being able to update. As a result you may find yourself in a situation where your server is vulnerable to a known exploit which you can't fix easily. Sure you could alway write your own ebuild for a patched version of the old version but that's not really an ideal situation either.
Now I do miss some of the control you had with Gentoo but at the end of the day, for me, that control isn't worth the time and effort required.
One thing that people always mention about Gentoo is the performance and flexibility that you supposedly get from compiling your own software. This is more a perk of compiling software from scratch and not necessarily a perk of Gentoo. In fact, Portage, Gentoo's package management software is more than capable of installing pre-compiled binary packages. It's just that there really aren't any pre-compiled binaries in Gentoo's official package repository.
For instance, Sabayon is a Linux distro that is based off of Gentoo which has a large pre-compiled repository which you can install using it's custom package manager (which still uses Portage as a backend), but it probably isn't the best choice for a server.
The point is that Portage is extremely flexible and allows you to very seamlessly install packages from source (including Git repos) and you can set it up to use pre-compiled packages as well. However, this would require you to find a good source for the packages (since there are only a couple in the Portage repository by default), read the documentation to configure it, etc. which probably would require more time than you have.