Slashdot Mirror


Linux Server Hacks

Wee writes "Linux Server Hacks is not a book which will teach you system administration. In fact, if you aren't already familiar with how to set up and run Linux, this book will likely confuse you. It is also not a book which will teach you how to break into Linux servers. The word 'hack' in this case is not a pejorative. What LSH will do is show you how to fully tweak that Linux box you already run. It will show you new (and possibly better) ways to do the things you already do. The book will probably not make you a better admin, but it will almost certainly save you some time or give you at least one 'Why didn't I ever think of that?' head-scratcher." Read on for the rest of Wee's review. Linux Server Hacks author Rob Flickenger pages 221 (including index) publisher O'Reilly rating Very Good reviewer Wee ISBN 0596004613 summary 100 tips and tools useful for those who work with Linux servers (and workstations).

About the book LSH is not just about the Linux operating system, per se. Despite the title, it spends more time covering applications which can run on Linux than it does the Linux operating system itself. It is composed of 100 "hacks" all grouped together into like areas, such as "Monitoring" and "Networking". The style sort of reminded me of O'Reilly's Cookbook series, and I find it to be an easy format to read. Indeed, if the book was larger, it could have easily been called "The Linux Server Cookbook."

After a somewhat cheesy forward by ESR and a recognizably standard O'Reilly preface, LSH starts out the hacking with a section called "Server Basics," and it's here that most of the Linux-specific tips are. You get to learn how to pass args to LILO, stroll through /proc, tweak the Linux kernel, play with hdparm and so forth. This chapter left me thinking that this was all stuff every admin should know, and not much of it was new to me (if you've used Linux for more than a couple years you probably won't find much here that you haven't at least heard about before). If you are new to Linux however, then this chapter will be valuable even if you stop reading the book right at chapter two.

If the book had to be divided into two parts, the first chapter would be titled "Part 1: Linux the OS." The balance of the book would then be called "Part 2: Linux Applications." Subsequent chapters each tackle one area of services or applications that run on Linux, such as CVS or rsync or ssh, and it's very easy to find something interesting purely by looking through the table of contents. The book's grouping of hacks into like topics helps, I think, because you can easily pick out what you want to see more of without having to wade through that which you don't find terribly interesting. For example, if you only deal with your personal Linux workstation, then you can easily disregard the "Information Servers" chapter without missing other valuable content. I personally found the "Networking" and "Monitoring" chapters to be the most useful. The "Backups" chapter was interesting, the "Scripting" chapter not so much. Each chapter starts with a summary of what's to come, so if the table of contents isn't enough to find the good bits, then just reading those summaries can give you an idea of whether you'll find anything useful to you.

The book includes a fairly complete index, but I didn't use it very much. I found the table of contents, with its list of each hack's title, to be useful enough. I suspect that when I pick the book up a couple months from now looking for something I had read about I'll get more use out of the index.

What's to like

As I mentioned above, the book is very easy to read. Flickenger has a "conversational" writing style I found easy to parse. If you hang out with Linux geeks very much, you'll recognize his way of communicating and easily assimilate what he has to say. His advice is sound, his skill level high (the same can be said for the other contributors as well). The book's layout and organization made it easy to find specifics and will ensure that it gets used as a reference later on.

You might be wondering about the code samples in this book: there are a lot of them. I didn't check, but I think each hack had at least one CLI listing or bit of example code. This made the book much more valuable than if it simply told you want to do; "seeing" the hack in action helped tremendously. In fact, I'd have felt disappointed if Flickenger hadn't included as many examples as he did. Most of the code is Perl, with some shell mixed in. The example code is well written and properly placed, so if you don't know Perl or shell you'll still be able to make use of the hack.

Each hack can stand on its own. This makes the book easy to read, and ensures its place as a reference. I didn't read the book sequentially at first, but I went through the whole thing regardless. Some hacks refer to other hacks, and I found myself reading the book as if it was hypertext, as is mentioned in the preface. Again, this also means less time spent reading that which you already know (or find boring) and more time spent thinking about something more useful.

The book is distribution-agnostic. I couldn't find anything that would upset a Debian user or would flummox a Mandrake fan. While this might have more to do with the bulk of the hacks being on the application level, I found the lack of an axe to grind refreshing nonetheless.

The book doesn't assume l33t-ness nor coddle the reader. It assumes you know your stuff and are a professional, and in doing so finds its voice rather well. This gave me a sense of admiration for the author and allowed me to absorb the knowledge being imparted with ease.

Although not specifically about the book, O'Reilly has set up a website devoted to their "Hacks" series of books. Users can send in their own hacks, which helps flesh out the content in the print edition.

What could be better

ESR's forward, titled "How to Become a Hacker," was just silly. The forward added nothing to the book, and I find the whole "zen of hacking" schtick tiresome after only a short while. Yes, "hack" is a cool word, but one which easily suffers from overuse: it suffers a lot in ESR's forward. The forward also contains a plug for ESR's book, which I thought was somewhat tacky.

LILO is referred to in several places, but there is not a single mention of GRUB. Where the boot loader was being discussed, an "If you use GRUB, you'd want to do it this way..." aside would have been welcome.

The "Information Servers" chapter is very large, but only deals with BIND 9, Apache and MySQL. If you don't work with any of these three, then fully one quarter of the book will be useless to you. I would have really liked to see mail servers (especially Postfix and Qmail) mentioned, and including tweaks for an ftp daemon would have made the book that much more valuable. I would have also liked to see sshd covered; the book contains only ssh client hacks. Finally, a hack or three about PostgreSQL would have been nice.

The "Scripting" chapter could have been replaced with a "Security" chapter. There are only 4 scripting hacks, and they aren't all that useful. Although the book has a security-conscious mindset running throughout it, I felt the lack of a section devoted specifically to security was a glaring omission. In fact, I almost didn't buy the book when I noticed that the table of contents didn't list a security chapter. It was only after reading a hack or two that I could see security was going to be mentioned.

Another area I expected to see was one with hacks involving package management. A whole chapter dealing with this topic would have certainly been welcome to users of Red Hat, SuSE, et al. I suspect that such a chapter might have broken an unwritten editorial rule about remaining distribution neutral, however. And Debian users would have found anything beyond an apt-get one-liner superfluous, so I can forgive the "omission."

Although the title of the book is "Linux Server Hacks," someone using Linux as a workstation would also find the book helpful. For example, Flickenger includes two hacks on burning CDs, a hack on displaying the load average in the title bar of an xterm window, and so on. I got the impression that the server-centric focus wandered into desktop land quite a bit. Because of this, I thought that some hacks involving window managers should have been included. I've tweaked vnc to run blackbox on more than one occasion and expected to see things like that mentioned. This is a niggling complaint, however.

I found myself wishing the book was longer. At US$24.95 the price was right, but I would have rather paid US$34.95 for 150 total hacks.

Finally, the book looked somewhat rushed. There were more than a couple formatting errors (typeset characters visible, etc) sprinkled throughout, and all the code examples were unindented; it was as if all the tabs were stripped out by the printer. While the lack of indenting might confuse those who don't know Perl or shell, the only "real" consequence of this is that the lack of tabs in the makefile examples on pages 27 and 28 prevent them from working.

Summary

Based on this review, it might seem that the bad outweighs the good where Linux Server hacks is concerned. I don't think this is the case, and I would caution anyone against taking that view (rather, I'd have them glance through the book at the bookstore before deciding not to buy it). I think it should be noted that given the usually high quality of O'Reilly titles, it's far easier to spot what could be better than what is likeable. Like the old saying goes, nobody notices a clean kitchen unless it isn't.

None of the "bad" things would keep me from recommending this book, and I found Linux Server Hacks to be a very useful -- both as a future reference and as "thumb through while waiting for the train" sort of read. There's not much in it which is "new", and most of the hacks would border on common sense for the seasoned sysadmin (although I'd be willing to be that even the most grizzled admin would find something new or interesting). Indeed, nearly all the information in the book can probably be found on the web somewhere. It is nice, however, to have everything collected in one place and organized into specific groups. Linux Server Hacks would make a good addition to the bookshelf of anyone, regardless of their skill level, who finds themself administering a Linux machine, be it a server or workstation.

Table of contents
  1. How to Become a Hacker
  2. Preface
  1. Server Basics
  2. Revision Control
  3. Backups
  4. Networking
  5. Monitoring
  6. SSH
  7. Scripting
  8. Information Servers

You can purchase Linux Server Hacks from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

8 of 146 comments (clear)

  1. how many hack books do i need to buy? by stonebeat.org · · Score: 3, Insightful

    why cant all this information be on a searchable website? and charge me subscription...

    1. Re:how many hack books do i need to buy? by Pharmboy · · Score: 2, Insightful

      why cant all this information be on a searchable website? and charge me subscription...

      Amen, especially 221 page stuff like this, with half the content redundent for experienced admins. I would rather visit the site, print out 20 to 30 pages of the really good stuff, put that in my magical book of tricks (old 3 ring binders, dozens based on different daemons) and use it that way.

      I subscribe to other sites (including pay) and strongly prefer that method to get my info. I will still buy books, but stuff like this is best for subscription.

      --
      Tequila: It's not just for breakfast anymore!
    2. Re:how many hack books do i need to buy? by arvindn · · Score: 5, Insightful
      Personally, I don't like online books too much. I'd rather be able to kick back and drink a beer and read. Can't do that with a 19" CRT.

      But you can't use the code snippets directly from a paper book. And dead trees can't be grepped.

  2. If you save me time you make me a better admin by Anonymous Coward · · Score: 2, Insightful

    The book will probably not make you a better admin, but it will almost certainly save you some time

    More time for recreation makes me a better admin. More time for automation and documentation makes me a better admin. And, of course, more time for Slashdot makes me a better admin.

  3. Re:You'll need a book by Anonymous Coward · · Score: 2, Insightful

    Since they don't work out of the box like Microsoft products, you gotta buy a fucking book to kludge them together before you can use them.

    Yea, everyone knows that Windows users are the KeWl3sT anyway, right?

    Idiots like you are just as bad as the Windows bashers. I use both. I like both. Both piss me off in some ways, delight me in others. Anyone who can't see value in both are just blind or stupid. Now go crawl back under your rock and die a miserable death.

    Punk.

  4. Gosh the negativity... by ACK!! · · Score: 2, Insightful

    Like there aren't books for Windows folks for tricks you can pull to make your life easier on a Windows box? Aren't there are a bunch of classes available for MCSE types?

    Yeah, you might want the book if you had not already thought of some of these tricks. That is the point of reading and learning, duh!

    Give me a break. Every admin knows there are little things that can be automated and worked from a base install to help them get through the day and get their stuff done no matter what OS you admin.

    I propose this to the community. What is the neatest hack/trick that saves time from your day in terms of programming or system administration?

    BTW, any tricks I don't care if they are straight commercial Unix, Linux or Windows.

    --
    ACK /ak/ interj. 2. [from the comic strip "Bloom County"] An exclamation of surprised disgust, esp. i
  5. huh? by JeanBaptiste · · Score: 3, Insightful
    The book will probably not make you a better admin, but it will almost certainly save you some time

    That sentance does not make any sense. If it saves you time, then wouldn't you be a better admin?
  6. Re:t is also not a book which will teach you by BuckaBooBob · · Score: 2, Insightful

    It is also not a book which will teach you how to break into Linux servers.

    Then what good is it!?

    God I hate seeing Comments like this on here...

    But i have noticed a few recent stories that use the term "Hack" correctly... Its the media that a corrupted the meaning of Hack to breaking into systems.

    --
    Who needs WiFi when we can have Packet Over Sheep! http://datacomm.org/PoS-InternetDraft.txt