LINUX JOURNAL (ISSN 1075-3583) Is Published Monthly by Belltown Media, Inc., PO Box 980985, Houston, TX 77098 USA
Total Page:16
File Type:pdf, Size:1020Kb
AN INDEPTH LOOK AT REMOTE BACKUPS ™ WATCH: ISSUE OVERVIEW V MARCH 2016 | ISSUE 263 LinuxJournal.com Since 1994: The Original Magazine of the Linux Community tmux Guide NEW: Single- Get Up to Column Format! Speed Quickly Use an initrd as a Real Root Filesystem for Your Servers PLUS: Data Science Convert Add an OEM-Style Methods for Numeric Bases Factory Installer Analyzing from the to Your Logfiles Command Line GRUB Menus LJ263-March2016.indd 1 2/23/16 10:47 AM NEW! Self-Audit: Agile Checking Product Assumptions Development at the Door Practical books Author: Author: Ted Schmidt for the most technical Greg Bledsoe Sponsor: IBM Sponsor: people on the planet. HelpSystems Improve Finding Your Business Way: Mapping Processes with Your Network an Enterprise to Improve GEEK GUIDES Job Scheduler Manageability Author: Author: Mike Diehl Bill Childers Sponsor: Sponsor: Skybot InterMapper DIY Combating Commerce Site Infrastructure Sprawl Author: Reuven M. Lerner Author: Sponsor: GeoTrust Bill Childers Sponsor: Puppet Labs Download books for free with a Get in the Take Control simple one-time registration. Fast Lane of Growing with NVMe Redis NoSQL http://geekguide.linuxjournal.com Author: Server Clusters Mike Diehl Author: Sponsor: Reuven M. Lerner Silicon Mechanics Sponsor: IBM & Intel LJ263-March2016.indd 2 2/21/16 11:12 AM NEW! Self-Audit: Agile Checking Product Assumptions Development at the Door Practical books Author: Author: Ted Schmidt for the most technical Greg Bledsoe Sponsor: IBM Sponsor: people on the planet. HelpSystems Improve Finding Your Business Way: Mapping Processes with Your Network an Enterprise to Improve GEEK GUIDES Job Scheduler Manageability Author: Author: Mike Diehl Bill Childers Sponsor: Sponsor: Skybot InterMapper DIY Combating Commerce Site Infrastructure Sprawl Author: Reuven M. Lerner Author: Sponsor: GeoTrust Bill Childers Sponsor: Puppet Labs Download books for free with a Get in the Take Control simple one-time registration. Fast Lane of Growing with NVMe Redis NoSQL http://geekguide.linuxjournal.com Author: Server Clusters Mike Diehl Author: Sponsor: Reuven M. Lerner Silicon Mechanics Sponsor: IBM & Intel LJ263-March2016.indd 3 2/21/16 11:12 AM MARCH 2016 CONTENTS ISSUE 263 FEATURES 70 The Power of Tiny initrd The bene!ts of using an initrd/initramfs as a real root !lesystem and not using a hard drive in your servers. Eduardo Arcusa Les 84 Introduction to tmux A guide to help you start using tmux quickly. Charles Thomas ON THE COVER [T\_.\PKL!.L[<W[V:WLLK8\PJRS`W <ZLHUPUP[YKHZH9LHS9VV[-PSLZ`Z[LTMVY@V\Y:LY]LYZW +H[H:JPLUJL4L[OVKZMVY(UHS`aPUN3VNMPSLZW *VU]LY[5\TLYPJ)HZLZMYVT[OL*VTTHUK3PULW (KKHU6,4:[`SL-HJ[VY`0UZ[HSSLY[V@V\Y.9<)4LU\ZW (U0UKLW[O3VVRH[9LTV[L)HJR\WZW 4 | March 2016 | LinuxJournal.com LJ263-March2016.indd 4 2/21/16 11:12 AM CONTENTS COLUMNS 34 Reuven M. Lerner’s At the Forge Analyzing Data 44 Dave Taylor’s 26 Work the Shell Fancy Tricks for Changing Numeric Base 50 Kyle Rankin’s Hack and / GRUB Boot from ISO 54 Shawn Powers’ The Open-Source Classroom Back It Up, Buster! 98 Doc Searls’ EOF 54 To Appreciate Life IN EVERY ISSUE 8 From the Editor 10 Letters 16 UPFRONT 32 Editors’ Choice 62 New Products 101 Advertisers Index 70 LINUX JOURNAL (ISSN 1075-3583) is published monthly by Belltown Media, Inc., PO Box 980985, Houston, TX 77098 USA. Subscription rate is $29.50/year. Subscriptions start with the next issue. 5 | March 2016 | LinuxJournal.com LJ263-March2016.indd 5 2/22/16 5:38 PM Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Associate Editor Shawn Powers [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [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 lj@greenfly.net Virtual Editor Bill Childers [email protected] Contributing Editors )BRAHIM (ADDAD s 2OBERT ,OVE s :ACK "ROWN s $AVE 0HILLIPS s -ARCO &IORETTI s ,UDOVIC -ARCOTTE 0AUL "ARRY s 0AUL -C+ENNEY s $AVE 4AYLOR s $IRK %LMENDORF s *USTIN 2YAN s !DAM -ONSEN President Carlie Fairchild [email protected] Publisher Mark Irgang [email protected] Associate Publisher John Grogan [email protected] Director of Digital Experience Katherine Druckman [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. 0/ "OX (OUSTON 48 53! Editorial Advisory Panel Nick Baronian Kalyana Krishna Chadalavada "RIAN #ONNER s +EIR $AVIS -ICHAEL %AGER s 6ICTOR 'REGORIO $AVID ! ,ANE s 3TEVE -ARQUEZ $AVE -C!LLISTER s 4HOMAS 1UINLAN #HRIS $ 3TARK s 0ATRICK 3WARTZ Advertising % -!),: [email protected] 52,: www.linuxjournal.com/advertising 0(/.% EXT Subscriptions % -!),: [email protected] 52,: www.linuxjournal.com/subscribe -!), 0/ "OX (OUSTON 48 53! LINUX IS A REGISTERED TRADEMARK OF ,INUS 4ORVALDS LJ263-March2016.indd 6 2/21/16 11:12 AM Where every interaction matters. break down your innovation barriers power your business to its full potential When you’re presented with new opportunities, you want to focus on turning them into successes, not whether your IT solution can support them. Peer 1 Hosting powers your business with our wholly owned FastFiber NetworkTM, solutions that are secure, scalable, and customized for your business. Unsurpassed performance and reliability help build your business foundation to be rock-solid, ready for high growth, and deliver the fast user experience your customers expect. Want more on cloud? Call: 844.855.6655 | go.peer1.com/linux | Vew Cloud Webinar: Public and Private Cloud | Managed Hosting | Dedicated Hosting | Colocation LJ263-March2016.indd 7 2/21/16 11:12 AM Current_Issue.tar.gz Now We’re the Cool Kids! SHAWN WISH ) COULD GO BACK AND TELL EIGHT YEAR OLD ME POWERS THAT SOMEDAY IT WOULD BE A POINT OF PRIDE THAT ) WROTE "!3)# PROGRAMS ON A 4) ! CONNECTED Shawn Powers is the I Associate Editor for TO A BLACK AND WHITE 46 "ACK THEN EVEN PLAYING Linux Journal. He’s VIDEO GAMES WAS LOOKED DOWN ON AND IF YOU ACTUALLY also the Gadget Guy TYPED OUT A LINE PROGRAM TO MAKE A WORM WIGGLE for LinuxJournal.com, and he has an ACROSS THE SCREEN YOU WERE A STRAIGHT UP NERD /H interesting collection HOW THE TIMES HAVE CHANGED .OW ALL THOSE YEARS OF of vintage Garfield NERDERY HAVE PAID OFF AND )M THE GUY EVERYONE ASKS coffee mugs. Don’t let his silly hairdo TECH QUESTIONS )VE TURNED THAT NERD BADGE OF SHAME fool you, he’s a INTO ONE OF HONOR $EAR EIGHT YEAR OLD ME YOULL TURN pretty ordinary guy OUT FINE 03 ,EARN TO CODE WHILE YOURE YOUNG YOULL and can be reached via e-mail at REGRET IT LATER IF YOU DONT [email protected]. 4HIS MONTH WE HAVE COLUMNS AND ARTICLES WRITTEN Or, swing by the BY A BUNCH OF NERDS !WESOME RIGHT 7E START OUT #linuxjournal IRC channel on with Reuven M. Lerner, who talks about analyzing Freenode.net. DATASPECIFICALLY ANALYZING !PACHE 7EB SERVER LOGFILES 0YTHON TURNS OUT TO BE A GREAT TOOL FOR ANALYZING THIS SORT OF DATA AND 2EUVEN SHOWS HOW TO V USE SOME AWESOME 0YTHON TOOLS TO DO SO $AVE 4AYLOR FOLLOWS UP WITH BCONVERT WHICH IS A GREAT PROGRAM VIDEO: FOR CONVERTING BASE NUMBERS IN A SCRIPT )F YOU ARE A Shawn FAN OF THAT h4HERE ARE ONLY TYPES OF PEOPLE IN THE Powers runs WORLDv SHIRT YOULL WANT TO READ $AVES COLUMN through +YLE 2ANKIN DESCRIBES HOW TO TWEAK '25" SO THAT the latest issue. YOU EASILY CAN BOOT FROM AN )3/ FILE !LTHOUGH ITS still possible to extract an ISO and create a bootable 8 | March 2016 | LinuxJournal.com LJ263-March2016.indd 8 2/21/16 11:12 AM Current_Issue.tar.gz FILESYSTEM TO BOOT FROM A 53" DRIVE '25" ALLOWS BOOTING FROM AN )3/ FILE ITSELF ) ADD MY NERDINESS TO THE MIX THIS MONTH BY SHOWING MULTIPLE WAYS TO BACK UP YOUR FILESSPECIFICALLY BACKING THEM UP OFF SITE !S SOMEONE WHO HAS HAD MY HOUSE BURN DOWN ) CAN TELL YOU FIRSTHAND HOW IMPORTANT IT IS TO BACK UP YOUR DATA SOMEWHERE GEOGRAPHICALLY DIFFERENT FROM WHERE YOU CREATE IT 4HANKFULLY WITH THE CLOUD THERE ARE LOTS OF OPTIONS AND MANY OF THEM ARE FREE OR CHEAP )F YOUVE BOOTED ,INUX IN THE PAST DECADE YOUVE USED AN INITRD IN ORDER TO LOAD THE SYSTEM 5SING AN INIT RAMDISK OR INITRAM FILESYSTEM IS A GREAT WAY TO LOAD A TEMPORARY STRIPPED DOWN ROOT FILESYSTEM DURING BOOTUP %DUARDO !RCUSA ,ES EXPLAINS THE NUANCES OF INITRD AND SHOWS HOW TO TAKE ADVANTAGE OF THE BRILLIANT CONCEPT THAT MAKES BOOTING ,INUX SO EASY 5SING A REAL WORLD EXAMPLE HE DESCRIBES HOW INITRD HAS BEEN INCREDIBLY USEFUL FOR HIM AND CAN BE FOR OTHERS AS WELL &INALLY MY FRIEND #HARLES 4HOMAS COVERS HOW TO USE TMUX TO SPLIT YOUR terminal window into multiple window panes and rearrange them on THE FLY ) HAVE TO ADMIT )M SO USED TO USING SCREEN THAT ) HAVENT REALLY TRIED TMUX 0ART OF MY HESITATION IS THAT SCREEN WORKS AND TMUX SEEMS A BIT CONFUSING #HARLES TAKES AWAY ONE OF MY COMPLAINTS THIS MONTH BY EXPLAINING HOW POWERFUL AND USABLE TMUX CAN BE 9OU MIGHT EVEN FIND tmux to be better than screen depending on your situation. 7E HAVE ALL THE SAME PRODUCT ANNOUNCEMENTS TECH TIPS AND COOL UPFRONT PIECES THIS MONTH AS WELL 0LUS YOU MIGHT NOTICE WEVE SWITCHED TO A SINGLE COLUMN FORMAT WHICH SHOULD MAKE READING ON DIGITAL DEVICES MUCH EASIERESPECIALLY READING CODE SNIPPETS 7E ENJOY BEING NERDS AND WE ENJOYED PUTTING THIS NERDY ISSUE TOGETHER FOR YOU 7E HOPE YOU ENJOY IT AS WELLQ Send comments or feedback via http://www.linuxjournal.com/contact or to [email protected].