Linux Journal | June 2016
Total Page:16
File Type:pdf, Size:1020Kb
RUN A FULL VERSION OF R ON ANDROID ™ WATCH: ISSUE OVERVIEW V JUNE 2016 | ISSUE 266 http://www.linuxjournal.com Since 1994: The Original Magazine of the Linux Community Automate Certificate Maintenance with LET’S ENCRYPT How to + BUILD Organize a Raspberry Your Pi Camera Qubes GETTING STARTED VMs with nginx LJ266-June2016.indd 1 5/18/16 12:58 PM NEW! Ceph: Linux on Open-Source Power SDS Author: Practical books Author: Ted Schmidt Ted Schmidt Sponsor: Sponsor: HelpSystems for the most technical SUSE people on the planet. SSH: a Self-Audit: Modern Checking Lock for Assumptions Your Server? at the Door GEEK GUIDES Author: Author: Federico Kereki Greg Bledsoe Sponsor: Sponsor: Fox Technologies HelpSystems Agile Improve Product Business Development Processes with Author: an Enterprise Ted Schmidt Job Scheduler Sponsor: IBM Author: Mike Diehl Sponsor: Skybot Download books for free with a Finding Your DIY simple one-time registration. Way: Mapping Commerce Site Your Network Author: to Improve Reuven M. Lerner http://geekguide.linuxjournal.com Manageability Sponsor: GeoTrust Author: Bill Childers Sponsor: InterMapper LJ266-June2016.indd 2 5/18/16 12:58 PM NEW! Ceph: Linux on Open-Source Power SDS Author: Practical books Author: Ted Schmidt Ted Schmidt Sponsor: Sponsor: HelpSystems for the most technical SUSE people on the planet. SSH: a Self-Audit: Modern Checking Lock for Assumptions Your Server? at the Door GEEK GUIDES Author: Author: Federico Kereki Greg Bledsoe Sponsor: Sponsor: Fox Technologies HelpSystems Agile Improve Product Business Development Processes with Author: an Enterprise Ted Schmidt Job Scheduler Sponsor: IBM Author: Mike Diehl Sponsor: Skybot Download books for free with a Finding Your DIY simple one-time registration. Way: Mapping Commerce Site Your Network Author: to Improve Reuven M. Lerner http://geekguide.linuxjournal.com Manageability Sponsor: GeoTrust Author: Bill Childers Sponsor: InterMapper LJ266-June2016.indd 3 5/18/16 12:58 PM JUNE 2016 CONTENTS ISSUE 266 FEATURES 78 Let’s Automate 90 How We R Let’s Encrypt on Android Does your Web site have that A guide to installing the full nice HTTPS padlock image in version of the R statistical the browser address line? package on mobile devices. Here’s how to get one. Marius Hofert Andrei Lukovenko and Kurt Hornik ON THE COVER 9\UH-\SS=LYZPVUVM9VU(UKYVPKW (\[VTH[L*LY[PMPJH[L4HPU[LUHUJL^P[O3L[Z,UJY`W[W /V^[V6YNHUPaL@V\Y8\ILZ=4ZW )\PSKH9HZWILYY`7P*HTLYHW .L[[PUN:[HY[LK^P[OUNPU_W Cover Image: © Can Stock Photo Inc. / dencg 4 | June 2016 | http://www.linuxjournal.com LJ266-June2016.indd 4 5/18/16 12:58 PM CONTENTS COLUMNS IN EVERY ISSUE 32 Reuven M. Lerner’s 8 Current_Issue.tar.gz At the Forge 10 Letters nginx 16 UPFRONT 42 Dave Taylor’s 30 Editors’ Choice Work the Shell 70 New Products Polishing the wegrep 139 Advertisers Index Wrapper Script 50 Kyle Rankin’s Hack and / Secure Desktops with Qubes: Compartments 58 Shawn Powers’ The Open-Source Classroom 22 Build Your Own Raspberry Pi Camera 124 Doc Searls’ EOF What’s Our Next Fight? 58 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 | June 2016 | http://www.linuxjournal.com LJ266-June2016.indd 5 5/18/16 12:58 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. PO Box 980985, Houston, TX 77098 USA 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] URL: www.linuxjournal.com/advertising 0(/.% EXT Subscriptions % -!),: [email protected] URL: www.linuxjournal.com/subscribe MAIL: PO Box 980985, Houston, TX 77098 USA LINUX is a registered trademark of Linus Torvalds. LJ266-June2016.indd 6 5/18/16 12:58 PM ADCb16_Linux Journal_Layout 1 4/8/16 1:32 PM Page 1 Sharpen your Android skills at World’s Largest BOSTON August 1-4, 2016 Sheraton Boston Get the best Android “Simply the best Android developer conference out there! A must-go if you developer training anywhere! do Android development.” • Choose from more than 75 classes and in-depth tutorials —Florian Krauthan, Software Developer, Hyperwallet • Meet Google and Google Development Experts • Network with speakers and other Android developers • Check out more than 50 third-party vendors • Women in Android Luncheon • Panels and keynotes • Receptions, ice cream, prizes and more! www.AnDevCon.com A BZ Media Event AnDevCon™ is a trademark of BZ Media LLC. Android™ is a trademark of Google Inc. Google’s Android Robot is used under terms of the Creative Commons 3.0 Attribution License. LJ266-June2016.indd 7 5/18/16 12:58 PM Current_Issue.tar.gz Things to Do in the Shade SHAWN t’s summer time here in the northern hemisphere POWERS ALTHOUGH IT DID SNOW AT MY HOUSE ON -AY HOPEFULLY -OTHER .ATURE IS DONE WITH Shawn Powers is the I Associate Editor for that nonsense). When the sun is shining, there’s Linux Journal. He’s NOTHING ) LIKE TO DO MORE THAN SIT OUTSIDEUNDER AN also the Gadget Guy UMBRELLA WITH 30& SUNSCREEN AND OF COURSE A for LinuxJournal.com, and he has an book. These days, those books usually are digital, interesting collection AND SINCE ITS *UNE ST THAT MEANS A NEW ISSUE OF of vintage Garfield Linux Journal is ready to read. coffee mugs. Don’t let his silly hairdo This month, Reuven M. Lerner switches things up fool you, he’s a a bit and describes how easy it has become to use pretty ordinary guy nginx as a Web server for your applications. It’s been and can be reached via e-mail at a viable and efficient option for several years now, [email protected]. but Reuven shows just how polished and easy it is to Or, swing by the install and configure. Next, Dave Taylor does some #linuxjournal IRC channel on polishing this month as well, as he puts the final Freenode.net. touches on his wegrep series. I’m ashamed to admit that my scripting often never gets that last bit of polish, and it’s unfortunate, because a good script V should be flexible and portable. Dave shows how to take that last important step. VIDEO: Kyle Rankin’s latest series on the Qubes Shawn distribution has been incredible, and if you’ve been Powers runs a little overwhelmed, no worries. In this issue, through +YLE DESCRIBES SOME OF HIS REAL LIFE EXAMPLES ON the latest issue. how to use Qubes on a daily basis. The notion of virtualizing applications isn’t new, but the way 8 | June 2016 | http://www.linuxjournal.com LJ266-June2016.indd 8 5/18/16 12:58 PM Current_Issue.tar.gz 1UBES COMPARTMENTALIZES EVERYTHING YOU DO IS UNIQUE AND SOMETIMES examples help to clarify things. I make some clarifications this month as well, but in my case, I’m clarifying photos of birds. Specifically, I demonstrate my new homemade IP cameras built using Raspberry Pi devices. The camera MODULES FOR THE 20IS ARE CHEAP AND INCREDIBLY HIGH QUALITY )T ONLY makes sense to take advantage of that for BirdCam! Andrei Lukovenko has an incredible article this month on HTTPS CERTIFICATES &IRST OFF HE INTRODUCES THE ,ETS %NCRYPT CERTIFICATE authority (which I’d never heard of), and then goes on to walk through automating the certificate renewal process! I’ve been using StartSSL FOR YEARS TO GET FREE 33, CERTIFICATES AND EVEN THOUGH THE ONE YEAR expiration is a long time, it seems like every year, I have to relearn how to install certificates. Andrei explains how to make your computers do ALL THE WORK WHILE GETTING MORE FREQUENT 33, CERT UPDATES AS WELL )TS an article you don’t want to miss. This month, you also will learn how to install the full R statistical software on a mobile Android device. Mobile devices are powerful enough that installing such packages makes sense, and with the help of Marius Hofert and Kurt Hornik, you’ll learn how to do so USING ,INUX IN A CHROOT ENVIRONMENT ON !NDROID %VEN IF YOURE NOT interested in installing R, the process for installing Linux inside Android is fascinating and fun! Marius and Kurt go through the entire process, including information on unlocking bootloaders and rooting devices. This month’s issue of Linux Journal is perfect for reading in the shade with a glass of iced tea and a hammock. Or, if you happen to be in the southern hemisphere, perhaps curled in a blanket with a cup of HOT TEA %ITHER WAY ) LOVE ISSUES WHERE YOU LEARN TO DO COOL THINGS and this one is full of ideas and projects.