𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

Linux Server Hacks: 100 Industrial-Strength Tips and Tools

✍ Scribed by Rob Flickenger


Publisher
O'Reilly Media
Year
2003
Tongue
English
Leaves
242
Edition
1
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


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.

✦ Table of Contents


Contents......Page 5
Contributors......Page 9
Acknowledgments......Page 10
How to Become a Hacker......Page 11
1. The world is full of fascinating problems waiting to be solved.......Page 12
4. Freedom is good.......Page 13
5. Attitude is no substitute for competence.......Page 14
Preface......Page 15
How This Book Is Organized......Page 16
How to Use This Book......Page 17
How to Contact Us......Page 18
Gotta Hack?......Page 19
Server Basics......Page 21
Removing Unnecessary Services......Page 23
Forgoing the Console Login......Page 26
Common Boot Parameters......Page 27
Creating a Persistent Daemon with init......Page 29
n>&m: Swap Standard Output and StandardError......Page 30
Building Complex Command Lines......Page 32
Working with Tricky Files in xargs......Page 35
Listing: albumize......Page 36
Immutable Files in ext2/ext3......Page 37
Speeding Up Compiles......Page 39
At Home in Your Shell Environment......Page 40
Finding and Eliminating setuid/setgid Binaries......Page 43
Make sudo Work Harder......Page 45
Listing: Makefile.mail......Page 47
Listing: Makefile.push......Page 48
Brute Forcing Your New Domain Name......Page 49
Playing Hunt the Disk Hog......Page 50
Fun with /proc......Page 51
Manipulating Processes Symbolically withprocps......Page 54
Managing System Resources per Process......Page 56
Cleaning Up after Ex-Users......Page 58
Eliminating Unnecessary Drivers from the Kernel......Page 60
Using Large Amounts of RAM......Page 62
hdparm: Fine Tune IDE Drive Parameters......Page 63
Revision Control......Page 67
Getting Started with RCS......Page 68
Checking Out a Previous Revision in RCS......Page 69
Tracking Changes with rcs2log......Page 70
Typical Uses......Page 72
Importing a New Module......Page 73
CVS: Checking Out a Module......Page 74
CVS: Updating Your Working Copy......Page 75
CVS: Using Tags......Page 76
CVS: Making Changes to a Module......Page 77
Removing Files......Page 78
CVS: Branching Development......Page 79
Remote Repositories......Page 80
Developer Machines......Page 81
Installing pserver......Page 82
Using a Remote pserver......Page 83
Backups......Page 84
Backing Up with tar over ssh......Page 85
Using rsync over ssh......Page 86
Creating Archives......Page 87
Expanding Archives......Page 88
Interactive Restores......Page 89
Recursively Copy a Directory......Page 90
Incremental Backups......Page 91
Backing Up Your Boot Sector......Page 92
Keeping Parts of Filesystems in sync with rsync......Page 94
Listing: Balance-push.sh......Page 97
Automated Snapshot-Style Incremental Backups with rsync......Page 99
Extensions: Hourly, Daily, and Weekly Snapshots......Page 100
Listing: make_snapshot.sh......Page 101
Listing: Daily_snapshot_rotate.sh......Page 103
Working with ISOs and CDR/CDRWs......Page 104
Burning a CD Without Creating an ISO File......Page 106
Creating a Firewall from the Command Line of any Server......Page 108
Simple IP Masquerading......Page 111
iptables Tips & Tricks......Page 112
Advanced iptables Features......Page 113
Forwarding TCP Ports to Arbitrary Machines......Page 114
See also:......Page 115
Using Custom Chains in iptables......Page 116
Tunneling: IPIP Encapsulation......Page 117
Tunneling: GRE Encapsulation......Page 119
Using vtun over ssh to Circumvent NAT......Page 121
Automatic vtund.conf Generator......Page 126
Listing: vtundconf......Page 127
Steering syslog......Page 131
Remote Logging......Page 133
Watching Jobs with watch......Page 134
What’s Holding That Port Open?......Page 135
Checking On Open Files and Sockets with lsof......Page 136
Monitor System Resources with top......Page 139
Listing: tl......Page 140
Network Monitoring with ngrep......Page 141
Listing: go-ogle......Page 142
Scanning Your Own Machines with nmap......Page 143
Listing: diskage......Page 145
Cheap IP Takeover......Page 147
Listing: takeover......Page 148
Running ntop for Real-Time Network Stats......Page 149
See also:......Page 151
Monitoring Web Traffic in Real Time with httptop......Page 152
Listing: httptop......Page 153
Quick Logins with ssh Client Keys......Page 159
Security Concerns......Page 160
Turbo-mode ssh Logins......Page 161
Using ssh-Agent Effectively......Page 162
See Also:......Page 164
X over ssh......Page 165
Forwarding Ports over ssh......Page 166
See also:......Page 168
Get Settled in Quickly with movein.sh......Page 169
Listing: movein.sh......Page 170
Global Search and Replace with Perl......Page 171
Mincing Your Data into Arbitrary Chunks (in bash)......Page 173
Listing: mince......Page 174
Colorized Log Analysis in Your Terminal......Page 175
Information Servers......Page 177
Running BIND in a chroot Jail......Page 178
Basic Syntax......Page 180
Defining Zones in Views......Page 182
Views in Slave Name Servers......Page 183
Setting Up Caching DNS with Authority for Local Domains......Page 185
See also:......Page 186
Distributing Server Load with Round-Robin DNS......Page 187
Running Your Own Top-Level Domain......Page 188
Monitoring MySQL Health with mtop......Page 189
See also:......Page 191
Setting Up Replication in MySQL......Page 192
See also:......Page 194
MySQL Server Tuning......Page 195
See also:......Page 197
Using proftpd with a mysql Authentication Source......Page 198
Optimizing glibc, linuxthreads, and the Kernel for a Super MySQL Server......Page 200
Step 4: Expand the Maximum Filehandles at Boot......Page 201
Apache Toolbox......Page 202
Display the Full Filename in Indexes......Page 205
Quick Configuration Changes with IfDefine......Page 206
Simplistic Ad Referral Tracking......Page 208
Listing: referral-report.pl......Page 210
Mimicking FTP Servers with Apache......Page 211
Listing: logflume.pl......Page 213
Generating an SSL cert and Certificate Signing Request......Page 214
Creating Your Own CA......Page 216
See also:......Page 218
Distributing Your CA to Client Browsers......Page 219
See also:......Page 220
Serving multiple sites with the same DocumentRoot......Page 221
Delivering Content Based on the Query String Using mod_rewrite......Page 223
Using mod_proxy on Apache for Speed......Page 224
Distributing Load with Apache RewriteMap......Page 226
Ultrahosting: Mass Web Site Hosting with Wildcards, Proxy, and Rewrite......Page 228
Index......Page 233


πŸ“œ SIMILAR VOLUMES


Linux Server Hacks: 100 Industrial-Stren
✍ Rob Flickenger πŸ“‚ Library πŸ“… 2003 πŸ› O'Reilly Media 🌐 English

The tips are very useful in datacenter, daily. This tips & tools about the things inside Linux O/S, such as: Linux administration basic, backup, networking, SSH, Scripting, DNS.

Linux Server Hacks: 100 Industrial-Stren
✍ Rob Flickenger πŸ“‚ Library πŸ“… 2003 πŸ› O'Reilly Media 🌐 English

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 a

Linux Server Hacks: 100 Industrial-Stren
✍ Rob Flickenger πŸ“‚ Library πŸ“… 2003 πŸ› O'Reilly Media 🌐 English

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 a

Linux Server Hacks: 100 Industrial-Stren
✍ Rob Flickenger πŸ“‚ Library πŸ“… 2003 πŸ› O'Reilly Media 🌐 English

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 al

Linux Server Hacks: 100 Industrial-Stren
✍ Rob Flickenger πŸ“‚ Library πŸ“… 2003 πŸ› O'Reilly Media 🌐 English

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 y