Linux Journal | June 2010 | Issue
Total Page:16
File Type:pdf, Size:1020Kb
MongoDB | OpenVPN | Nmap | Pogoplug | MINIX | Tech Tips LINUX JOURNAL ™ Organize Your Library MongoDB’s DISTRIBUTIONS High-Powered Features Automate Since 1994: The Original Magazine of the Linux Community Remote Backups JUNE 2010 | ISSUE 194 | www.linuxjournal.com MongoDB | OpenVPN | Nmap | Pogoplug | MINIXMongoDB | OpenVPN Nmap Pogoplug | MilkyTracker Tips | Tech DISTRIBUTIONS REVIEWED: Pogoplug LINUX ON File Server NON-X86 COMPUTERS JUNE 2010 ISSUE 194 QUICK DISTRO HISTORY LESSON + $5.99US $5.99CAN Point/ 06 Philosophy Counterpoint: of Distributions MOBILE PHONES 0 09281 03102 4 Your Applications Will Run Faster With Next Generation Microway Solutions! TriCom™X Terafl op GPU Computing s1$2$$2)NlNI"AND(#! &OR7ORKSTATIONSAND(0##LUSTERS s#ONNECT8©4ECHNOLOGY s.6)$)!4ESLA©'05WITH#ORESON/NE#HIP s«SEC,ATENCY #5$!©3$+ s3WITCHLESS3ERIAL#ONSOLE s.6)$)!1UADRO0ROFESSIONAL'RAPHICS s.ODE7ATCH©2EMOTE-ANAGEMENT s!-$&IRE3TREAM©'05 3TREAM3$+WITH"ROOK (EADERSTOFANS VOLTAGES "-#INTERFACEAND TEMPERATURES /N/FFANDRESET SERIALCONSOLESWITCH 23 $AISY CHAINCONNECTORS )NlNI"ANDOR 'IG%CONNECTOR -ELLANOX#ONNECT8 )NlNI"AND(#! NumberSmasher® ,ARGE-EMORY3CALABLE3-03ERVER s 3CALESTO4"OF6IRTUAL ™ 3HARED-EMORY FasTree X s 5PTO#05#ORES s-ELLANOX)NlNI3CALE©)64ECHNOLOGY s 53YSTEM)NCLUDES s1$2$$2)NlNI"AND3WITCHES 1UAD#ORE#05S s-ODULAR$ESIGN s 1$2«SEC"ACKPLANE s'"SEC"ANDWIDTHPER0ORT s13&0)NTERCONNECTS s)NlNI3COPE©2EAL4IME$IAGNOSTICS Call the HPC Experts at Microway to Design Your Next High-Reliability Linux Cluster or Infi niBand Fabric. 508-746-7341 Sign up for Microway’s Newsletter at www.microway.com The 1&1 server totally confi gurable to your needs: DYNAMIC CLOUD SERVER A powerful virtual server environment with full root access. Adjust the processor core, RAM, and/or hard disk space to fi t your needs. With the Dynamic Cloud Server, you can change your specifi cations at any time! SPECIAL OFFER: 3 MONTHS FREE* 1&1® Dynamic Cloud Server – basic confi guration includes: ✔ 1 Virtual Core of a Quad-Core AMD Opteron™ 2352 Processor $ .99 per month ✔ 1 GB RAM 49 ✔ 100 GB disk space ✔ Guaranteed resources (just like a dedicated server!) More server offers are available online. Visit our website for details. * Offer valid as of May 1, 2010. Offer applies to Dynamic Cloud Servers only, up to a maximum discount of $149.97 per server. 12 month minimum contract term and setup fee apply. Prices valid for basic confi guration only. For other confi gurations, additional costs apply. Visit www.1and1.com for full promotional offer details. Program and pricing ® specifi cations and availability subject to change without notice. 1&1 and the 1&1 logo are the trademarks of 1&1 Internet AG, all other trademarks are the property of their respective owners ©2010 Internet, Inc. All rights reserved. Call 1-877-GO-1AND1 Visit us now www.1and1.com p01_1AND1.indd 1 4/12/10 12:19:55 PM JUNE 2010 CONTENTS Issue 194 FEATURES DISTRIBUTIONS 50 54 58 62 ON THE COVER DISTRIBUTIONS PHILOSOPHY SMALL SYSTEMS LINUX • Organize Your Library, p. 34 —A BRIEF AND FANCY AND BIG IRON: DISTRIBUTION • MongoDB's High-Powered Features, p. 18 The intellectual HISTORY LINUX ON CHART • Automate Remote Backups, p. 68 axes of The dawn of NON-X86 See how your • Linux on Non-x86 Computers, p. 58 distribution the distro. COMPUTERS favorite distro • Quick Distro History Lesson, p. 50 design. ranks with other Jes Fraser Linux distributions • Philosophy of Distributions, p. 54 LJ readers. Dan Sawyer on “alternative” • Reviewed: Pogoplug File Server, p. 46 platforms. Justin Ryan • Point/Counterpoint: Mobile Phones, p. 74 Kira Scarlett 2 | june 2010 www.linuxjournal.com The latest 1&1 server solution for high performance needs: HEXA-CORE TECHNOLOGY The ultimate in server technology, our powerful new hardware class is the perfect solution for running your resource-intensive NEW! applications. SPECIAL OFFER: 3 MONTHS FREE* 1&1® Hexa-Core Servers – using the latest generation of AMD six-core processors: ✔ 2 x Six-Core AMD Opteron™ 2423 HE Processor $ .99 Starting at per month ✔ Up to 32 GB memory 499 ✔ Up to 2 TB of usable disk space with RAID 5 ✔ Energy effi cient, AMD-P technology More server offers are available online. Visit our website for details. * Offer valid as of May 1, 2010. 12 month minimum contract term and setup fee apply. Visit www.1and1.com for full promotional offer details. Program and pricing specifications ® and availability subject to change without notice. 1&1 and the 1&1 logo are the trademarks of 1&1 Internet AG, all other trademarks are the property of their respective owners. ©2010 Internet, Inc. All rights reserved. Calls cost 6p per minute from a BT landline, calls Call 1-877-GO-1AND1from other operators and mobiles may be higher. Visit us now www.1and1.com p03_1AND1.indd 1 4/12/10 12:22:54 PM JUNE 2010 CONTENTS Issue 194 COLUMNS 18 REUVEN M. LERNER’S AT THE FORGE Advanced MongoDB 24 DAVE TAYLOR’S WORK THE SHELL Simple Scripts to Sophisticated HTML Forms 26 MICK BAUER’S PARANOID PENGUIN Linux VPNs with OpenVPN, Part V 34 ORGANIZING A LIBRARY 30 KYLE RANKIN’S HACK AND / Dynamic Config Files with Nmap 34 DIRK ELMENDORF’S ECONOMY SIZE GEEK Organizing a Library 74 KYLE RANKIN AND BILL CHILDERS’ POINT/COUNTERPOINT Mobile Phones 80 DOC SEARLS’ EOF Commons Interests REVIEW 46 POGOPLUG Mike Diehl 46 POGOPLUG INDEPTH 64 AN INTRODUCTION TO MINIX It’s not just a filesystem supported by Linux. Bruce Byfield 68 AUTOMATING REMOTE BACKUPS Save or lose it! Michael J. Hammel IN EVERY ISSUE 8 CURRENT_ISSUE.TAR.GZ 64 MINIX 10 LETTERS 14 UPFRONT 40 NEW PRODUCTS USPS LINUX JOURNAL (ISSN 1075-3583) (USPS 12854) is published monthly by Belltown Media, Inc., 2211 Norfolk, Ste 514, Houston, TX 77098 USA. Periodicals postage paid at Houston, Texas and at 42 NEW PROJECTS additional mailing offices. Cover price is $5.99 US. Sub scrip tion rate is $29.50/year in the United States, 65 ADVERTISERS INDEX $39.50 in Canada and Mexico, $69.50 elsewhere. POSTMASTER: Please send address changes to Linux TECH TIPS Journal, PO Box 16476, North Hollywood, CA 91615. Subscriptions start with the next issue. Canada 73 Post: Publications Mail Agreement #41549519. Canada Returns to be sent to Bleuchip International, 78 MARKETPLACE P.O. Box 25542, London, ON N6C 6B2 4 | june 2010 www.linuxjournal.com Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Associate Editor Shawn Powers [email protected] Associate Editor Mitch Frazier [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [email protected] News Editor Justin Ryan [email protected] Editor Emeritus Don Marti [email protected] Technical Editor Michael Baxter [email protected] Senior Columnist Reuven Lerner [email protected] Security Editor Mick Bauer [email protected] Hack Editor Kyle Rankin [email protected] Virtual Editor Bill Childers [email protected] Contributing Editors David A. Bandel • Ibrahim Haddad • Robert Love • Zack Brown • Dave Phillips • Marco Fioretti Ludovic Marcotte • Paul Barry • Paul McKenney • Dave Taylor • Dirk Elmendorf Proofreader Geri Gale Publisher Carlie Fairchild [email protected] General Manager Rebecca Cassity [email protected] Senior Print Media Sales Manager Joseph Krack [email protected] Digital Media Sales Manager Michael Beasley [email protected] Associate Publisher Mark Irgang [email protected] Webmistress Katherine Druckman [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. PO Box 980985, Houston, TX 77098 USA Editorial Advisory Panel Brad Abram Baillio • Nick Baronian • Hari Boukis • Steve Case Kalyana Krishna Chadalavada • Brian Conner • Caleb S. Cullen • Keir Davis Michael Eager • Nick Faltys • Dennis Franklin Frey • Alicia Gibb Victor Gregorio • Philip Jacob • Jay Kruizenga • David A. Lane Steve Marquez • Dave McAllister • Carson McDonald • Craig Oda Jeffrey D. Parent • Charnell Pugsley • Thomas Quinlan • Mike Roberts Kristin Shoemaker • Chris D. Stark • Patrick Swartz • James Walker Advertising E-MAIL: [email protected] URL: www.linuxjournal.com/advertising PHONE: +1 713-344-1956 ext. 2 Subscriptions E-MAIL: [email protected] URL: www.linuxjournal.com/subscribe PHONE: +1 818-487-2089 FAX: +1 818-487-4550 TOLL-FREE: 1-888-66-LINUX MAIL: PO Box 16476, North Hollywood, CA 91615-9911 USA Please allow 4–6 weeks for processing address changes and orders PRINTED IN USA LINUX is a registered trademark of Linus Torvalds. Current_Issue.tar.gz The Cake Is Not a Lie! SHAWN POWERS inux is a kernel. Before I go any further, it’s lecture than your normal monthly dose of tech important to know that “Linux” is really goodies. Fear not; we have the perfect snack L just the kernel that powers our awesome for your geeky sweet tooth as well. Mick Bauer computer systems. Before we get into heated wraps up his series on OpenVPN; Dave Taylor gets debates about .deb and .rpm, or holy wars over intense with some sophisticated HTML forms, and GNOME and KDE, we never can forget that Reuven M. Lerner adds more about MongoDB. Linux really is just the kernel. Kyle Rankin proves that good workers are Likewise, cake is just the sweet bread stuff workers that can make computers do their work that hides under the frosting. Sure, icing, candles, for them. He demonstrates making config files plastic superheros and burning flames are what using nmap. It may sound strange, but it certainly make a cake into a party, but at the base of will save you some grunt work and leave you things, cake is just that bread stuff. This issue, we time for other, more enjoyable things. If one talk about frosted cake and discuss the wonderful of the things you enjoy doing is reading books, world of decorating.