Anatomy of a linuxsystem

Preview:

Citation preview

The FSF’s gcc C compiler is the singlemost important programming tool forLinux, since it is required for buildingthe system and all the other tools.Other key tools include make, sourcecode control tools like CVS and RCS,and editors like vi and Emacs. Thereare many variations of vi, includingvim, nvi, elvis, and vile. Along with theC compiler, all systems need and relyon various libraries, including glibc and libstdc++.

Useful Books:� Programming with GNU Software

Mike Loukides, Andy Oram� Learning the vi Editor

Linda Lamb, Arnold Robbins� CVS Pocket Reference

Gregor N. Purdy� Learning GNU Emacs

Debra Cameron, Bill Rosenblatt,Eric S. Raymond

� GNU Emacs ManualRichard M. Stallman (FSF)

� Managing Projects with makeAndrew Oram, Steve Talbott

� Debugging with GDB:The GNU Source-Level DebuggerRichard M. Stallman, Cygnus Solutions(FSF)

Linux includes a full complement ofUnix command-line tools, courtesy ofthe Free Software Foundation’s GNUproject. What many people don’t real-ize is that the free implementations ofmany of these tools were developedas part of Berkeley Unix and con-tributed to the GNU project from there, so the rivalry between Linuxand BSD is overshadowed by deepercooperation.

The bash shell is the most widely usedcommand line shell for Linux. Thereare other versions of the classicBourne shell, along with tcsh, a modern version of the C Shell (csh).

Useful Books:� Linux in a Nutshell

Ellen Siever, Stephen Spainhour, Jessica Hekman, Stephen Figgins

� Running LinuxMatt Welsh, Matthias Kalle Dalheimer,Lar Kaufman

� sed & awkDale Dougherty, Arnold Robbins

� sed & awk Pocket ReferenceArnold Robbins

� Effective awk ProgrammingArnold Robbins (forthcoming from O’Reilly)

� Learning the bash ShellCameron Newham, Bill Rosenblatt

� Using csh & tschPaul DuBois

Key Web Site:www.fsf.org

Apache is the dominant web servernot only on Linux but on the Web as a whole, with more than 60 percent of all visible web servers runningApache. Apache was created by theApache Group and is now maintainedby the Apache Software Foundation. Inaddition to the core Apache serverproject, there are projects for Perl onApache, Java Server Pages (Jakarta)and XML. mod_perl, mod_serv, andPHP are widely used for generatingdynamic content on Apache servers.Developers in the Apache GUI projectare working on a cross-platform graph-ical tool called Comanche (whichstands for configuration manager forApache) to help make Apache easierto configure. Zope is the most compre-hensive software for web site designand management in the open sourceworld. Using Python-based tools, itcombines dynamic content manage-ment, shared development, and sup-port for sophisticated managementtechniques like version control andstaging.

Useful Books:� Apache: The Definitive Guide

Ben Laurie, Peter Laurie� Writing Apache Modules with

Perl and CLincoln Stein, Doug MacEachern

� HTML & XHTML: The Definitive GuideChuck Musciano, Bill Kennedy

� JavaScript: The Definitive GuideDavid Flanagan

� Dynamic HTML:The Definitive ReferenceDanny Goodman

� CGI Programming with PerlScott Guelich, Shishir Gundavaram,Gunther Birznieks

� Web Design in a NutshellJennifer Niederst

Key Web Sites:www.apache.orgwww.comanche.orgxml.apache.orgwww.apacheweek.comwww.php.netwww.xml.comwww.zope.orgwww.w3.org

Linus’s kernel is the heart of the system. The current version is 2.2, and is the same on all distributions,although the most recent kernel patch,2.2.16, is not.

Useful Books:� Running Linux

Matt Welsh, Matthias Kalle Dalheimer,Lar Kaufman

� Learning Red Hat LinuxBill McCarty

� Learning Debian GNU/LinuxBill McCarty

� Linux Device DriversAlessandro Rubini

� Linux Multimedia GuideJeff Tranter

� Understanding the Linux KernelDaniel P. Bovet, Marco Cesati

� Building Linux ClustersDavid HM Spector

� Linux Application DevelopmentMichael K. Johnson, Eric W. Troan(Addison-Wesley)

Key Web Site:www.kernel.org

Mozilla, the free version of Netscape’sweb browser suite, is the one third-party graphical application certain to be on every Linux system. Thoughsome people argue that Mozilla hasn’tsucceeded as an open source project,we believe its contributions areimmense and will become more pervasive in the future. In addition to the browser, the Mozilla project isresponsible for the JavaScript lan-guage, Bugzilla, and Tinderbox. Partsof Mozilla, including Gecko, are beingincorporated into other applicationsand also into the GNOME 2.0 desktop.

Key Web Sites:www.mozilla.orgwww.mozillazine.org

Samba allows the Linux or Unix systemto act as a file and print server on aWindows® network. It’s a high-profileapplication that is helping to driveLinux’s acceptance in a corporate setting. Samba received support fromAustralian National University, SGI, and Linuxcare.

Useful Books:� Using Samba

Robert Eckstein, David Collier-Brown, Peter Kelly

� Managing NFS and NISHal Stern

Key Web Sites:Samba Home: www.samba.org

SWAT: anu.samba.org/cgi-bin/swat

KSamba:www.kneschke.de/projekte/ksamba

GnoSamba:www.open-systems.com/gnosamba.html

Sun’s StarOffice and Corel’sWordPerfect Office Suite are the mostpopular third-party office-type applica-tions for Linux. They aren’t strictly apart of Linux but are bundled withmany distributions or available fordownload over the Internet. TheGNOME team is currently developingGnumeric, an Excel-like XML-basedspreadsheet application, andEvolution, an Outlook Express-typegroupware suite. The GNOME andKDE groups are also developing officeapplication suites that will include wordprocessors, presentation software, and image editing/viewing tools. Othercompanies, including ApplixWare andAbiSource, are also developing officeapplications for Linux for commercialdistribution. The GIMP (GNU ImageManipulation Program) is an opensource Photoshop® clone, andGhostscript is a freely availablePostScript interpreter.

Useful Books:� GIMP Pocket Reference

Sven Neumann

� Grokking the GIMPCarey Bunks (New Riders)

Key Web Sites:www.openoffice.orgwww.corel.comkoffice.kde.orgwww.abisource.comwww.vistasource.comwww.gimp.org

Databases are critical for even smallorganizations; they store the content formany web sites with interfaces throughPerl DBI, PHP, or other languages. TheBerkeley DB, originally developed andmaintained by Margo Selzer and KeithBostic, is now maintained by their com-pany, Sleepycat Software. The BerkeleyDB is quite flexible, supporting C, C++,Java, Tcl, Perl, and Python APIs. Thereare also a variety of SQL-based data-base applications available for Linux,the most popular of which is MySQL,developed by Michael Widenius.Other database projects include DB2for Linux from IBM, PostgreSQL, and mSQL.

Useful Books:� MySQL & mSQL

Randy Jay Yarger, George Reese, Tim King

� MySQLPaul DuBois (New Riders)

� Mastering PostgreSQLStephen J. Lombardo (forthcoming from O’Reilly)

Key Web Sites:Berkeley DB: www.sleepycat.comwww.mysql.comwww.postgresql.orgDB2: www.ibm.com/db2/linux

\

Email is one of the must-have applica-tions for any modern system. Usersoften rely on their ISP to handle thegory details of mail forwarding anddelivery, but many administrators needto set up these services themselves.Eric Allman’s sendmail,® developed in 1979 as part of Berkeley’s Unix, isthe granddaddy of Internet mail serversand still the most widely used, butLinux also includes Dan Bernstein’sqmail and University of Cambridge’sExim.

One of the earliest forms of peer-to-peer communication over the Internetcame in the form of email mailing lists.Whether the discussion takes place onan internal server, or in a public forum,mailing lists bring people with like inter-ests together using list managementsoftware such as LISTSERV,Majordomo, Listproc, SmartList,Mailman, and ezmlm.

Useful Books:� sendmail

Bryan Costales, Eric Allman

� Managing Mailing ListsAlan Schwartz

� Stopping SpamAlan Schwartz, Simson Garfinkel

Key Web Sites:www.sendmail.orgwww.sendmail.netwww.sendmail.comwww.qmail.orgwww.exim.orgwww.postfix.orgLISTSERV: www.lsoft.comMajordomo:www.greatcircle.com/majordomoSmartList: www.procmail.orgMailman: www.list.orgwww.ezmlm.org

Linux offers traditional Unix securityplus a sophisticated filtering and network address translation (NAT)mechanism. In addition, there aredozens of useful network and securitytools in a typical Linux distribution ordownloadable from the net.

Network Analysis: tcpd, tcpdmatch, tcpdump, traceroute, Hummer, Snort

Security Auditing: COPS, ISS,SATAN, Tripwire

Firewalls: ipfilter, portmap, socks, wrappers

Encryption Tools: PGP, Kerberos

Remote Access: SSH, Radius

Security Management: swatch, watcher, etc.

Useful Books:� Practical Unix & Internet Security

Simson Garfinkel, Gene Spafford

� Building Internet FirewallsElizabeth D. Zwicky, Simon Cooper, D. Brent Chapman

� SSH, The Secure Shell:The Definitive GuideDaniel J. Barrett, Richard Silverman

� Linux® FirewallsRobert L. Ziegler (New Riders)

� Firewalls and Internet SecurityWilliam R. Cheswick, Steven M. Bellovin(Addison-Wesley)

� Applied CryptographyBruce Schneier (Addison-Wesley)

� PGPSimson Garfinkel

� Maximum Linux SecurityAnonymous (SAMS)

Key Web Sites:CERIAS: www.cerias.purdue.eduCIAC: ciac.llnl.govGene Spafford’s Home Page:www.cerias.purdue.edu/homes/spafsecurity.oreilly.comwww.linuxsecurity.comwww.first.orgwww.alw.nih.gov/Securitywww.rootshell.orgwww.securityfocus.comwww.freeswan.org

A N A T O M Y O F A L I N U X S Y S T E M

Scripting languages are widely usedon Linux for everything from systemadministration to generating web content. Larry Wall’s Perl is the mostwidely used but John Ousterhout’s Tcland Guido van Rossum’s Python arealso extremely popular languages, allincluded in a typical Linux distribution.Thousands of Perl modules are avail-able from CPAN, the ComprehensivePerl Archive Network. The Tk toolkitallows the creation of graphical appli-cations from any of these languages.ActiveState is developing a new IDEfor Perl and Python called Komodo,which is based on Mozilla.

Useful Books:� Programming Perl

Larry Wall, Tom Christiansen, Jon Orwant

� Learning PerlRandal L. Schwartz, Tom Christiansen

� Perl CookbookTom Christiansen, Nathan Torkington

� Perl in a NutshellEllen Siever, Stephen Spainhour,Nathan Patwardhan

� Programming the Perl DBIAlligator Descartes, Tim Bunce

� Learning Perl/TkNancy Walsh

� Object Oriented PerlDamian Conway (Manning)

� Tcl and the Tk ToolkitJohn K. Ousterhout (Addison-Wesley)

� Effective Tcl/Tk ProgrammingMark Harrison, Michael McLennan(Addison-Wesley)

� Tcl/Tk in a NutshellPaul Raines, Jeff Tranter

� Exploring ExpectDon Libes

� Learning PythonMark Lutz, David Ascher

� Programming PythonMark Lutz

� Python Pocket ReferenceMark Lutz

� Python Essential ReferenceDavid M. Beazley (New Riders)

Key Web Sites:www.perl.comwww.cpan.orgwww.perl.orgperl.oreilly.comwww.ajubasolutions.comwww.python.orgwww.activestate.comwww.masonhq.comwww.pm.org

C/C++ Programming Tools Unix Command-Line Utilities Mozilla Office Applications

Samba

Web Server Software

Perl, Tcl, and Python

Kernel and Device Drivers

Mail Servers and List Managers

Databases

Security

MagazinesOpen Magazine: www.openmagazine.netLinux Magazine: www.linux-mag.comLinux Journal: www.linuxjournal.comLinuxWorld: www.linuxworld.comMaximum Linux: www.maximumlinux.com

Major Linux DistributorsRed Hat®: www.redhat.comDebian GNU/Linux: www.debian.orgSuSE: www.suse.comLinux-Mandrake™:www.linux-mandrake.comSlackware® Linux: www.slackware.com

Storm Linux™ from Stormix Technologies, Inc.:www.stormix.comOpenLinux™ from Caldera Systems:www.caldera.comTurboLinux ®: www.turbolinux.comLinuxPPC: www.linuxppc.comYellow Dog Linux™: www.yellowdoglinux.comHard Hat™ Linux for Embedded Systems fromMontaVista Software, Inc.: www.mvista.comRTLinux™ from FSMLabs: www.fsmlabs.comor www.rtlinux.org

Project Hostingwww.collab.netwww.sourceforge.net

Downloadswww.ibiblio.orgwww.freshmeat.netwww.themes.orgwww.rpmfind.net/linux/RPM

Kernel (News and Notes)www.kernel.orgwww.kernelnotes.org

Philosophywww.fsf.orgwww.opensource.orgwww.opencontent.org

Linux® is named after Linus Torvalds,architect of the Linux kernel, the heart ofthe operating system. But a completeLinux distribution contains the work of hun-dreds of separate open source softwareprojects. A surprise to many people is theamount of code that companies like Sun,SGI, and Digital (Compaq) have con-tributed. This poster peels back the skin ofthe Linux distribution to show many of themajor projects and their relationship to eachother and to the whole Linux anatomy.

The Big Ideas Behind LinuxEric S. Raymond’s TheCathedral & The Bazaaroutlines the way a distributednetwork of programmers can build leading-edge, high-quality software withoutcentralized control. AnotherO’Reilly book,Open Sources,

contains essays on open source software development methodology by many of the keydevelopers who have made it happen.

Hardware/SystemsVA Linux Systems: www.valinux.comPenguin Computing:www.penguincomputing.comIBM: www.ibm.com/linuxCobalt Networks, Inc.: www.cobalt.com

ConferencesO’Reilly Open Source Convention:conferences.oreilly.comLinuxWorld New York:www.linuxworldexpo.comLinuxWorld San Jose:www.linuxworldexpo.comAtlanta Linux Showcase:ww.linuxshowcase.com

ApacheCon: www.apachecon.comYAPC (Yet Another Perl Conference):www.yapc.org/America orwww.yapc.org/Europe

Top Linux Web Siteswww.linux.comwww.linux.orgwww.slashdot.orgwww.linuxtoday.comwww.lwn.netwww.linuxgazette.com

O’Reilly Siteswww.oreilly.comwww.oreillynet.comlinux.oreilly.com

All

book

s lis

ted

are

publ

ishe

d by

O’R

eilly

& A

ssoc

iate

s, I

nc.,

exce

pt w

here

not

ed.

T H E O’R E I L L Y O P E N S O U R C E S O F T W A R E C O N V E N T I O N

July 23-26, 2001 � San Diego, California

To some, Java and Linux mightsound like an odd combination, butin reality, there’s a lot going on inthis space. Sun has a long-standinglink to Linux, supplying developersand source code for the kernel, inaddition to their recent contributionto the community by GPLingStarOffice.™ Other Java-Linux con-nections include the BlackdownProject, which is a world-wide community of volunteer developerswho are working to bring the Javaplatform to Linux, and Kaffe, across-platform implementation ofthe Java Virtual Machine (JVM).Founded by Tim Wilkinson, Kaffesupports Sun’s own Solaris, Linux,Microsoft Windows® and WindowsCE, and even DOS, and is finding a new home in embedded systems.Other Java-related open sourceprojects include Java Server Pages(JSP/Jakarta), and Enhydra (aJava/XML-based application serverand development environment).

Useful Books:� Database Programming

with JDBC and JavaGeorge Reese

� Java in a NutshellDavid Flanagan

� Jini in a NutshellScott Oaks, Henry Wong

� Java™ Programming on LinuxNathan Meyers (Waite Group Press)

� Java and XMLBrett McLaughlin

Key Web Sites:www.sun.com/linuxwww.blackdown.orgwww.kaffe.orgjakarta.apache.orgwww.openoffice.org

Tim Berners-Lee’s introduction of theHyperText Markup Language (HTML)took the Internet by storm in 1993when people outside of technical cir-cles realized its potential for spread-ing information over the then-fledglingWorld Wide Web (WWW). In theyears since, the HTML standard hasbeen through a few iterations, and theWeb has evolved into a media-richenvironment dominated by things likethe Document Object Model (DOM),JavaScript, and other advancementslike Cascading Style Sheets (CSS).But HTML isn’t flexible enough fortoday’s web, and the eXtensibleMarkup Language (XML) was at firstdeemed to be far ahead of itself.That’s changed. The new version ofHTML, XHTML, builds upon its exist-ing structure by adding some ofXML’s powerful features. XML isquickly becoming the defacto markupfor transporting all kinds of data overthe Internet and between applica-tions. Jabber, an open source, peer-

to-peer instant messaging system,relies heavily on XML as its transportlanguage, and XSLT gives developersthe ability to transform XML documentsinto output forms such as PostScript,PDF, ASCII text, and HTML.

Useful Books:� HTML & XHTML: The Definitive Guide

Chuck Musciano, Bill Kennedy� Cascading Style Sheets:

The Definitive GuideEric A. Meyer

� Dynamic HTML:The Definitive ReferenceDanny Goodman

� Programming PHPRasmus Lerdorf, Randy Jay Yarger,Andi Gutmans, Zeev Suraski, Stig Bakken, Shane Caraveo

� Web Application Development with PHP 4.0Tobias Ratschiller, Till Gerken (New Riders)

� JavaScript: The Definitive GuideDavid Flanagan

� Designing with JavaScriptNick Heinle, Martin Webb

� Java and XMLBrett McLaughlin

� Web Design in a NutshellJennifer Niederst

� HTML Pocket ReferenceJennifer Niederst

� JavaScript Pocket ReferenceDavid Flanagan

� XML Pocket ReferenceRobert Eckstein

� PHP Pocket ReferenceRasmus Lerdorf

Key Web Sites:www.xml.comwww.ibm.com/developer/smlwww.w3.orgwww.webstandards.orgwww.irt.orgwww.jabber.orgwww.php.net

There is a host of standards andprotocols that we all rely on, andwe often use them without evengiving them a thought. Things likeTCP/IP and Ethernet for networkcommunication and data transmis-sion; DHCP for doling out IPaddresses within a host network;SMTP, POP3, and IMAP for send-ing and receiving email; HTTP forthe Web, and FTP for transferringfiles over the Internet; and NNTPfor accessing Usenet news. Thenthere are MIME-types for images,video, audio, and documents. Welive and breathe these standards,often without knowing we’re doingit. Open protocol standards are a key part of what makes theInternet work.

Useful Books:� TCP/IP Network Administration

Craig Hunt� Managing IP Networks with

Cisco RoutersScott M. Ballew

� Managing IMAPDianna Mullet, Kevin Mullet

� Using & Managing PPPAndrew Sun

� Internet Core Protocols:The Definitive GuideEric Hall

� Ethernet: The Definitive GuideCharles E. Spurgeon

� Managing UsenetHenry Spencer

� PNG: The Definitive GuideGreg Roelofs

� DocBook: The Definitive GuideNorman Walsh, Leonard Muellner

� MP3: The Definitive GuideScot Hacker

� HTTP Pocket ReferenceClinton Wong

Key Web Sites:www.ietf.orgwww.ieee.orgwww.openldap.org

Increasingly, instant messaging andother peer-to-peer technologies arelooking to be the foundation of the nextrevolution in Internet technologies.Gnutella and Freenet are peer-to-peerfile-sharing tools. Jabber® is an opensource instant messaging system witha client-server architecture that allowspeople to communicate with one another over different IM systems,including AOL’s Instant Messenger SM

(AIM) and ICQ.

Useful Book:� Peer-to-Peer: The Disruptive Potential

Behind Collaborative Networking Gene Kan, Jeremie Miller(forthcoming from O’Reilly)

Key Web Sites:www.jabber.org (developers)www.jabber.com (users)gnutella.wego.comfreenet.sourceforge.net

Peer-to-Peer Communication

Java™ XML and HTML Protocols, Standards, and Data Formats

Qmail: Dan Bernstein

sendmail: Eric Allman

Tcl/Tk: John Ousterhout

XFree86: Dirk Hohndel

COPYRIGHT © 2001

O’Reilly & Associates, Inc.

All trademarks are property

of their respective owners.

Created by Tim O’Reilly and Chuck Toporek

with review and input from Andy Oram,

Frank Pohlmann, Laurie Petrycki, and attendees

of the 2000 Open Source Convention

Designed by Kathryn Heflin and

David Bacigalupi with input from

the O’Reilly Marketing Design Group

Illustration by Jeff Reynolds Design

KEY CONTRIBUTORS:

Linux Kernel: Linus Torvalds, Alan Cox

BIND: Paul Vixie

Exim: Philip Hazel

glibc: Roland McGrath, Ulrich Drepper

GNU tools (Emacs and vision of the

free operating system) (gcc) (bash):

Richard M. Stallman

GNOME: Miguel de Icaza

KDE: Matthias Ettrich, Torben Weis

MySQL: Michael “Monty” Widenius

PHP: Rasmus Lerdorf

Perl: Larry Wall, Chip Salzenburg,

Tom Christiansen, Tim Bunce,

Gurusamy Sarathy

Python: Guido van Rossum

The X Window System, developed at MIT by Jim Gettys, Bob Scheifler, and ahost of contributors, is the foundation of all the Linux graphical user interfacetools. The Linux version of X is maintained by the XFree86 project under theleadership of Dirk Hohndel of SuSE. High-level programming toolkits for Xinclude GTK+, Qt,™ and Motif (which has recently been released asOpenMotif®).

Useful Books:� Volume 8: X Window System

Administrator’s GuideLinda Mui, Eric Pearce

� Linux X User’s GuideEllen Siever

� Programming with QtMatthias Kalle Dalheimer

� The Concise Guide to XFree86 for LinuxAron Hsiao (Que)

Miguel de Icaza’s GNOME (GNU Object Model Environment) is one of themost popular graphical desktop environments for Linux. Next-generation inter-faces based on GNOME are now being developed by companies such as HelixCode and Eazel.GNOME includes a choice of window managers, includingEnlightenment, Sawfish, and WM, plus facilities for creating applications withdrag-and-drop support, pull-down menus, and other GUI features. GTK (TheGIMP Toolkit) is the foundation for the GNOME programming language.GNU/GNOME is the default desktop environment for the Red Hat® and DebianLinux distributions.

Useful Books:� Learning Red Hat Linux

Bill McCarty� Learning Debian GNU/Linux

Bill McCarty� GTK+/Gnome Application Development

Havoc Pennington (New Riders)

The K Desktop Environment (KDE) was the first comprehensive graphical environment for Linux, and is still one of the most popular. KDE is built on topof the Qt™ Toolkit, which is now available under the Q Public License (or QPL).Qt is a product of Norway’s Trolltech AS and is the foundation of the KDE desk-top. KDE is the preferred environment on SuSE, Mandrake, and Corel Linux.Like GNOME, the KDE Group has developed a suite of office applicationscalled KOffice, which includes a word processor and programs for creating pre-sentations, spreadsheets, illustrations, and much more.

Useful Book:� KDE Application Development

Uwe Thiem (MTP)

The X Window System GNOME KDE

Key Web Sites:www.gnome.orgdeveloper.gnome.orgwww.gtk.orgwww.pango.orgwww.helixcode.comwww.eazel.com

Key Web Sites:www.xfree86.orgwww.x.orgwww.opengroup.org/openmotif Key Web Sites:

www.kde.orgdeveloper.kde.orgwww.konqueror.orgkoffice.kde.orgwww.trolltech.comwww.trolltech.com/qpl

Many people don’t realize that Bill Joyand his team at UC Berkeley originallydeveloped the implementation of theTCP/IP stack that forms the foundationof the Internet, including all commercialversions. The Linux version is deriveddirectly from the BSD code. BIND, theserver that implements the domainname system, was designed by PaulMockapetris and built by Paul Vixie,who still maintains it at the nonprofitInternet Software Consortium. ISCalso maintains INN, the most widelyused usenet news server software.

Useful Books:� Linux Network Administrator’s Guide

Olaf Kirch, Terry Dawson� TCP/IP Network Administration

Craig Hunt � DNS and BIND

Paul Albitz, Cricket Liu� Managing Usenet

Henry Spencer, David Lawrence

Key Web Sites:www.isc.orgwww.ietf.org

TCP/IP and the DNS

of open source software

will belong to people who start

from individual vision and brilliance,

then amplify it through the effective

construct ion of voluntary

communities of interest.

—ERIC S. RAYMOND

The Cathedral & The Bazaar

The cutting edge

9974

5

PR

OG

RAM

MERS

WEBMASTERS

SYSTEMAD

MIN

IST

RAT

OR

S

USERS