9
votes

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.

3
  • 2
    Sounds like a Superuser question to me. Oct 12, 2009 at 23:50
  • 4
    I never heard of a Linux distro generation gap before ! Jan 29, 2010 at 16:34
  • @duffbeer703 I think the question fits here pretty well if it is about deciding which server OS to use...
    – hurikhan77
    Mar 11, 2010 at 18:06

19 Answers 19

24
votes

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.

2
  • 4
    +1 Hear, hear! On the learning part, that is. If Gentoo is good for anything, it is learning about Linux!
    – wzzrd
    Oct 21, 2009 at 15:10
  • 5
    Essentially we are using Gentoo on our servers not only for performance reasons (because you can turn off features you don't use) but also because of its fluid upgrade system which needs only low maintenance (just time to compile, minimal invasive), instead of big and probably incompatible milestone upgrades from other distributions (and if you don't upgrade, you'll loose packaging support after a couple of years and need to migrate your data which can be a much greater hassle).
    – hurikhan77
    Mar 11, 2010 at 18:05
13
votes

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.

6
votes

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.

6
  • 2
    "It is Red Hat" is a plus in your book?!?
    – wfaulk
    Oct 12, 2009 at 23:25
  • 3
    Yeah, absolutely. It's one of the oldest, most stable and most supported server platforms around.
    – MDMarra
    Oct 13, 2009 at 0:45
  • 6
    cough Debian cough
    – Luke
    Oct 13, 2009 at 3:59
  • 3
    I didn't say Debian wasn't =). There is quite a bit of documentation for Debian also. When you are setting up your very first Linux server and ask for advice everyone's going to want to introduce their favorite distro. I suggested CentOS because there is documentation for basically doing everything on RHEL because it's industry standard. I didn't say "don't use Debian, use CentOS." I just recommended that OP takes a look at it.
    – MDMarra
    Oct 13, 2009 at 13:08
  • 1
    +1 Many commercial apps are setup to install on a Red Hat-like distribution. CentOS can just make your life a little bit easier.
    – Doug Luxem
    Oct 21, 2009 at 16:05
4
votes

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.

4
votes

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.

4
votes

2 comments here:

  1. 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?

  2. 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.

3
votes

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".

2
  • 1
    Arch Linux is a nice distro. Nice and lean with good performance. Oct 21, 2009 at 17:23
  • no USE flags for arch. the only benefit is it is rolling release. Apr 26, 2012 at 5:31
2
votes

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.)

1
vote

I used Gentoo for about two years and I dropped it in favor of Ubuntu, mainly because of the poorly written ebuilds. If you say you want a server, they you can try Gentoo, especially if you have experience with Linux. For desktop or if you're not so experienced, stick with Ubuntu.

1
vote

Gentoo is a great option because you will be able to really control what's going on. Certainly, you can do that with every distribution, but Gentoo's tools make it painless. Besides, hardening the distro and making it secure it also quite painless.

0
votes

I might start with Ubuntu, if it's your first time. Gentoo is a perfectly respectable mainstream distro though, as are SuSe, and Fedora.

0
votes

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.).

0
votes

Gentoo has nice docs, and when you know what your are doing, looks like it can be very nifty. But since you usually want a server to work, I'd stick to something you are more comfortable with, perhaps Ubuntu Server?

0
votes

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.

1
  • c'mon, you can do better than "trust me, I know from experience"
    – Ophidian
    Jul 29, 2010 at 13:24
0
votes

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.

0
votes

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.

2
  • 1
    You can use "glsa-check -f affected" to emerge security updates with minimal impact (thus not starting a huge bumped version avalanche). It worked very well for me since years. I even put a cron to print reports of "glsa-check -l affected" into my login motto.
    – hurikhan77
    Mar 11, 2010 at 18:13
  • Yeah I used that facility for a few years as well and it works well for what it does. But it still bumps versions in order to fix security issues. Mar 11, 2010 at 19:14
0
votes

I won't repeat what has been said already (all excellent points by the way) and I'll just add this - gentoo is a good system for test server. It allows you to easily customize your system in exactly the way you want (and compile times are not an issue).

0
votes

I would suggest Ubuntu for now for it's simplicity... however in the future I fully recommend trying Gentoo out just for the experience you'll receive in installing, configuring, troubleshooting linux. It's a great OS and you'll learn a ton.

0
votes

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .