LWN.net Logo

Gentoo for All the Unusual Reasons (Linux Journal)

Andrew Cowie writes about Gentoo Linux on production systems, on Linux Journal. "I have a confession to make. I use Gentoo Linux. My colleagues at the various Linux User Group meetings I attend think I'm nuts. Everyone knows that Gentoo is a source-based Linux distribution. Gentoo's reputation (in large measure pushed by the people who develop the distribution) is that it's for people who want super crazy optimizations, and it really is suitable only for those who use desktops. In truth, Gentoo is ideal for a whole bunch of other, unexpected, reasons. Much to my surprise, people actually are using Gentoo in production environments for these very reasons."
(Log in to post comments)

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 0:43 UTC (Sat) by a9db0 (subscriber, #2181) [Link]

I've been using Gentoo on my web server and my firewall for over two years. Easy to admin, quick responses to security issues, optimizable (important on a PII400 and P90) and surprisingly slender.

That said, my desktop runs the Debian-based distro Mepis.

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 4:47 UTC (Sat) by huffd (guest, #10382) [Link]

Every puffin on our farm is clustered with OpenMosix (gigbit networked) running on Gentoo, half being production web servers, since March 2003. Once installed automatic updates keep them current on daily basis, there is no versioning to be concerned about. Compiles are done off peak times using ccache, distcc and OpenMosix while production batch jobs are running with minimal impact. There have not been any software stability issues, -it just works.

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 5:52 UTC (Sat) by freeid (guest, #22401) [Link]

We have been using 5 gentoo server in production (for 3 years). 2 dns servers. One server for file transfers. And the last 2 are running VMWARE GSX runs better than redhat. All 2.6 kernel now.

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 8:43 UTC (Sat) by gvy (guest, #11981) [Link]

> No problem-issue the instruction, and a little while later, it's installed.
> It's the same user experience as with Debian.

When this guy tells about "a little while" with e.g. KDE next time he'd better put X-Ears: Red in the message.

I'd also argue that having a compiler (and dev environment) on production systems not being build servers or development workstations is still of some convenience to an intruder, and counterargument of being able to prepare deployable packages doesn't hold since nothing is gained by gentooist here compared to usual packaged distros.

And when talking of "non-packaged software" -- hey the only *reasonable* newbie approach is to *choose* the rich distro and stick with it, and major distros are rich enough these days. Otherwise it's no real difference -- Software-Building HOWTO, pakman-specific documentation and a lot of wasted time before the results can be actually useful and shared.

I respect Gentoo for rapid sec updates and decent documentation but dislike for the hype: building on that leads to much counfusion around neophites churning out harsh words like "ideal" until they gain experience. ;-]

Otherwise, good luck to all of us in running our production without a glitch on whatever distro and having *proper* fun with development throughout this year ;-)

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 15:45 UTC (Sat) by Klavs (subscriber, #10563) [Link]

>I'd also argue that having a compiler (and dev environment) on production
>systems not being build servers or development workstations is still of
>some convenience to an intruder, and counterargument of being able to
>prepare deployable packages doesn't hold since nothing is gained by
>gentooist here compared to usual packaged distros.

thats not true. with Gentoo it's VERY easy to setup your own package repository (and tree - or just deploy fitting /etc/portage/package.* files) to easily choose what gets updated to what versions - and since you have a buildhost you don't have ANY dev tools on the servers, but still get to choose EXACTLY what packages and versions you want on your servers, without any fuzz.
In short, by having a buildhost (or a build-cluster) you get a unified environment - but at your choosing - not some distro-devs (except for missing backports of security-fixes - so you have to be ready to follow the latest versions of the "important" programs :)

Just wanted to add my 5 cents :)

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 18:20 UTC (Sat) by gvy (guest, #11981) [Link]

Did you read the quote up to "counterargument"? :-)

Funny but some people (or even communities) manage to be 100% predictable. :-)

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 9, 2005 11:12 UTC (Sun) by farnz (subscriber, #17727) [Link]

You missed part of the point then; preparing or updating an ebuild for Gentoo is easier for a non-maintainer than doing the same with an RPM or a DEB. Setting up an internal package repository from which binary packages are installed is also easier than setting up something like an apt repository.

Further, features like USE flags can reduce the number of custom ebuilds you want compared to the number of custom DEBs or RPMs, if you want many customised packages.

In short, if a distribution has all the packages you want, compiled with suitable compile time options, Gentoo gains you nothing, and costs in compile time on your build system. As the number of custom packages increases, the gain from Gentoo increases compared to other distros, until it is worthwhile.

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 11, 2005 10:17 UTC (Tue) by ranger (guest, #6415) [Link]

You missed part of the point then; preparing or updating an ebuild for Gentoo is easier for a non-maintainer than doing the same with an RPM or a DEB.

Assuming said person has learnt ebuilds, and not rpm or dpkg, it may be marginally easier. IMHO, updating RPMs is really trivial.

Setting up an internal package repository from which binary packages are installed is also easier than setting up something like an apt repository.

I don't use apt, but yum just needs a 'yum-arch', urpmi just needs a 'genhdlist', and some means (http,ftp,nfs,rsync over ssh in the case of urpmi etc) to access files (and client configuration, which no system can currently get around AFAIK).

Further, features like USE flags can reduce the number of custom ebuilds you want compared to the number of custom DEBs or RPMs, if you want many customised packages.

The same can be achieved with --with options to rpm (which can also be stored in your ~/.rpmmacros file as _with macros).

The only real difference here is vendor adoption. I note for example that _with_ldap is implemented in one large distribution across quite a wide selection of packages.

As the number of custom packages increases, the gain from Gentoo increases compared to other distros, until it is worthwhile.

Only if one defines "custom" to mean "packages available in Gentoo with support for the USE flags I want/don't want, which aren't available in an rpm-based distro with support for the _with macros I want/don't want".

Choose your distro. Learn to use the tools it provides. But, if you don't learn the tools, don't claim they don't work ...

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 11, 2005 11:20 UTC (Tue) by farnz (subscriber, #17727) [Link]

I've written ebuilds, RPMs and DEBs from scratch for my own private use; ebuilds are easier, because creating an ebuild from the provided template is a matter of filling in bits of a shell script to tell Portage how to download, unpack, compile and install the package. The skeleton ebuild just needs some metadata filled in (unavoidable for any package system) to download and build a package where the build sequence is "./configure ; make ; make install".

A package repository is just a means to access files (http, ftp, nfs). No special files, nothing to update; clients configured to use it will download packages from it.

It's by no means a perfect panacea, but it is simpler to create custom packages with portage than with dpkg or rpm; whether that simplicity is worth the compile time is your decision.

BTW, I tend to use custom packages to cover any binary package that is either different from the vendor supplied package, or created for yourself; by this definition, every package in Gentoo is a custom package.

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 11, 2005 15:59 UTC (Tue) by ranger (guest, #6415) [Link]

I've written ebuilds, RPMs and DEBs from scratch for my own private use; ebuilds are easier, because creating an ebuild from the provided template is a matter of filling in bits of a shell script to tell Portage how to download, unpack, compile and install the package.

So, you're saying the only real difference is the provided template?

Mandrake has one:

http://qa.mandrakesoft.com/twiki/pub/Main/RpmHowTo/skel.spec

(this one is really intended more as education as well ... which is why there are so many comments, and a lot of things catered for may not be necessary for non-gui packages or distros who don't care about consistency between different desktops)

In my own experience, more work is involved in writing the scripts to deal with upgrades etc than in populating meta-data ... and that's not going to change no matter what packaging tool is used (since the most work is usually testing).

The skeleton ebuild just needs some metadata filled in (unavoidable for any package system) to download and build a package where the build sequence is "./configure ; make ; make install".

Ditto. The skel.spec above needs about 4 lines changed with suitable meta-data.

A package repository is just a means to access files (http, ftp, nfs). No special files, nothing to update; clients configured to use it will download packages from it.

So, how is meta-data retrieved?

(yum-arch and genhdlist just extract the meta-data from the binary packages to make it easily accessible without downloading the packages themselves)

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 9, 2005 16:06 UTC (Sun) by dkite (guest, #4577) [Link]

To mangle Churchill, 'Gentoo is the worst form of distribution except all
the others that have been tried'.

I dislike the long builds, but any time I look to try something else, I
find them incapable of doing what I take for granted with Gentoo.

Oh, I could customize the system, edit a bunch of config files, build a
few scripts. And come up with something close to Gentoo without support.

Ideal is a strong word, but what other word would fit?

Derek

Gentoo for All the Unusual Reasons (Linux Journal)

Posted Jan 8, 2005 18:09 UTC (Sat) by bluefoxicy (guest, #25366) [Link]

I use gentoo mainly for security. The hardened team has done a nice job of maintaining a good operating environment with PIE/SSP/PaX, so a good chunk of vulnerabilities are reduced to DoS attacks. These include things such as buffer overflows on the stack; shellcode injection; and returning to existing code (reliably).

They've also got grsecurity and SELinux policies there, though I don't use them. :)

he forgot: configuration and update is easier

Posted Jan 10, 2005 10:51 UTC (Mon) by dambacher (subscriber, #1710) [Link]

What the Author forgot:

Gentoo has the uniqe feature of not fiddling in my hand-optimized configurations with its automatic-wysiwyg-configuration.

Another feature: easy update when needed and only what needed. I can update a single package without bothering about dependencies like when doing this with distributions like suse or redhat.

I changed from suse-linux because of these features.

Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds