Friday, March 5, 2010

2010 Book Reading: Linux Server Hacks

I have a long list of books I want to go through this year to increase my exposure and skill set with Linux and programming. I picked up Linux Server Hacks long ago and never read it. I was too busy taking astronomy courses and doing research. It is the first edition (and as of now the only edition), published in 2003.

It is amazing what happens over the course of seven years. While many of the concepts are as applicable now as they were then, the way they are being done has changed. For example in Chapter 1, the book talks about some great tricks using tar and ssh which I'm sure will come in handy in the future. But the chapter also talks about LILO which I have not seen since I switched from a pink and purple distro named Mandrake to a more exciting orange distro named Ubuntu. However these hacks are easily converted to use in GRUB.

Chapter 2 talks about version control, mostly CVS. I used CVS once in my travels through space and time, and I used Git while at Guru Labs. It was interesting to read, but didn't apply to anything I'm using at the moment. Chapter 3 talks about backups and combined together a few things I knew about like rsync and other tools. I've already used a few tips from this chapter. Chapter 4 discusses networking. Most topics that interested me I am already aware of and using from my previous experience, but review is always good.

Chapter 5 gets into system monitoring including system logs, finding programs which are holding a port open, network monitoring, and monitoring an aging disk. All good things to know about. The book even shows you how to display your load average in the titlebar of your command window. Chapter 6 goes over some ssh tricks, many which I was already using. However reviewing port forwarding with ssh is always good since every time I do it, I have to go relearn how. Chapter 7 has some tips for scripting. There is an example script that helps a user move all their preferences and settings onto a new user. I've plucked a few ideas from this for my own use.

Chapter 8 gives tips for information services such as BIND, MySQL, and Apache. The book shows how to configure BIND to run in a chroot jail. Although these days (at least in RHEL and Fedora), you just install the rpm. Talk about taking the fun out of it. For some MySQL and Apache tips, the book talks about setting up replication across multiple servers for these applications. Again time has caught up with the book since it was published. These days the high load applications servers I've seen use clustered file systems. Other tips in this chapter include creating and distributing your own Certificate Authority and distributing load with Apache RewriteMap.

Overall, the book is valuable even seven years after it was published. Some of the technologies and applications have changed over the years, but seeing how it is (was) done is still a valuable learning experience. Several of the tips are "this is a cool script that does X" (available online). Unfortunately, I felt explanation for some of the scripts is a bit lacking. Overall for me, it was a good read.

Next book: Learning the Bash Shell. Or maybe Sed and Awk.

2 comments:

  1. If you are thinking about Sed and Awk, I'd recommend learning a scripting language instead. Sure there are times when sed/awk do the job, but when things get complicated or cross platform, scripting is the way to go.

    I'd recommend Python, but there are others that are pretty good too ;)

    ReplyDelete
  2. I did some Python in graduate school. Enough that I turned a day of work into 30 seconds of number crunching. I loved it.

    I want to pick up the 4th edition of Learning Python and read about version 3.0. And Programming Python has been on my radar for some time.

    ReplyDelete