|

楼主 |
发表于 2005-5-14 11:23:41
|
显示全部楼层
Gentoo 2005.0 Review
2005-05-08 17:59:03
By Brian M
Discuss this in our forums.
OK folks, here's my Gentoo review. I decided to re-format and start installing Gentoo 2005.0. What's the deal with Gentoo.
Gentoo's purpose is to have a Linux distribution that is extremely configurable and can be optimized to the nth degree, here's their project goals:
http://www.gentoo.org/main/en/about.xml
Gentoo's been around since 2002 (if not, earlier). Gentoo's been known affectionately as one of the most time consuming distros to install. I personally remember spending a whole week getting a base system on my laptop with Open Office, GIMP, and Firefox.
Gentoo has a huge cult following, and as a Gentoo lover myself, I'm going to review it.
System Specs:
Compaq Presario 900US
Athlon XP 1700+
512MB PC2100 DDR
80GB, 4200rpm HDD
8/8/24X CD-RW
Integrated ATI Mobility Radeon (i.e., Radeon 7500)
15" LCD Screen (1024x768 max)
The 2005.0 version is the initial 2005 release of the Gentoo Linux distribution. Gentoo releases versions by this format:
major versions per year and minor revisions denoted by .x. Therefore, 2004.3 is the third minor revision for the major release of 2004. Instead of using major/minor numbers (i.e. 1.x), it makes keeping track of the latest version easy because you just have to figure out the year.
Anyhow, here's the bulk of things:
LiveCD
Gentoo Linux comes as a LiveCD. The LiveCD gives you a full working Gentoo environment, but no Desktop Environments here folks, the LiveCD is terminal only. The LiveCD for 2005.0 makes use of the new 2.6 kernel, in the old Gentoo days, there were two ways to start the LiveCD:
gentoo -> starts the 2.4 kernel with only uniprocessor support
smp -> starts the 2.6 kernel with multiprocessor support.
The 2005.0 now utilizes the new 2.6 kernel which adds enhanced support for newer hardware. It also uses coldplug and hotplug so it makes hardware detection more accurate. Before, back in the 1.4 versions (as well as 2004.0 and 2004.1), hardware detection was still being worked on, hence my RealTek NIC had to be modprobed (modprobe 8139too). Nowadays, detecting it is no problem.
Documentation
The documentation is probably one of the best in the linux world. Gentoo's known for its thorough documentation. Gentoo introduces three handbooks:
* the 2005.0 handbook is focused on a CD-based installation, that is, it's meant for people who don't have an internet connection (or have slow, 56K dial-ups - poor folks). The 2005.0 handbook also focuses on Stage 3 installs. I'll get to the differences in stages in a few.
* The Handbook in itself contains a more detailed documentation. Everything from stage types and how to install the different stages. It's far more comprehensive than the 2005.0 handbook, but it does require a broadband internet connection.
* The x86 handbook is for the lazy bums. If you don't want to read the mega-verbose 2005.0 handbooks, this is a shorter more succinct documentation on installing Gentoo.
Personally, I suggest the handbook in itself, however, Gentoo also has different documentation regarding installing X.Org and using KDE/GNOME/Fluxbox as your DE (Desktop Environment).
The Gentoo System
Gentoo uses a bunch of conf files to manage the system. The make.conf file manages USE variables (which controls what packages can be installed in your system), the architecture type, and GCC/GXX flags. It also holds data regarding what mirrors it uses to download packages from.
USE variables are important because you can control what packages to install. For example:
USE="qt kde -gtk -gnome dvd alsa cdr"
This tells Gentoo that you want to use Qt and KDE as your desktop environment, but do not install packages that use the GTK or GNOME libraries (let's say you hate GNOME like the plague). You also want to support DVD's, CD-R's, ALSA in your applications. This level of control is uncanny, but it does require learning how to use it.
What makes Gentoo unique in its make.conf file is that you can specify what kind of package builds you want. There are many types of packages in Gentoo:
* Hard Masked -> This means that the package is still being tested. It's not available for download, in fact, you have to edit your package.keywords file to get it to install hard masked packages. Hard masked packages have a M+ or M~ on it.
* Masked packages are packages that have an ebuild but are still being tested. It's denoted with a tilde (~).
* stable packages are packages that have been thoroughly tested. These packages are the packages that Portage will install.
The ARCH variable is what controls what packages you can/can't install. For example:
ARCH="x86" means to install only stable packages whereas ARCH="~x86" will tell gentoo that it's OK to use masked packages.
The GCC/GXX flags give you control as to how you want to compile your system. When you install software in Linux, you usually use ./configure, and you can specify -Ox arguments on the ./configure line. With Gentoo, you simply specify your argument on the GCC variable which means that when you install software, it automatically uses the GCC variable.
What makes Gentoo work is its Portage system. Portage is similar to FreeBSD's ports - you have a tree that the system uses to keep track of packages and versions. The power lies in the fact that installing software on Gentoo is a breeze. All dependencies are taken care of and the system downloads the tarballs for you. However, as with Ports, you have to synchronize your Portage Tree so that you can keep your software up to date. What's neat is the power of Gentoo's emerge:
emerge --sync -> this updates the Portage tree.
emerge -> this installs a package for you, dependencies are managed for you.
emerge -u -> this simply updates a package for you.
Removing software is just as easy, in fact, you can use
emerge -C to uninstall packages.
The nice thing about Gentoo is that keeping your system in tip-top shape (with the latest security features) merely involves the following command:
emerge --update world
However, the one thing is that Portage does not update dependencies, to do so, you need to use:
emerge --deep --update world
This will update all packages including dependencies.
One thing I didn't mention yet: the stages.
The difference in the stages during the install is how deep the optimizations you want to have:
* Stage 1 installs take the longest because you have to bootstrap your system from scratch - that is, GCC has to be compiled from scratch. Gentoo fanatics swear by the power given by Stage 1 installs.
* Stage 2 installs are somewhat long, the bootstrapping is done for you, but the system packages is yet to be compiled.
* Stage 3 installs means that the system has been bootstrapped and the system packages have been compiled to binaries. Gentoo assures that they compile the stage 3 binaries to the best of their abilities.
Another feature that Gentoo has is its ease of use when it comes to initscripts. Gentoo uses its own initscripts but the end result is that it makes linking daemons to initscripts much easier. For example, if you want XDM to start at the default run level, do:
rc-update add xdm default
What makes Gentoo unique is that the init scripts are controlled by rc-update which makes adding and removing initscripts to any run level easier.
Conclusion
What of it all? Well, Gentoo has its ups and downs. For the most part, Gentoo installs take a long time - depending on the speed of your machine, it can take hours, days, or even weeks.
Gentoo's rc-update puts convenience in the hands of an administrator. Adding initscripts to run levels couldn't be anymore easier - using one command to update initscripts is just a pleasure versus editing inittab.
Gentoo's Portage makes installing software a lot easier. However it does have its drawbacks. When I installed Apache 2 on my 2004.2 server, I ran into these issues:
Apache 2 in Gentoo uses apache2.conf not httpd.conf, so it makes looking at the Apache documentation nill.
However, considering that a bit of re-learning for the convenience of emerge? I'd rather stick with emerge, since it manages all of my dependencies.
Want more? Gentoo's rc.conf is interesting, you can choose your display manager using the DISPLAY_MANAGER variable and then your desktop using the SESSION variable. Changing desktop managers is easy, just update those two variables to the desktop manager and desktop of choice and you're set.
I did run into a few snags when I was installing 2005.0, for one, I ran into trouble with svgalib-0.19, as I scoured the web for an answer, I was told to install GCC 3.4. I did, but the svgalib-0.19 package would not install, so I had to force svgalib-0.21 package to install (it's hard masked, I had to edit package.keywords to make sure it lets me).
Gentoo's advantages work more for System Admins looking for better administration, emerge and rc-update do make the jobs easier. However, Gentoo is meant for advanced users. Beginners beware, as good as the documentation is, Gentoo does a few things differently hence making working with Gentoo a difficult task if you're a newbie.
Lastly, Gentoo is a mighty fine distro. Being able to compile specifically to my CPU makes building highly optimized systems easier. Emerge makes updating my system easier, and rc-update lets me add or remove initscripts faster.
overall, I give Gentoo 8/10
Pros: Fast, great package management system
Cons: some packages have bugs, and a week to install Gentoo is just plain insane. |
|