Linux Journal | July 2016 | Issue
Total Page:16
File Type:pdf, Size:1020Kb
A PENGUIN-POWERED RADIO STATION IN DC ™ WATCH: ISSUE OVERVIEW V JULY 2016 | ISSUE 267 http://www.linuxjournal.com Since 1994: The Original Magazine of the Linux Community ANDROID BROWSER SECURITY What You Should Know + A Crash Course on Planning Security Exercises Delve Into Complex String Processing Turn an Old PC into a How to Set Up WordPress Virtual-Machine Host with nginx LJ267-July2016.indd 1 6/23/16 3:16 PM NEW! Machine NEW! Linux on Learning Power: with Python Why Open Architecture Practical books Author: Reuven M. Lerner Matters Sponsor: Author: for the most technical Intel Ted Schmidt Sponsor: people on the planet. IBM NEW! Hybrid Cloud NEW! LinuxONE: Security with the Ubuntu z Systems Monster Author: Author: GEEK GUIDES Petros Koutoupis John S. Tonello Sponsor: Sponsor: IBM IBM Ceph: Linux on Open-Source Power SDS Author: Author: Ted Schmidt Ted Schmidt Sponsor: Sponsor: HelpSystems SUSE Download books for free with a SSH: a Self-Audit: simple one-time registration. Modern Checking Lock for Assumptions http://geekguide.linuxjournal.com Your Server? at the Door Author: Author: Federico Kereki Greg Bledsoe Sponsor: Sponsor: Fox Technologies HelpSystems LJ267-July2016.indd 2 6/23/16 3:16 PM NEW! Machine NEW! Linux on Learning Power: with Python Why Open Architecture Practical books Author: Reuven M. Lerner Matters Sponsor: Author: for the most technical Intel Ted Schmidt Sponsor: people on the planet. IBM NEW! Hybrid Cloud NEW! LinuxONE: Security with the Ubuntu z Systems Monster Author: Author: GEEK GUIDES Petros Koutoupis John S. Tonello Sponsor: Sponsor: IBM IBM Ceph: Linux on Open-Source Power SDS Author: Author: Ted Schmidt Ted Schmidt Sponsor: Sponsor: HelpSystems SUSE Download books for free with a SSH: a Self-Audit: simple one-time registration. Modern Checking Lock for Assumptions http://geekguide.linuxjournal.com Your Server? at the Door Author: Author: Federico Kereki Greg Bledsoe Sponsor: Sponsor: Fox Technologies HelpSystems LJ267-July2016.indd 3 6/23/16 3:16 PM JULY 2016 CONTENTS ISSUE 267 FEATURES 68 Android 80 Radio 88 The Tiny Browser Free Internet Security— Linux Project, What You How Linux is Part II dependably Learning Linux Haven’t steering by doing: here’s programming Been Told Part II of building to a radio an internet An indepth look near you. in a box. at flaws in Alan Peterson Android’s stock John S. Tonello web libraries. Charles Fisher Cover Image: © Can Stock Photo Inc. / sdecoret 4 | July 2016 | http://www.linuxjournal.com LJ267-July2016.indd 4 6/23/16 3:16 PM CONTENTS COLUMNS 26 Reuven M. Lerner’s At the Forge nginx and WordPress 36 Dave Taylor’s 18 Work the Shell Spinning and Text Processing 42 Susan Sons’ Under the Sink Security Exercises 112 Doc Searls’ EOF Doing for User Space What We Did for Kernel Space 80 IN EVERY ISSUE 8 Current_Issue.tar.gz 10 UPFRONT 24 Editors’ Choice 88 60 New Products ON THE COVER (7LUN\PU7V^LYLK9HKPV:[H[PVUPU+*W 117 Advertisers Index (UKYVPK)YV^ZLY:LJ\YP[`·>OH[@V\:OV\SK2UV^W ;\YUHU6SK7*PU[VH=PY[\HS4HJOPUL/VZ[W (*YHZO*V\YZLVU7SHUUPUN:LJ\YP[`,_LYJPZLZW +LS]LPU[V*VTWSL_:[YPUN7YVJLZZPUNW /V^[V:L[<W>VYK7YLZZ^P[OUNPU_W 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 | July 2016 | http://www.linuxjournal.com LJ267-July2016.indd 5 6/23/16 3:16 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 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 MAIL: PO Box 980985, Houston, TX 77098 USA LINUX is a registered trademark of Linus Torvalds. LJ267-July2016.indd 6 6/23/16 3:16 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. LJ267-July2016.indd 7 6/23/16 3:16 PM Current_Issue.tar.gz Better Than We Found It SHAWN echnology is supposed to make our lives POWERS easier. It’s supposed to automate those things that take our valuable time, and it promises Shawn Powers is the T Associate Editor for to make those things we still do faster and more Linux Journal. He’s efficient. Unfortunately though, it hasn’t given us also the Gadget Guy more free time, it’s just allowed us to cram even for LinuxJournal.com, and he has an more activities into our already busy schedules. interesting collection Thankfully, some technology really does make our of vintage Garfield lives better. If we’re willing to learn and change, coffee mugs. Don’t let his silly hairdo technology really can be that invaluable aid in our fool you, he’s a lives. The trick is to make technology work for us, pretty ordinary guy and not the other way around. and can be reached via e-mail at For example, in last month’s issue I wrote about [email protected]. the Raspberry Pi IP camera I created in order to Or, swing by the live-stream my bird feeder. Since then, I’ve learned #linuxjournal IRC channel on ABOUT A NEW TOOL CALLED 56, THAT MAKES MY Freenode.net. Raspberry Pi an even better camera. Learning about new technology and new ways to use existing technology is the secret to getting the most out of V our increasingly digital world. Reuven M. Lerner describes a better way to host VIDEO: WordPress installs using nginx. Building on last Shawn month’s introduction to nginx, Reuven shows how Powers runs scalable it can be in a real-world scenario. Dave Taylor through follows with a fascinating look at how to automate the latest issue. the creation of content. Using “spinning”, Dave shows how to create content that can be used for evil, but is 8 | July 2016 | http://www.linuxjournal.com LJ267-July2016.indd 8 6/23/16 3:16 PM Current_Issue.tar.gz also brilliant in its execution. If you’ve ever wanted to peer into the mind of a spammer, Dave will introduce you to the robotic version of one. We can never get “good enough” at security to be fully secure, but with the help of Susan Sons, we can do our best to be security-focused and prepared. Much like a school has fire drills, Susan explains the concept (and plan for realization) of running security exercises. Having a staff that is not only aware, but also practiced at dealing with security can be invaluable. Susan gives us a very practical plan for making that happen. Charles Fisher provides a depressing, but very important look at Android browser security—or more specifically, the lack of security in the Android WebKit browsers. There are so many programs utilizing the Android WebKit libraries that a vulnerability at that level can have security ramifications far beyond the default stock browser. Charles not only explains the problem, but also gives some concrete information on how to deal with the potential security nightmare still in many Android systems. Alan Peterson explores a better way to do radio. Linux isn’t the default for most radio stations, but in Washington, DC, that’s changing. Thanks to the power of open-source software and the flexibility of coding on Linux, several radio stations are finding Linux is the answer for secure, scalable management of radio, especially in this increasingly internet- centric world. If you’re interested in how radio stations are automating using Linux as their core, you won’t want to miss his article! Finally, John S. Tonello continues his three-part series on making the internet—or more specifically, on creating a tiny virtualized environment FOR TESTING INTERNET TOOLS EFFICIENTLY AND EFFECTIVELY 5SING 6IRTUAL"OX and Proxmox, John demonstrates how easy and powerful a virtualized environment truly can be.