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.

13 of 146 comments (clear)

  1. Developer lashes out: What Killed FreeBSD by Anonymous Coward · · Score: -1, Offtopic
    The End of FreeBSD

    [ed. note: in the following text, former FreeBSD developer Mike Smith gives his reasons for abandoning FreeBSD]

    When I stood for election to the FreeBSD core team nearly two years ago, many of you will recall that it was after a long series of debates during which I maintained that too much organisation, too many rules and too much formality would be a bad thing for the project.

    Today, as I read the latest discussions on the future of the FreeBSD project, I see the same problem; a few new faces and many of the old going over the same tired arguments and suggesting variations on the same worthless schemes. Frankly I'm sick of it.

    FreeBSD used to be fun. It used to be about doing things the right way. It used to be something that you could sink your teeth into when the mundane chores of programming for a living got you down. It was something cool and exciting; a way to spend your spare time on an endeavour you loved that was at the same time wholesome and worthwhile.

    It's not anymore. It's about bylaws and committees and reports and milestones, telling others what to do and doing what you're told. It's about who can rant the longest or shout the loudest or mislead the most people into a bloc in order to legitimise doing what they think is best. Individuals notwithstanding, the project as a whole has lost track of where it's going, and has instead become obsessed with process and mechanics.

    So I'm leaving core. I don't want to feel like I should be "doing something" about a project that has lost interest in having something done for it. I don't have the energy to fight what has clearly become a losing battle; I have a life to live and a job to keep, and I won't achieve any of the goals I personally consider worthwhile if I remain obligated to care for the project.

    Discussion

    I'm sure that I've offended some people already; I'm sure that by the time I'm done here, I'll have offended more. If you feel a need to play to the crowd in your replies rather than make a sincere effort to address the problems I'm discussing here, please do us the courtesy of playing your politics openly.

    From a technical perspective, the project faces a set of challenges that significantly outstrips our ability to deliver. Some of the resources that we need to address these challenges are tied up in the fruitless metadiscussions that have raged since we made the mistake of electing officers. Others have left in disgust, or been driven out by the culture of abuse and distraction that has grown up since then. More may well remain available to recruitment, but while the project is busy infighting our chances for successful outreach are sorely diminished.

    There's no simple solution to this. For the project to move forward, one or the other of the warring philosophies must win out; either the project returns to its laid-back roots and gets on with the work, or it transforms into a super-organised engineering project and executes a brilliant plan to deliver what, ultimately, we all know we want.

    Whatever path is chosen, whatever balance is struck, the choosing and the striking are the important parts. The current indecision and endless conflict are incompatible with any sort of progress.

    Trying to dissect the above is far beyond the scope of any parting shot, no matter how distended. All I can really ask of you all is to let go of the minutiae for a moment and take a look at the big picture. What is the ultimate goal here? How can we get there with as little overhead as possible? How would you like to be treated by your fellow travellers?

    Shouts

    To the Slashdot "BSD is dying" crowd - big deal. Death is part of the cycle; take a look at your soft, pallid bodies and consider that right this very moment, parts of you are dying. See? It's not so bad.

    To the bulk of the FreeBSD committerbase and the developer community at large - keep your eyes on the real goals. It

  2. Stephen King, author, dead at 54 too!!! by Anonymous Coward · · Score: -1, Offtopic

    I just heard some sad news on talk radio - Horror/Sci Fi writer Stephen King was found dead in his Maine home this morning. There weren't any more details. I'm sure everyone in the Slashdot community will miss him - even if you didn't enjoy his work, there's no denying his contributions to popular culture. Truly an American icon.

    1. Re:Stephen King, author, dead at 54 too!!! by Anonymous Coward · · Score: -1, Offtopic

      I just heard some sad news on talk radio - professional idiot George W. Bush was found dead in his Washington home this morning. There weren't any more details. I'm sure everyone in the Slashdot community will miss him - even if you didn't enjoy his stand up comedy shows, there's no denying his contributions to popular culture. Truly an American icon.

  3. The Futility of Slashdot's Business Model. by Anonymous Coward · · Score: -1, Offtopic



    Fuck Subscription!

    J U N K B U S T E R

    Just say NO to annoying StinkGeek banners and in-line 200x200 pixel "Do YOU have reliable [foo]....? Then you NEED SourceForge(TM) Enterprise Edition 2003....Order today!"-esque ads.

    Rob Nambla, Homos, CowboiKneel, Gayme, et al...: Get real fuckin' jobs!

    Thank you.

    1. Re:The Futility of Slashdot's Business Model. by larry+bagina · · Score: -1, Offtopic

      Hopefully, when CmdrTaco and Hemos are working the register at burger king, we'll get duplicate hamburgers.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

  4. Iraqi TV told the truth for once by Anonymous Coward · · Score: -1, Offtopic

    "Little Bush appeared as an idiot as he was addressing the Americans. He adopted his well-known method of making false assumptions... His justifications began with an incoherent argument that Iraq possesses weapons of mass destruction. Bush, the idiot, knows well that Iraq is free of such weapons...

    "Bush himself proved his guilt in his latest speech. He naively feigned care for the world. He came out with allegations created in his sick imagination. Those false allegations are not believed by anybody... Even worse, he portrayed Iraq as a monster threatening the world. Yet the world is telling Bush: 'No to your aggression against Iraq, no to Bush the foolish one, who is threatening to drown the world in an ocean of innocent blood'.

    "The idiocy of this little man does not stop at making fabrications and feigning concern for the destiny of mankind, as though he were the absolute custodian of humanity, while his intent is to bring killing, destruction and death to humanity.

    "This idiocy is mainly caused by his sense of inferiority whenever he thinks of leader Saddam Hussein, or whenever the leader appears on television screens. He sees how our leader is fully capable and full of resolve, wisdom, and adroitness when he addresses his people and reminds them of their glorious past...

    "In his speech, Bush not only appeared as an idiot, but also as a failure, for he imagined that his evil intentions would be achieved easily, without fighting, but rather through terrorism and intimidation. This was caused by his international isolation, which is unprecedented...

    "To the deluded and stupid Bush we say: If your Zionist devil made you believe otherwise, then you must be deluded. The great people of Iraq have said their word and chanted with a joint and faithful voice: 'Yes to leader Saddam Hussein; Bush, Bush, listen well, we all love Saddam Hussein'... Iraq is the graveyard of invaders at all times and under all circumstances."

  5. Let me get this straight... by Anonymous Coward · · Score: -1, Offtopic

    The worst terrorist attack in recorded history occurred in September 2001, followed by a WAR against Islam in Afghanistan and now we're about to be involved in ANOTHER war against Islam in Iraq, and you people have the gall to be discussing Linux server hacks???? My *god*, people, GET SOME PRIORITIES!

    The bodies of the thousands of innocent civilians who died (and will die) in these unprecedented events could give a good god damn about obscure science fiction, your childish Lego models, your nerf toy guns and whining about the lack of a "fun" workplace, your Everquest/Diablo/D&D fixation, the latest Cowboy Bebop rerun, or any of the other ways you are "getting on with your life" (here's a hint: watching Cowboy Bebop in your jammies and eating a bowl of Shreddies is *not* "getting on with your life"). The souls of the victims are watching in horror as you people squander your finite, precious time on this earth playing video games!

    You people disgust me!

    1. Re:Let me get this straight... by kryliss · · Score: 0, Offtopic

      And we are supposed to have this take over our whole life right? We can't do anything but sit infront of the TV and watch for the Next "Hoe-down in Iraq with Wolf Blitzer?" Excuse us for doing what the Pres recomended ==> "GET ON WITH YOUR LIFE AS NORMAL!" Not everyone is going to let this crap in Iraq take over their life.

      --
      --- If the bible proves the existence of God, then Superman comics prove the existence of Superman.
    2. Re:Let me get this straight... by Anonymous Coward · · Score: -1, Offtopic

      Yes. Of course we care - many of us just happen to AGREE with the current policies - and war. Things are progressing spendidly if you ask me. Down with terrorists and their enablers! Now - back to the book...

  6. Re:Fine book by Anonymous Coward · · Score: -1, Offtopic

    So go back to activewin you fucktard.

  7. Saddam Hussein, leader, dead at 54 by Anonymous Coward · · Score: -1, Offtopic

    I just heard some sad news on talk radio - Iraqi president (undisputed holder of the popular vote) Saddam Hussein, was found dead in his Baghdad presidential palace this morning. There weren't any more details. I'm sure everyone in the Slashdot community will miss him - even if you didn't enjoy his work, there's no denying his contributions to popular culture. Truly an Iraqi icon.

  8. Re:how many hack books do i need to buy? by zootread · · Score: 0, Offtopic

    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.

    Ah.. But with online books, you can kick back and smoke a joint and read. Can't do that with... oh wait, nevermind.

    --
    Zoot!
  9. Yahoo had a similar article... by Anonymous Coward · · Score: -1, Offtopic