Linux Server Hacks: 100 Industrial-Strength Tips and Tools
Format: PDF / Kindle (mobi) / ePub
A competent system administrator knows that a Linux server is a high performance system for routing large amounts of information through a network connection. Setting up and maintaining a Linux server requires understanding not only the hardware, but the ins and outs of the Linux operating system along with its supporting cast of utilities as well as layers of applications software. There's basic documentation online but there's a lot beyond the basics you have to know, and this only comes from people with hands-on, real-world experience. This kind of "know how" is what we sought to capture in Linux Server Hacks.Linux Server Hacks is a collection of 100 industrial-strength hacks, providing tips and tools that solve practical problems for Linux system administrators. Every hack can be read in just a few minutes but will save hours of searching for the right answer. Some of the hacks are subtle, many of them are non-obvious, and all of them demonstrate the power and flexibility of a Linux system. You'll find hacks devoted to tuning the Linux kernel to make your system run more efficiently, as well as using CVS or RCS to track the revision to system files. You'll learn alternative ways to do backups, how to use system monitoring tools to track system performance and a variety of secure networking solutions. Linux Server Hacks also helps you manage large-scale Web installations running Apache, MySQL, and other open source tools that are typically part of a Linux system.O'Reilly's new Hacks Series proudly reclaims the term "hacking" for the good guys. Hackers use their ingenuity to solve interesting problems. Rob Flickenger is an experienced system administrator, having managed the systems for O'Reilly Network for several years. (He's also into community wireless networking and he's written a book on that subject for O'Reilly.) Rob has also collected the best ideas and tools from a number of other highly skilled contributors.Written for users who already understand the basics, Linux Server Hacks is built upon the expertise of people who really know what they're doing.
to the drivers under /lib/modules. Some admins even prefer to build a kernel with no loadable module support at all, to discourage the possibility of Trojan horse device drivers being loaded by a random miscreant down the road. On the other hand, if a new piece of hardware is added to the system, then you will need to rebuild your kernel to accommodate it. If you use loadable modules, then you have enormous flexibility in how you load device drivers. You can alter the order that drivers load and
example, suppose we have a machine with 2GB RAM installed. If you’re using Lilo, add this line to /etc/lilo.conf: append="mem=2048M" If you’re using Grub, try this in your /etc/grub.conf: kernel /boot/vmlinuz-2.4.19 mem=2048M If you’re running loadlin, just pass it on the loadlin line: c:\loadlin c:\kernel\vmlinuz root=/dev/hda3 ro mem=2048M Although, if you’re running loadlin, why are you reading a book on Linux Server Hacks? ;) hdparm: Fine Tune IDE Drive Parameters Get the
edit|unedit|commit|all (files) cvs watch remove -a edit|unedit|commit|all (files) The special CVS file notify determines what occurs when a watched file is changed. It defaults to sending mail to the user’s username on the CVS server. If your users have other addresses, set up the file users in the repository’s CVSROOT directory. Entries should be in the format user:email, one to a line. jenn:firstname.lastname@example.org CVS: Keeping CVS Secure Protecting your users and your code base in
Nmap run completed -- 1 IP address (1 host up) scanned in 31 seconds If you’d like to nmap your entire network and have a bit of time to kill, you can specify a network and subnet on the command line. This performs a TCP SYN scan and fingerprinting for the first 64 addresses of 10.42.4.0: root@catlin:~# nmap -OsS 10.42.4.0/26 Since nmap prints to STDOUT, you can save the output of a scan run and compare it against previous runs for a differential report, quite easily. We’ll run an Xmas tree
modern Zen poem has it: To follow the path: look to the master, follow the master, walk with the master, see through the master, become the master. So if you want to be a hacker, repeat the following things until you believe them. 1. The world is full of fascinating problems waiting to be solved. Being a hacker is a lot of fun, but it’s a kind of fun that takes a lot of effort. The effort takes motivation. Successful athletes get their motivation from a kind of physical delight