Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Linux Server Hacks
A Note Regarding Supplemental Files
How to Become a Hacker
The Hacker Attitude
1. 1. The world is full of fascinating problems waiting to be solved.
2. 2. No problem should ever have to be solved twice.
3. 3. Boredom and drudgery are evil.
4. 4. Freedom is good.
5. 5. Attitude is no substitute for competence.
Preface
How This Book is Organized
How to Use This Book
Conventions Used in This Book
How to Contact Us
Gotta Hack?
Credits
Acknowledgments
1. Server Basics
1.1. Hacks #1-22
Hack #1. Removing Unnecessary Services
1.1. See also:
Hack #2. Forgoing the Console Login
Hack #3. Common Boot Parameters
37. See also:
Hack #4. Creating a Persistent Daemon with init
4.1. See also:
Hack #5. n>&m: Swap Standard Output and Standard Error
Hack #6. Building Complex Command Lines
6.1. Hacking the Hack
Hack #7. Working with Tricky Files in xargs
7.1. Listing: albumize
Hack #8. Immutable Files in ext2/ext3
Hack #9. Speeding Up Compiles
Hack #10. At Home in Your Shell Environment
Hack #11. Finding and Eliminating setuid/setgid Binaries
Hack #12. Make sudo Work Harder
Hack #13. Using a Makefile to Automate Admin Tasks
13.1. Listing: Makefile.mail
13.2. Listing: Makefile.push
Hack #14. Brute Forcing Your New Domain Name
Hack #15. Playing Hunt the Disk Hog
Hack #16. Fun with /proc
Hack #17. Manipulating Processes Symbolically with procps
17.1. See also:
Hack #18. Managing System Resources per Process
18.1. See also:
Hack #19. Cleaning Up after Ex-Users
Hack #20. Eliminating Unnecessary Drivers from the Kernel
20.1. See also:
Hack #21. Using Large Amounts of RAM
Hack #22. hdparm: Fine Tune IDE Drive Parameters
2. Revision Control
2.1. Hacks #23-36
Hack #23. Getting Started with RCS
Hack #24. Checking Out a Previous Revision in RCS
Hack #25. Tracking Changes with rcs2log
Hack #26. Getting Started with CVS
26.1. Typical Uses
26.2. Creating a Repository
26.3. Importing a New Module
26.4. Environment Variables
26.5. See Also:
Hack #27. CVS: Checking Out a Module
Hack #28. CVS: Updating Your Working Copy
Hack #29. CVS: Using Tags
Hack #30. CVS: Making Changes to a Module
Hack #31. CVS: Merging Files
Hack #32. CVS: Adding and Removing Files and Directories
32.1. Removing Files
32.2. Removing Directories
Hack #33. CVS: Branching Development
Hack #34. CVS: Watching and Locking Files
Hack #35. CVS: Keeping CVS Secure
35.1. Remote Repositories
35.2. Permissions
35.3. Developer Machines
Hack #36. CVS: Anonymous Repositories
36.1. Creating an Anonymous Repository
36.2. Installing pserver
36.3. Using a Remote pserver
3. Backups
3.1. Hacks #37-44
Hack #37. Backing Up with tar over ssh
37.1. See also:
Hack #38. Using rsync over ssh
38.1. See also:
Hack #39. Archiving with Pax
39.1. Creating Archives
39.2. Expanding Archives
39.3. Interactive Restores
39.4. Recursively Copy a Directory
39.5. Incremental Backups
39.6. Skipping Files on Restore
39.7. See also:
Hack #40. Backing Up Your Boot Sector
40.1. See also:
Hack #41. Keeping Parts of Filesystems in sync with rsync
41.1. Listing: Balance-push.sh
Hack #42. Automated Snapshot-Style Incremental Backups with rsync
42.1. Extensions: Hourly, Daily, and Weekly Snapshots
42.2. Listing: make_snapshot.sh
42.3. Listing: Daily_snapshot_rotate.sh
42.4. Sample Output of ls -l /snapshot/home
42.5. See also:
Hack #43. Working with ISOs and CDR/CDRWs
43.1. See also:
Hack #44. Burning a CD Without Creating an ISO File
4. Networking
4.1. Hacks #45-53
Hack #45. Creating a Firewall from the Command Line of any Server
45.1. See also:
Hack #46. Simple IP Masquerading
46.1. See also:
Hack #47. iptables Tips & Tricks
47.1. Advanced iptables Features
47.2. See also:
Hack #48. Forwarding TCP Ports to Arbitrary Machines
48.1. See also:
Hack #49. Using Custom Chains in iptables
49.1. See also:
Hack #50. Tunneling: IPIP Encapsulation
50.1. See also:
Hack #51. Tunneling: GRE Encapsulation
51.1. See also:
Hack #52. Using vtun over ssh to Circumvent NAT
52.1. See also:
Hack #53. Automatic vtund.conf Generator
53.1. Listing: vtundconf
5. Monitoring
5.1. Hacks #54-65
Hack #54. Steering syslog
54.1. Mark Who?
54.2. Remote Logging
Hack #55. Watching Jobs with watch
55.1. See also:
Hack #56. What's Holding That Port Open?
Hack #57. Checking On Open Files and Sockets with lsof
57.1. See also:
Hack #58. Monitor System Resources with top
58.1. See also:
Hack #59. Constant Load Average Display in the Titlebar
59.1. Listing: tl
Hack #60. Network Monitoring with ngrep
60.1. Listing: go-ogle
60.2. See also:
Hack #61. Scanning Your Own Machines with nmap
61.1. See also:
Hack #62. Disk Age Analysis
62.1. Listing: diskage
Hack #63. Cheap IP Takeover
63.1. Listing: takeover
63.2. See also:
Hack #64. Running ntop for Real-Time Network Stats
64.1. See also:
Hack #65. Monitoring Web Traffic in Real Time with httptop
65.1. Listing: httptop
6. SSH
6.1. Hacks #66-71
Hack #66. Quick Logins with ssh Client Keys
66.1. Security Concerns
66.2. See Also:
Hack #67. Turbo-mode ssh Logins
67.1. See also:
Hack #68. Using ssh-Agent Effectively
Hack #69. Running the ssh-Agent in a GUI
69.1. See Also:
Hack #70. X over ssh
70.1. See also:
Hack #71. Forwarding Ports over ssh
71.1. See also:
7. Scripting
7.1. Hacks #72-75
Hack #72. Get Settled in Quickly with movein.sh
72.1. Listing: movein.sh
72.2. See also:
Hack #73. Global Search and Replace with Perl
73.1. See also:
Hack #74. Mincing Your Data into Arbitrary Chunks (in bash)
74.1. Listing: mince
Hack #75. Colorized Log Analysis in Your Terminal
8. Information Servers
8.1. Hacks #76-100
Hack #76. Running BIND in a chroot Jail
76.1. See also:
Hack #77. Views in BIND 9
77.1. Basic Syntax
77.2. Defining Zones in Views
77.3. Views in Slave Name Servers
Hack #78. Setting Up Caching DNS with Authority for Local Domains
78.1. See also:
Hack #79. Distributing Server Load with Round-Robin DNS
79.1. See also:
Hack #80. Running Your Own Top-Level Domain
Hack #81. Monitoring MySQL Health with mtop
81.1. See also:
Hack #82. Setting Up Replication in MySQL
82.1. See also:
Hack #83. Restoring a Single Table from a Large MySQL Dump
Hack #84. MySQL Server Tuning
84.1. See also:
Hack #85. Using proftpd with a mysql Authentication Source
85.1. See also:
Hack #86. Optimizing glibc, linuxthreads, and the Kernel for a Super MySQL Server
86.1. Step 1: Build glib
86.2. Step 2: The Kernel
86.3. Step 3: Build a New MySQL
86.4. Step 4: Expand the Maximum Filehandles at Boot
Hack #87. Apache Toolbox
87.1. See Also:
Hack #88. Display the Full Filename in Indexes
Hack #89. Quick Configuration Changes with IfDefine
Hack #90. Simplistic Ad Referral Tracking
90.1. Listing: referral-report.pl
Hack #91. Mimicking FTP Servers with Apache
Hack #92. Rotate and compress Apache Server Logs
92.1. Listing: logflume.pl
Hack #93. Generating an SSL cert and Certificate Signing Request
93.1. See also:
Hack #94. Creating Your Own CA
94.1. See also:
Hack #95. Distributing Your CA to Client Browsers
95.1. See also:
Hack #96. Serving multiple sites with the same DocumentRoot
Hack #97. Delivering Content Based on the Query String Using mod_rewrite
97.1. See also:
Hack #98. Using mod_proxy on Apache for Speed
Hack #99. Distributing Load with Apache RewriteMap
99.1. See Also:
Hack #100. Ultrahosting: Mass Web Site Hosting with Wildcards, Proxy, and Rewrite
About the Author
Colophon
← Prev
Back
Next →
← Prev
Back
Next →