I’m just finishing up Linux Server Hacks. Even with a few years of Linux experience under my belt, I found several handy hacks.
O’Reilly’s Hacks Series bill themselves as “Clever solutions to interesting problems”, which I’ll agree with. The topics presented in the book aren’t generally introductory topics, instead they’re solutions to specific problems that a systems administrator runs into. For the most part, the hacks are designed to make a complex and common task quicker or easier to do.
One item of note is that the book is devoted to server functions, so you’ll find few mentions of anything GUIsh.
Linux Server Hacks has 100 hacks, divided into 8 distinct topic areas. The first is “Server Basics”, covering common administrative tasks a server admin runs into. Examples here are “Finding Disk Hogs”, and the best explanation of bash filehandle redirection (ie 2>&1) I’ve come across.
Chapter 2, Revision Control, covers both RCS and CVS, with an eye to keeping version history of system files. While there is very little “clever hacking” going on here, this chapter does exemplify the specific, problem driven nature of the book, ie this isn’t a man page, it’s a concise list of instructions to accomplish a task.
Chapter 3, Backups, has some interesting hacks to make copies of data, such as how to keep web clusters in sync, quick and dirty network backups, and CD burning techniques (including copying a web site directly to CD, which isn’t recommended).
As a network guy, the next chapter, Networking, was of particular interest. The first couple of hacks on iptables are nothing new, but the rest of the chapter investigates various techniques for building tunnels between machine, and port forwarding techniques.
An important task to any administrator, Monitoring, is way more than simply running “top” (though there is a hack for that). There are several scripts and programs to watch logs, processes, network traffic, and web server usage. There is also a brilliant hack called “Cheap IP Takeover”, which lets you cluster two machines together with one taking over the ip address of another in the event of a failure.
Chapter 6, SSH, shows off some advanced features of the tool, from securing passwordless logins across multiple machines, to forwarding ports and X-Windows. Even after using SSH for years, I found some ways to be more efficient after reading these six short hacks.
I must admit that the Scripting chapter is nothing to write home about, but the next chapter, “Information servers”, has lots of handy hacks for BIND, MySQL, and Apache. Apache hacks in particular are abundant.
All told, this book contains a significant number of tips and tricks that will make an experienced administrator’s work all the more efficient. The wroting style is easy to follow, and the organization of the book makes it easy to find what you want.
One minor point of irritation, though. While there are many examples of code (shell and Perl), they are displayed completely left justified with no indentation. People reading the code to analyze it will become quickly frustrated trying to track down the ending brackets, especially in the multi-page samples.
“Linux Server Hacks” is an excellent book for the experienced admin looking to increase efficiency. There are lots of helpful pieces of information in here. This book is definately not for the newbie, however!
Check out the home page for the book for the table of contents and a handful of sample hacks.