Gentoo for All the Unusual Reasons

You might think of Gentoo as a bleeding-edge distribution for development workstations, but the simple packaging system can make it a good choice for any production system that needs to stay up to date.

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.

Speed

Because there is binary compatibility across all the descendants of the original i386 processor, the other Linux distributions (not to mention everyone writing software for Microsoft Windows) can ship prepackaged binary versions of their software compiled for the generic i386 platform and take advantage of the fact that it'll work everywhere. The other side of this is that these distributions are unable to take advantage of any new optimizations your fancy CPU might offer, which is a pity.

Gentoo is a built-from-source distribution; however, you are able to specify compiler flags to be used when building software for your system. GCC in particular allows one to specify the kind of CPU on which the code will run. By specifying the processor type, such as Intel Pentium III or AMD Athlon Thunderbird, the compiler is able to generate processor-specific code that, in theory, results in better, faster machine code.

Is a Gentoo system faster? Anecdotal evidence is mixed. It seems that a Gentoo system runs somewhat faster than an identically configured system running one of the more popular distributions. But, any minor performance advantage is squandered completely if the system is not installed, configured and tuned correctly. Because many of us don't know how to do that, and because Gentoo offers so much latitude to do your own thing, it's easy to lose the benefits of slightly faster programs if you do something silly.

So, from a speed perspective, it really doesn't matter whether you use a build-it-from-source distribution or a binary-package distribution. If improved speed is not a reason to use Gentoo, why would you want this built-from-source thing?

Common Problems in Production Environments

People get annoyed at their computers for a variety of reasons. The one we focus on here is the newer version problem, and modern operating systems run into it in two ways. The first way is when users need a toolkit, utility or other item that is not included in the distribution. As a result, the users need to roll it themselves. The second way is when a newer version of an application or tool is available than what is included in the prepackaged distribution.

A key issue is at play in both of these scenarios: ease of operation. Does the operating system help you with the challenges that administering a system presents? Much to my surprise, Gentoo Linux turns out to be really good in this regard.

With Gentoo, one installs new packages by downloading sources and then compiling them. You want a piece of software? No problem—issue the instruction, and a little while later, it's installed. It's the same user experience as with Debian.

Gentoo really shines, however, when a user needs a newer version of a piece of software. Let's say I'm using the bluefish HTML editor, for example, and a bug is annoying me. A newer version of bluefish might be available in Portage, Gentoo's software package management system, so I might be able to ask for the upgrade. Gentoo has a handy command called etcat that can determine what's available:

# etcat versions bluefish

Figure 1. You can check for available versions of bluefish with the etcat utility.

etcat tells me I have version 0.9 of bluefish installed, and now version 0.12 is available. From reading the bluefish Web site, I know the problem is fixed in version 0.12, so I definitely want the upgrade.

The emerge command tells what will happen if I do upgrade:

# emerge --pretend bluefish

Figure 2. Use emerge --pretend to check the dependencies of a program you want to install.

Apparently, this version of bluefish needs a library called libpcre. Portage has shown me that in addition to doing an upgrade of bluefish, it's going to bring in libpcre as well. So, off we go:

# emerge bluefish

______________________

-- Andrew Frederick Cowie Operational Dynamics Consulting Pty Ltd

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

interesting article

Anonymous's picture

An interesting article. I've been thinking of playing with Gentoo for a while. The idea of easily being able to build customized packages appeals to me, as it's seems to be like rocket science on Debian...

no so hard

damaki's picture

Just 2 commands for any standard source (./configure based) :
dh_make
dpkg-build -rfakeroot

Nothing else...

I have seen debian boxes tota

Anonymous's picture

I have seen debian boxes totally corrupted by this kind of installation

Debian is particullary picky about extern packages, gentoo will build any package acording to your new choice if needed.

What if you do that for kdelibs ? gtk ? glibc ? the system will suffer, not on gentoo !

Another overlooked benefit is

Anonymous's picture

Another overlooked benefit is Security. Gentoo Hardened includes tons of excellent security features including SELinux, and you are not limited like other security-focused distributions. You can install basically any software on Linux, and the binary is automatically hardened; just check the configuration.

I use gentoo on every compute

Anonymous's picture

I use gentoo on every computer i got on my home, If you want an easy to install gentoo based distribution with graphical instalation you should check Vidalinux Desktop. Is based on gentoo but is using Redhats anaconda to install everything. http:://desktop.vidalinux.com :-D

vidalinux

Anonymous's picture

good golly, did you see the minimum system requirements?
--------------------------
Minimum Supported Configuration:
AMD Athlon XP or Pentium 4 compatible processor, 1.0 Ghz; 10-GB hard disk; 256-MB RAM; 800x600 screen resolution

Recommended Configuration:
AMD Athlon XP or Pentium 4 compatible processor, 2.0 Ghz or faster; at least 20-GB hard disk; at least 512-MB RAM; 1024x768 screen resolution or better
--------------------------

where gentoo's minimum system requirements are:
--------------------------
Hardware Requirements
CPU i486 or later
Memory 64 MB
Diskspace 1.5 GB (excluding swap space)
Swap space At least 256 MB
--------------------------

does anaconda really take this much power?

I've been using Linux for ove

Anonymous's picture

I've been using Linux for over 10 years and Gentoo was the distro to pull me away from Win32 for daily use. It's takes a little work for the initial install and the larger compiles like kde. Once installed its great. Easy to use, maintain and update. Seems you have what you need in the version your looking for, including its dependances.

Great Distro. Next Debian & Slackware (Slack being my 1st Linux distro) then Mandrake and Suse. All Great.

The main thing is to Enjoy Linux no matter the distro!

hallo this sucks your link go

Anonymous's picture

hallo this sucks your link goes straight to M$

Nah he accidently added two c

Anonymous's picture

Nah he accidently added two colon's, which for some reason is redirecting to you know where.
http://desktop.vidalinux.com/

http://desktop.vidalinux.com/

Stephane's picture
Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix