Linux Cookbook 126
Linux Cookbook | |
author | Carla Schroder |
pages | 700 |
publisher | O'Reilly |
rating | 9 |
reviewer | Mary Norbury-Glaser |
ISBN | 0596006403 |
summary | Practical Advice for Linux Users and SysAdmins |
The O'Reilly Cookbook series uses a problem/solution/discussion layout to deliver content in a "recipe" format. Schroder provides a thorough compendium of practical solutions to common problems found in the Debian and RPM-based Linux environments. Intended for the beginner to intermediate user, this book also has lots of good nuggets for the advanced Linux systems administrator. The table of contents generously lists each topic covered with enough detail for the reader to quickly pinpoint specific problems of interest.
The book begins with a logical chapter, "Finding Documentation," which naturally covers man (manual) pages: understanding, finding, reading and printing the documentation that has frightened many a newbie. The author includes references to other documentation (CHANGELOGS, RELEASE NOTES, etc.) and even some graphical viewers like Konqueror, Yelp and Pinfo. This chapter provides a nice overview of man pages and clearly explains how to find documentation quickly and efficiently.
Chapter 2 covers "Installing and Managing Software on RPM-Based Systems" and the introduction, "Source-Built Systems: The Olde Way", made me LOL. Schroder describes how "us old-timers" did it in the days before dependency resolvers; with failed makes and long download times. Having experienced my share of "Dependency Hell" and espousing more than once, "In my day....", I can take a cue and not only laugh at the past but appreciate the present. Schroder brings that to bear with her problems and solutions to "RPM Hell". Ahhh, the more things change, the more they stay the same! Schroder addresses issues with RPM (Red Hat Package Manager) basics and Yum (Yellow Dog Updater, Modified).
A natural transition to this chapter is "Installing and Managing Software on Debian-Based Systems" which introduces the package manager/dependency resolver, apt. A particularly nice addition here is a description of how to build a local Debian package repository for sharing out to client systems. This is a bit of how-to that is useful for sysadmins and is a welcome addition to a book of "solutions". Schroder follows this chapter with "Installing Programs from Source Code" which provides an alternative to using package management. Included here: generating a list of files from a source install, installing programs from source code and using CheckInstall to create packages.
Chapter 5, "Discovering Hardware from Outside the Box," illustrates the problem of detecting hardware. Schroder discusses an assortment of solutions: using Ispci, dmesg and reading /proc. Also included is how to view drive partitions and how to calculate drive capacity with fdisk.
Schroder chooses JOE and Vim as topics for her "Editing Text Files" chapter. This isn't intended to be a tutorial on each editor. Rather, the author provides some quick problem/solution scenarios that guide the reader through customizing the two editors to meet their unique preferences and she lists useful commands and offers recommendations on how to use vimtutor and Joe's online help to get up to speed.
Chapter 7 is titled "Starting and Stopping Linux" and begins by explaining runlevels then discusses how to start and stop X, how to change the default runlevel and how to manage Debian's and Red Hat's runlevels. Also included are command-line solutions to manually configure, start and stop services. The latter is particularly useful since many of us find ourselves needing to manually stop or restart a service when testing configuration changes. Another sysadmin tip found here is disabling or limiting access to Ctrl-Alt-Delete. This is a common "first step" to protecting a machine in an secure environment.
"Managing Users and Groups" is the topic of Chapter 8 and covers system accounts vs. human user accounts, finding UIDs and GIDs, modifying accounts (changing the login or UID, moving a home directory), deleting users and disabling accounts, killing user processes, password and disk quota management and using shell scripts to manage batches of users and passwords. Included in this chapter is the author's cautionary statements on using su and sudo to gain temporary root powers while doing system tasks at the command-line.
In the introduction to the next chapter, "Managing Files and Partitions," Schroder provides a well written primer on understanding filesystem fundamentals: Linux file types, file attributes and definitions, filesystem internals (logical block, logical volume, B+trees, etc.), and journaling filesystems. She uses this basis to tackle the common problem of controlling who has access to what file and uses the chmod (change mode) command to change file permissions. She includes batch operations and setting file and directory permissions with chmod. The next set of problems in this chapter deals with using the chown command to change ownership of files and directories and doing batch operations with chown. Other solutions here: setting up a shared directory with setgid and the sticky bit, using umask to set permissions defaults, configuring file system mounts with /etc/fstab, mounting and unmounting filesystems on hard drives (a common issue with dual or triple boot systems), using dmesg to find device names in order to mount them in conjunction with fdisk to show partition numbers on drives, creating and deleting files and directories using mkdir, touch and rm, using fdisk to create Linux disk partitions and creating a filesystem on a new partition. Pretty much everything one would desire to do bound in one chapter!
Chapter 10 is dedicated to "Patching, Customizing and Upgrading Kernels". Many users have avoided modifying their kernel because of fear of "hosing" the system entirely but Schroder shows that it's not that complicated and can be accomplished without fear of losing one's "old" kernel. She addresses upgrading to the latest stable version of the 2.4 kernel, adding new features to the 2.4 kernel, building the 2.6 kernel and removing a kernel patch (we've all needed to do this at one time or another).
The next chapter on CD and DVD recording will be a well thumbed section for many readers. Schroder points out that the "entire field is evolving rapidly, and CD/DVD standards are in a chaotic state." Schroder introduces some fundamental packages (cdrtools and dvd+rw-tools) and straightforward instructions on how to get the most out of CD/DVD. She begins with a fairly comprehensive Glossary of Formats and Standards which provides a good basis for getting a handle on a number of terms and changing technologies. Some problems she tackles here are common: finding the SCSI address for CD and DVD writers, enabling SCSI emulation for IDE/ATAPI CD and DVD writers, making a Linux and Windows readable data CD, copying a CD or DVD, erasing a CD-RW, recording a multisession data CD, creating a bootable CD using mkisofs (a pre-mastering program) and recording data DVD using growisofs (a front end to mkisofs).
"Managing the Bootloader and Multi-Booting" will also be a popular chapter, especially for LILO users who want to migrate to GRUB and newbies who will learn quite a bit about how bootloaders function and how Linux manages partitions. Many Linux users not only have a Windows partition on their system but other Linux distros happily sharing a drive. Schroder gives a nice step-by-step solution to correctly partitioning a drive for multi-booting various Windows OS versions and other Linux distros with bootloader solutions for both LILO and GRUB users.
We've all done it: hosed our system. Can't get past the errors, can't boot. Schroder turns to the best Linux recovery tool there is: Knoppix, a bootable, live CD with Linux drivers and utilities that automatically detect your existing partitions. This chapter covers all the necessary tools you'll need to get your system back up and your data recovered: booting Knoppix; creating a Knoppix boot diskette; saving your Knoppix config on a USB flash stick; creating a persistent, encrypted Knoppix home directory; copying files to another Linux PC; copying files to a Samba share (Windows PC); copying files to a CD-R/RW; installing software from Knoppix, repairing a lost root password; installing Knoppix to a hard disk and virus-scanning Windows PCs with Knoppix.
Chapter 14, "Printing with CUPS," describes the Common Unix Printing System and how to: find drivers; network printers; install printers on a standalone Linux PC; share a printer without using name resolution; share printers on a mixed LAN with Samba; build a dedicated CUPS printer server; restrict printers to select users and troubleshooting. There's more here than a typical home user will need to learn but it's well documented for a sysadmin.
Chapter 15 deals with "Configuring Video and Managing X Windows" and the author provides detail on the X Window System and X.org, terminology, hardware (video adapters) and drivers. She leads the reader through installing new video adapters and making manual settings by editing XF86Config, configuring a multihead display, configuring startx to start the desktop or window manager and changing the login display manager.
Doing backups using rsync and incorporating Mondo Rescue for creating a bootable system restore disk is the topic of Chapter 16. Rsync is an extremely efficient and elegant solution to synchronized backup. Schroder covers local file transfers and synchronization, using ssh with rsync to authenticate login and encrypt the transport of data, building an rsync backup server, automating rsync over ssh backups, customizing filepaths in rsync and installing rsync on Windows clients. Also in this chapter are problems/solutions for creating a bootable system restore disc using Mondo Rescue. Mondo can also be used to clone Linux systems and for a complete system backup.
The next chapter, "Remote Access," concentrates on the SSH protocol: setting up OpenSSH, generating new host keys, authenticating via public keys, using multiple key pairs, using ssh-agent and keychain for passwordless logins. Schroder takes SSH a bit further with a section on tunneling X over SSH and solves the problem of accessing Linux boxes from Windows clients (using PuTTY and Cygwin).
For programmers or groups of users who are collaborating on a single project, version control is a powerful tool that can simplify and maintain both code and documentation trees. In chapter 18, Schroder shows the reader how to build a simple RCS (Revision Control System) repository then how to compare file versions in RCS; manage system config files with RCS, use CVS (Concurrent Versions System) for a single-user local repository; add and delete files from a CVS repository and how to create a shared CVS repository. She then goes into a good amount of detail working with files in CVS as well as building a public repository with Pserver and customizing the CVS environment.
Chapter 19 is dedicated to ntp (network time protocol) which will interest sysadmins. Schroder walks the reader through building a local time server using ntp and ntpdate, connecting the clients, adding access controls to ntp.conf and using iptables rules, setting up multiple local time servers and using ntp keys for authentication.
The next two chapters cover "Building a Postfix Mail Server" and the related "Managing Spam and Malware". Schroder chooses to pick one mail app for handling email, Postfix, rather than some of the other contenders (Sendmail, Exim or Qmail) and introduces the topic with a glossary of terms. She then helps the reader through a POP3 mail server setup, testing the mail server using telnet and openssl s_client, the basics of sending and receiving mail and installing Cyrus-SASL for SMTP authentication, among other topics. The author doesn't neglect IMAP servers or Squirrelmail and covers issues related to both. Schroder follows this with a comprehensive chapter on adding spam and virus-fighting tools to the Postfix server and includes a basic checklist for the admin who manages a cross-platform environment with Windows clients. She then discusses adding checks to /etc/postfix/main.cf and provides a discussion on UBE (unsolicited bulk email) controls. The chapter continues with creating whitelists for management of wanted addresses, using DNS blackhole lists and setting up Clam Anti-Virus and SpamAssassin.
Schroder takes a simple approach to Apache installation and configuration in Chapter 22: a public web server for a single domain serving up static HTML pages. This is a very basic introduction to Apache and web serving on a Linux box. Her topics include how to start Apache at boot, password protecting individual directories, using robots.txt to control web crawlers, making custom error pages, using favicons and viewing Apache access logs with Webalizer. A bit thin on details in this chapter but adequate to get one up and running.
Sysadmins get another treat with Chapter 23: "File and Printer Sharing, and Domain Authentication with Samba." Schroder begins by building a simple Samba file server on a Windows LAN. She extends that a bit with a Windows/Linux peer-to-peer network then rounds that out with a description of how to add authentication to the Samba server in order to control access to the shares. For admins with a large numbers of users, Schroder helps solve the problem of converting /etc/passwd entries to smbpasswd format and copying them to /etc/samba/smbpasswd using the mksmbpasswd script. She also delves a bit deeper into controlling share access by using ACLs (access control lists). There are always groups of users who need to share files and those users who need a central network directory for their personal files and there are solutions here for creating public shares and home directories. The chapter then moves into building a PDC (primary domain controller) with Samba and connecting various Windows clients (95/98/ME/NT/2000 and XP) to a Samba domain as well as connecting Linux clients both by the command-line and with GUI LAN browsers like smb4k, LinNeighborhood, Konqueror and Nautilus. Password synchronization is briefly covered in one problem before the chapter switches gears to sharing Linux printers with Windows clients and vice versa. Running Windows applications directly on Linux is solved using CrossOver Office and Schroder applies the last section of this chapter to installation and discussion of this tool.
The last chapter of this book is dedicated to "Managing Name Resolution." Schroder offers a discussion of DNS and then provides a glossary of DNS terms before addressing the problems section. The author helps the reader enable name resolution on a LAN with hosts files then shows how to set up a DHCP server to take care of IP addresses. She then discusses configuration of Windows and Linux dhcp clients, adding static hosts to dhcp and running a public DNS server. Schroder looks at installing djbdns (initials of the creator, D. J. Bernstein + dns) as a secure, simple and robust alternative to BIND. Schroder shows how to configure the djbdns tools, tinydns and dnscache before giving a tour through BIND and how to set up a local BIND caching name server, installing both a private and a public BIND DNS server and building a BIND secondary server. The author finishes the book with a section on testing and querying DNS servers using dig and dnstrace.
The appendices offer extended information on how to find Linux documentation, a reference list of online hardware Web and Usenet sites, a list of Microsoft file types and extensions and an init script for CVSD.
O'Reilly is well known for producing high quality books that are beautifully bound and well designed. The layout of this book is simply presented with clear typography with chapter and topic headings easily discernible and command-line sections cleanly delineated. The book opens and stays open to selected pages for ease of use (no "cracking" of bindings allowed or necessary!); most of us like to follow along with a book splayed open next to our keyboard or laptop so it's nice not to have to balance our mug of coffee on one side of the book to prop it open.
The Linux Cookbook by Carla Schroder is extremely easy to navigate and very readable thanks to the author's sensible and practical topic selection, clarity of writing and humor. In providing solutions to common problems, Schroder has also managed to disperse valuable advice along the way. Her common sense approach to Linux systems management and administration shines through. The reader gets the benefit of the author's experience in this clearly written and valuable resource to Linux. A bonus is the author's enthusiasm for her topic. This translates into a pleasurable read. Much of this information is scattered across a large number of Websites but having a single competent resource to have at hand makes this book worth owning.
You can purchase the Linux Cookbook from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
So, what does Penguin taste like? (Score:5, Funny)
Re:So, what does Penguin taste like? (Score:5, Funny)
Re:So, what does Penguin taste like? (Score:1)
Not very good. They are mostly fat, and their blood is rich in oxygen which turns their meat an unapetizing dark color when cooked.
What does the color have to do with taste? *Sniff* Harrh, methinks I smell more troll than toasty penguin here. You were the guy clubbing the baby seal last week, weren't you?
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:1, Troll)
From the article: "some familiarity with a Linux system, the inherent power of using the command-line and the dangers of using root are necessary."
In otherwords, you can go to cookingforengineers.com [cookingforengineers.com], but you have to use Lynx to find out that although it sounds tasty, using ginseng in your stir-fry will completely overpower the delicate flavor of penguin.
Re:So, what does Penguin taste like? (Score:1)
I read that as "cookingforeigners.com"
Re:So, what does Penguin taste like? (Score:4, Funny)
You don't need to buy the book to try the penguin. You need to buy the book to try the book, although I'm sure the penguin tastes a lot better than the book.
On the bright side, if you did try the book for yourself, you'd get more fibre in your diet. It's extremely dense so it's probably a lot more filling as well than penguin.
Re:So, what does Penguin taste like? (Score:1)
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:1)
Penguin would likely taste very fishy.
Geez. Everybody knows that penguin tastes like chicken.
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:1)
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:2)
Re:So, what does Penguin taste like? (Score:1)
Re:So, what does Penguin taste like? (Score:1)
Re:So, what does Penguin taste like? (Score:2)
That's what happens when the matrix isn't sure how to replicate the taste of the food - it defaults to chicken.
Re:So, what does Penguin taste like? (Score:1)
Re:So, what does Penguin taste like? (Score:1)
there is no danger in using root!! (Score:4, Funny)
Re:there is no danger in using root!! (Score:1)
JtM
This is the book... (Score:3, Funny)
Great Review.... (Score:3, Insightful)
Re:Great Review.... (Score:1)
Yes, given that that wasn't a book review.
> Well, I will. I wish that more reviews were like this, and not
> just on
Well you're in luck! Simply walk into your local book shop or library, pick up a book and read the table of contents. Some books explain more about what is in each chapter than others, but that's what makes reading the table of contents sections of books so unpredictable and exciting!
> I will definately read this!
Yes!
Re:Great Review.... (Score:1)
Cheaper at Amazon.com (Score:4, Informative)
Amazon.com price: $29.67
Re:Cheaper at Amazon.com (Score:5, Informative)
$25.50 at the almighty bookpool [bookpool.com].
Re:Cheaper at Amazon.com (Score:2)
Reader beware (Score:3, Informative)
Re:Cheaper at Amazon.com (Score:2)
I just purchased it used for $14.97.
Re:Cheaper at Amazon.com (Score:3, Informative)
Even cheaper at Nerdbooks.com (Score:2, Informative)
The Linux Cookbook is $22.48 there. Linux Cookbook [nerdbooks.com]
I had a good experience with them. Superfast shipping and immediate tracking, and the CEO even called
Re:Even cheaper at Nerdbooks.com (Score:1)
The inventory shown on our site is in real-time.
Thanks
Dave Henley
Customer Advocate
dave@nerdbooks.com
972.470.9600 (main)
Uh oh (Score:5, Funny)
The command-line uses always uses root? (Score:1)
Certainly the cookbook uses the command-line, and some of the examples might require root, but there's no required link between the two.
Title has prior art (Score:5, Informative)
Re:Title has prior art (Score:1)
Re:Title has prior art (Score:2)
if you write a book called Microsoft's Business Practices, the name of the book is not (usually) your company name and is just a short description of the book.
again, ianalbupsootvo (i am not a lawyer but i probably saw one on television once)
Re:Title has prior art (Score:1)
Re:Did Someone say cookbook?! (Score:1)
The one thing I noticed in this review is (Score:5, Funny)
1 - A chick wrote a tech book on Linux
2 - Another chick reviews it, and even reminisces on the "old days" and "how we did back then"
Which means that Linux is becoming sexy enough an OS to leave the circle of pimple-faced geeks and other smelly RMS-like characters. Which is good news...
I am tempted to mod that troll... (Score:1)
Re:I am tempted to mod that troll... (Score:2)
Actually it was unclear if he called RMS himself "smelly" or if he was referring to RMS like people "smelly".
Either way that could not be a good thing.
we are you know (Score:2)
Re:The one thing I noticed in this review is (Score:1)
Which means that Linux is becoming sexy enough an OS to leave the circle of pimple-faced geeks and other smelly RMS-like characters.
You've neglected the possibility that both women are smelly, pimple-faced geeks.
(I know your comment was made in jest, but if I were a woman, I'd be pretty fed up of having my sex pointed out every time I did something.)
Re:The one thing I noticed in this review is (Score:1)
read the book? (Score:3, Insightful)
I don't think the author would give you the time of the day, even if you where the last person on earth
Linux is not sexy, it's interesting, it's technical. Why the hell would people want something that's sexy?
I hate to dissapoint you, but I've learned more from Carla and other women then I've learned from all my male colegues & friends.
for what it's worth, read the book you might learn something
Re:The one thing I noticed in this review is (Score:1)
knowing most /. eating habits......... (Score:2, Funny)
man macaroni-and-cheese
man hot-pocket
man cup-o-noodle
and
man phone-number-for-pizza-hut
Re:knowing most /. eating habits......... (Score:3, Informative)
Re:knowing most /. eating habits......... (Score:1)
man woman?
Free (Score:2, Interesting)
Re:Free (Score:2)
Re:Free (Score:2)
hmm.. Rebates may be a scam, but the chief beneficiary may be the state!
One of the advantages of Linux (Score:4, Insightful)
Re:One of the advantages of Linux (Score:3, Insightful)
Hey, that's true of NT too!
Re:One of the advantages of Linux (Score:2)
Yeeeeees, but how many people use the Command Prompt window to do most/all of their serious admin work?
Re:One of the advantages of Linux (Score:2)
Which distro is that? Some offshoot of Lindo^H^Hspire?
Re:One of the advantages of Linux (Score:1)
geNToo [gentooexperimental.org]
Re:One of the advantages of Linux (Score:2, Informative)
Re:One of the advantages of Linux (Score:1)
A linux cookbook? (Score:3, Funny)
Have to aggree (Score:2, Insightful)
In my experience, O'Reilly books are really good, have relevent and interesting content and are well laid out and easy to use. After my exams im hoping to get a book on Linux, I have a handheld one at the moment by the same publisher but this one
Re:Have to aggree (Score:3, Funny)
?????????
Aren't all books handheld ones?
Re:Have to aggree (Score:1)
I don't get it (Score:5, Insightful)
Regurgitated table of contents + a few vague, trite paragraphs discussing the binding = Slashdot "book review"
Re:I don't get it (Score:5, Insightful)
It looks more like a "How to use Linux" book than anything else.
A "Linux Cookbook" would have chapters more like "How to setup Linux as a: Dedicated firewall, HTTP Proxey, DNS server, HTTP Server, Database server, graphics workstation, PVR" etc and leave out things like "How to upgrade the kernel" completely.
Re:I don't get it (Score:2)
Re:I don't get it (Score:2)
I love what I find online, but I'd love a book to break the spine of so I could lay it beside me in bed while I'm working on the laptop. Plus I seem
The cookbook series... (Score:2, Insightful)
It doesn't give you domain knowledge like some of O'Reilly's other books (I'm looking at you BIND and DNS). What the Oreilly cookbooks generally give you is a nice task or goal based instruction set with some explanation.
It is a little like a how-to for problems or tasks.
There are 43 (according to the search on Oreilly.com) books in the series:
http://search.atomz.com/search/?sp-a=sp1000a5a9 & sp -f=ISO-8859-1&search=Go&sp-t=cat_search&sp-q=cookb o
Teaching myself (Score:1)
i just bought this! (Score:1)
Re:i just bought this! (Score:1)
Too damn confusing...
Re:i just bought this! (Score:1)
Nertz! (Score:2)
Highly recommended (Score:2, Informative)
more about the author (Score:5, Informative)
http://www.oreillynet.com/pub/au/1909 [oreillynet.com]
A series of articles she wrote...
http://www.serverwatch.com/tutorials/article.php/
She actually sounds like the kind of person I like to work with. Someone who learned things hands on.
Re:more about the author (Score:2)
If it's that good, it's on my shopping list! (Score:1)
Portland Area Computer Bits Columnist? (Score:1)
Re:Portland Area Computer Bits Columnist? (Score:2)
I don't think the two events are connected, though.
Geoff
It's a COOKBOOK!!!!! (Score:4, Funny)
Re:It's a COOKBOOK!!!!! (Score:3, Funny)
Like others, I was less than satisfied... (Score:2)
the books dedication (Score:1)
Re:the books dedication (Score:1)
Re:Joe Tutorial? (Score:1, Offtopic)