The Practice of System and Network Administration

system and network administration lecture notes and system and network administration tutorial download free pdf
VoiletFord Profile Pic
VoiletFord,United States,Professional
Published Date:12-07-2017
Your Website URL(Optional)
Preface Ourgoalforthisbookhasbeentowritedowneverythingwe’velearnedfrom our mentors and to add our real-world experiences. These things are beyond what the manuals and the usual system administration books teach. This book was born from our experiences as SAs in a variety of organi- zations. We have started new companies. We have helped sites to grow. We have worked at small start-ups and universities, where lack of funding was anissue.Wehaveworkedatmidsizeandlargemultinationals,wheremergers and spin-offs gave rise to strange challenges. We have worked at fast-paced companies that do business on the Internet and where high-availability, high- performance, and scaling issues were the norm. We’ve worked at slow-paced companies at which high tech meant cordless phones. On the surface, these are very different environments with diverse challenges; underneath, they have the same building blocks, and the same fundamental principles apply. This book gives you a framework—a way of thinking about system ad- ministration problems—rather than narrow how-to solutions to particular problems. Given a solid framework, you can solve problems every time they appear,regardlessoftheoperatingsystem(OS),brandofcomputer,ortypeof environment. This book is unique because it looks at system administration from this holistic point of view; whereas most other books for SAs focus on how to maintain one particular product. With experience, however, all SAs learn that the big-picture problems and solutions are largely independent of the platform. This book will change the way you approach your work as an SA. The principles in this book apply to all environments. The approaches describedmayneedtobescaledupordown,dependingonyourenvironment, but the basic principles still apply. Where we felt that it might not be obvious how to implement certain concepts, we have included sections that illustrate how to apply the principles at organizations of various sizes. xxvxxvi Preface This book is not about how to configure or debug a particular OS and will not tell you how to recover the shared libraries or DLLs when someone accidentally moves them. Some excellent books cover those topics, and we refer you to many of them throughout. Instead, we discuss the principles, bothbasicandadvanced,ofgoodsystemadministrationthatwehavelearned through our own and others’ experiences. These principles apply to all OSs. Following them well can make your life a lot easier. If you improve the way you approach problems, the benefit will be multiplied. Get the fundamentals right, and everything else falls into place. If they aren’t done well, you will 1 waste time repeatedly fixing the same things, and your customers will be unhappy because they can’t work effectively with broken machines. Who Should Read This Book This book is written for system administrators at all levels. It gives junior SAs insight into the bigger picture of how sites work, their roles in the organiza- tions, and how their careers can progress. Intermediate SAs will learn how to approach more complex problems and how to improve their sites and make their jobs easier and their customers happier. Whatever level you are at, this book will help you to understand what is behind your day-to-day work, to learn the things that you can do now to save time in the future, to decide policy, to be architects and designers, to plan far into the future, to nego- tiate with vendors, and to interface with management. These are the things that concern senior SAs. None of them are listed in an OS’s manual. Even senior SAs and systems architects can learn from our experiences and those of our colleagues, just as we have learned from each other in writing this book. We also cover several management topics for SA trying to understand their managers, for SAs who aspire to move into management, and for SAs finding themselves doing more and more management without the benefit of the title. Throughout the book, we use examples to illustrate our points. The ex- amplesaremostlyfrommediumorlargesites,wherescaleaddsitsownprob- lems. Typically, the examples are generic rather than specific to a particular OS; where they are OS-specific, it is usually UNIX or Windows. One of the strongest motivations we had for writing this book is the understanding that the problems SAs face are the same across all OSs. A new 1. Throughout the book, we refer to the end users of our systems as customers rather than users.A detailed explanation of why we do this is in Section 31.1.2.Preface xxvii OS that is significantly different from what we are used to can seem like a black box, a nuisance, or even a threat. However, despite the unfamiliar interface, as we get used to the new technology, we eventually realize that we face the same set of problems in deploying, scaling, and maintaining the new OS. Recognizing that fact, knowing what problems need solving, and understanding how to approach the solutions by building on experience with other OSs lets us master the new challenges more easily. We want this book to change your life. We want you to become so suc- cessful that if you see us on the street, you’ll give us a great big hug. Basic Principles If we’ve learned anything over the years, it is the importance of simplicity, clarity, generality, automation, communication, and doing the basics first. These six principles are recurring themes in this book. 1. Simplicity means that the smallest solution that solves the entire problem is the best solution. It keeps the systems easy to understand and reduces complex component interactions that can cause debugging nightmares. 2. Clarity means that the solution is straightforward. It can be easily explained to someone on the project or even outside the project. Clarity makes it easier to change the system, as well as to maintain and debug it. In the system administration world, it’s better to write five lines of understandable code than one line that’s incomprehensible to anyone else. 3. Generality means that the solutions aren’t inherently limited to a particular case. Solutions can be reused. Using vendor-independent open standard protocols makes systems more flexible and makes it easier to link software packages together for better services. 4. Automation means using software to replace human effort. Automa- tion is critical. Automation improves repeatability and scalability, is key to easing the system administration burden, and eliminates tedious repetitive tasks, giving SAs more time to improve services. 5. Communication between the right people can solve more problems than hardware or software can. You need to communicate well with other SAs and with your customers. It is your responsibility to initiate communication. Communication ensures that everyone is workingxxviii Preface toward the same goals. Lack of communication leaves people con- cerned and annoyed. Communication also includes documentation. Documentation makes systems easier to support, maintain, and upgrade. Good communication and proper documentation also make it easier to hand off projects and maintenance when you leave or take on a new role. 6. Basics first means that you build the site on strong foundations by identifying and solving the basic problems before trying to attack more advanced ones. Doing the basics first makes adding advanced features considerably easier and makes services more robust. A good basic infrastructure can be repeatedly leveraged to improve the site with relatively little effort. Sometimes, we see SAs making a huge effort to solve a problem that wouldn’t exist or would be a simple enhancement if the site had a basic infrastructure in place. This book will help you identify what the basics are and show you how the other five principles apply. Each chapter looks at the basics of a given area. Get the fundamentals right, and everything else will fall into place. These principles are universal. They apply at all levels of the system. They apply to physical networks and to computer hardware. They apply to all operating systems running at a site, all protocols used, all software, and all services provided. They apply at universities, nonprofit institutions, government sites, businesses, and Internet service sites. What Is an SA? If you asked six system administrators to define their jobs, you would get seven different answers. The job is difficult to define because system admin- istrators do so many things. An SA looks after computers, networks, and the people who use them. An SA may look after hardware, operating systems, software, configurations, applications, or security. A system administrator influences how effectively other people can or do use their computers and networks. A system administrator sometimes needs to be a business-process con- sultant, corporate visionary, janitor, software engineer, electrical engineer, economist, psychiatrist, mindreader, and, occasionally, a bartender. As a result, companies calls SAs different names. Sometimes, they are called network administrators, system architects, system engineers, system programmers, operators and so on.Preface xxix This book is for “all of the above.” Wehaveaverygeneraldefinitionofsystemadministrator:onewhoman- agescomputerandnetworksystemsonbehalfofanother,suchasanemployer or a client. SAs are the people who make things work and keep it all running. Explaining What System Administration Entails It’s difficult to define system administration, but trying to explain it to a nontechnical personisevenmoredifficult,especiallyifthatpersonisyourmom.Momshavetheright to know how their offspring are paying their rent. A friend of Christine Hogan’s always had trouble explaining to his mother what he did for a living and ended up giving a different answer every time she asked. Therefore, she kept repeating the question every couple of months, waiting for an answer that would be meaningful to her. Then he started working for WebTV. When the product became available, he bought one for his mom. From then on, he told her that he made sure that her WebTV service was working and was as fast as possible. She was very happy that she could now show her friends something and say, “That’s what my son does” System Administration Matters System administration matters because computers and networks matter. Computers are a lot more important than they were years ago. What happened? The widespread use of the Internet, intranets, and the move to a web- centric world has redefined the way companies depend on computers. The Internetisa24/7operation,andsloppyoperationscannolongerbetolerated. Paper purchase orders can be processed daily, in batches, with no one the wiser. However, there is an expectation that the web-based system that does theprocesswillbeavailableallthetime,fromanywhere.Nightlymaintenance windows have become an unheard-of luxury. That unreliable machine room power system that caused occasional but bearable problems now prevents sales from being recorded. Managementnowhasamorerealisticviewofcomputers.Beforetheyhad PCs on their desktops, most people’s impressions of computers were based on how they were portrayed in film: big, all-knowing, self-sufficient, miracle machines. The more people had direct contact with computers, the more realisticpeople’sexpectationsbecame.Nowevensystemadministrationitself is portrayed in films. The 1993 classicJurassicPark was the first mainstream Preface The movie also showed how depending on one person is a disaster waiting to happen. IT is a team sport. If only Dennis Nedry had read this book. In business, nothing is important unless the CEO feels that it is im- portant. The CEO controls funding and sets priorities. CEOs now consider IT to be important. Email was previously for nerds; now CEOs depend on email and notice even brief outages. The massive preparations for Y2K also brought home to CEOs how dependent their organizations have become on computers, how expensive it can be to maintain them, and how quickly a purely technical issue can become a serious threat. Most people do not think that they simply “missed the bullet” during the Y2K change but that prob- lems were avoided thanks to tireless efforts by many people. A CBS Poll shows 63 percent of Americans believe that the time and effort spent fixing potential problems was worth it. A look at the news lineups of all three major network news broadcasts from Monday, January 3, 2000, reflects the same feeling. Previously,peopledidnotgrowupwithcomputersandhadtocautiously learn about them and their uses. Now more and more people grow up using computers, which means that they have higher expectations of them when they are in positions of power. The CEOs who were impressed by automatic payroll processing are soon to be replaced by people who grew up sending instant messages and want to know why they can’t do all their business via text messaging. Computers matter more than ever. If computers are to work and work well, system administration matters. We matter. Organization of This Book This book has the following major parts: • PartI:GettingStarted.This isalongbook,sowestartwithanoverview of what to expect (Chapter 1) and some tips to help you find enough time to read the rest of the book (Chapter 2). • Part II: Foundation Elements. Chapters 3–14 focus on the foundations of IT infrastructure, the hardware and software that everything else depends on. • Part III: Change Processes. Chapters 15–21 look at how to make changes to systems, starting with fixing the smallest bug to massive reorganizations.Preface xxxi • PartIV:ProvidingServices.Chapters22–29offerouradviceonbuilding seven basic services, such as email, printing, storage, and web services. • Part V: Management Practices. Chapters 30–36 provide guidance— whether or not you have “manager” in your title. • The two appendixes provide an overview of the positive and negative roles that SAs play and a list of acronyms used in the book. Each chapter discusses a separate topic; some topics are technical, and some are nontechnical. If one chapter doesn’t apply to you, feel free to skip it. The chapters are linked, so you may find yourself returning to a chapter that you previously thought was boring. We won’t be offended. Each chapter has two major sections. The Basics discusses the essentials that you simply have to get right. Skipping any of these items will simply create more work for you in the future. Consider them investments that pay off in efficiency later on. The Icing deals with the cool things that you can do to be spectacular. Don’t spend your time with these things until you are done withthebasics.Wehavetriedtodrivethepointshomethroughanecdotesand case studies from personal experience. We hope that this makes the advice here more “real” for you. Never trust salespeople who don’t use their own products. What’s New in the Second Edition We received a lot of feedback from our readers about the first edition. We spoke at conferences and computer user groups around the world. We received a lot of email. We listened. We took a lot of notes. We’ve smoothed the rough edges and filled some of the major holes. The first edition garnered a lot of positive reviews and buzz. We were veryhonored.However,thepassingoftimemadecertainchapterslookpasse. ´ Thefirstedition,inbookstoresAugust2001,waswrittenmostlyin2000. Things were very different then. At the time, things were looking pretty grim as the dot-com boom had gone bust. Windows 2000 was still new, Solaris was king, and Linux was popular only with geeks. Spam was a nuisance, not an industry. Outsourcing had lost its luster and had gone from being the corporate savior to a late-night comedy punch line. Wikis were a research idea, not the basis for the world’s largest free encyclopedia. Google was nei- ther a household name nor a verb. Web farms were rare, and “big sites” served millions of hits per day, not per hour. In fact, we didn’t have a chapterxxxii Preface on running web servers, because we felt that all one needed to know could be inferred by reading the right combination of the chapters: Data Centers, Servers, Services, and Service Monitoring. What more could people need? My, how things have changed Linux is no longer considered a risky proposition, Google is on the rise, andoffshoringisthenewbuzzword.TheriseofIndiaandChinaaseconomic superpowershaschangedthewaywethinkabouttheworld.AJAXandother Web 2.0 technologies have made the web applications exciting again. Here’s what’s new in the book: • Updatedchapters:Everychapterhasbeenupdatedandmodernizedand new anecdotes added. We clarified many, many points. We’ve learned a lot in the past five years, and all the chapters reflect this. References to old technologies have been replaced with more relevant ones. • New chapters: – Chapter 9: Documentation – Chapter 25: Data Storage – Chapter 29: Web Services • Expanded chapters: – The first edition’s Appendix B, which had been missed by many read- ers who didn’t read to the end of the book, is now Chapter 1: What to Do When .... – The first edition’s Do These First section in the front matter has ex- panded to become Chapter 2: Climb Out of the Hole. • Reordered table of contents: – Part I: Getting Started: introductory and overview material – Part II: Foundation Elements: the foundations of any IT system – Part III: Change Processes: how to make changes from the smallest to the biggest – Part IV: Providing Services: a catalog of common service offerings – Part V: Management Practices: organizational issuesPreface xxxiii What’s Next Each chapter is self-contained. Feel free to jump around. However, we have carefully ordered the chapters so that they make the most sense if you read the book from start to finish. Either way, we hope that you enjoy the book. We have learned a lot and had a lot of fun writing it. Let’s begin. Thomas A. Limoncelli Google, Inc. Christina J. Hogan BMW Sauber F1 Team Strata R. Chalup Virtual.Net, Inc. P.S. Books, like software, always have bugs. For a list of updates, along with news and notes, and even a mailing list you can join, please visit our web site: page intentionally left blank Acknowledgments Acknowledgments for the First Edition We can’t possibly thank everyone who helped us in some way or another, but that isn’t going to stop us from trying. Much of this book was inspired by Kernighan and Pike’s The Practice of Programming (Kernighan and Pike 1999) and John Bentley’s second edition of Programming Pearls (Bentley 1999). We are grateful to Global Networking and Computing (GNAC), Synop- sys, and Eircom for permitting us to use photographs of their data center fa- cilitiestoillustratereal-lifeexamplesofthegoodpracticesthatwetalkabout. We are indebted to the following people for their helpful editing: Valerie Natale, Anne Marie Quint, Josh Simon, and Amara Willey. The people we have met through USENIX and SAGE and the LISA con- ferences have been major influences in our lives and careers. We would not bequalifiedtowritethisbookifwehadn’tmetthepeoplewedidandlearned so much from them. Dozens of people helped us as we wrote this book—some by supplying anecdotes,somebyreviewingpartsofortheentirebook,othersbymentoring us during our careers. The only fair way to thank them all is alphabetically and to apologize in advance to anyone that we left out: Rajeev Agrawala, Al Aho,JeffAllen,EricAnderson,AnnBenninger,EricBerglund,MelissaBinde, Steven Branigan, Sheila Brown-Klinger, Brent Chapman, Bill Cheswick, Lee Damon, Tina Darmohray, Bach Thuoc (Daisy) Davis, R. Drew Davis, Ingo Dean,ArnolddeLeon,JimDennis,BarbaraDijker,ViktorDukhovni,Chelle- Marie Ehlers, Michael Erlinger, Paul Evans, Remy ´ Evard, Lookman Fazal, Robert Fulmer, Carson Gaspar, Paul Glick, David “Zonker” Harris, Kather- ine “Cappy” Harrison, Jim Hickstein, Sandra Henry-Stocker, Mark Horton, Bill“Whump”Humphries,TimHunter,JeffJensen,JenniferJoy,AlanJudge, ChristopheKalt,ScottC.Kennedy,BrianKernighan,JimLambert,EliotLear, xxxvxxxvi Acknowledgments Steven Levine, Les Lloyd, Ralph Loura, Bryan MacDonald, Sherry McBride, MarkMellis,CliffMiller,HalMiller,RuthMilner,D.TobyMorrill,JoeMor- ris,TimothyMurphy,RaviNarayan,Nils-PeterNelson,EviNemeth,William Ninke, Cat Okita, Jim Paradis, Pat Parseghian, David Parter, Rob Pike, Hal Pomeranz, David Presotto, Doug Reimer, Tommy Reingold, Mike Richichi, Matthew F. Ringel, Dennis Ritchie, Paul D. Rohrigstamper, Ben Rosengart, David Ross, Peter Salus, Scott Schultz, Darren Shaw, Glenn Sieb, Karl Siil, Cicely Smith, Bryan Stansell, Hal Stern, Jay Stiles, Kim Supsinkas, Ken Thompson, Greg Tusar, Kim Wallace, The Rabbit Warren, Dr. Geri Weitz- man, PhD, Glen Wiley, Pat Wilson, Jim Witthoff, Frank Wojcik, Jay Yu, and Elizabeth Zwicky. Thanks also to Lumeta Corporation and Lucent Technologies/Bell Labs for their support in writing this book. Last but not least, the people at Addison-Wesley made this a particularly greatexperienceforus.Inparticular,ourgratitudeextendstoKarenGettman, Mary Hart, and Emily Frey. Acknowledgments for the Second Edition In addition to everyone who helped us with the first edition, the second edi- tion could not have happened without the help and support of Lee Damon, Nathan Dietsch, Benjamin Feen, Stephen Harris, Christine E. Polk, Glenn E. Sieb, Juhani Tali, and many people at the League of Professional System Ad- ministrators (LOPSA). Special 73s and 88s to Mike Chalup for love, loyalty, and support, and especially for the mountains of laundry done and oceans of dishes washed so Strata could write. And many cuddles and kisses for baby Joanna Lear for her patience. Thanks to Lumeta Corporation for giving us permission to publish a second edition. Thanks to Wingfoot for letting us use its server for our bug-tracking database. Thanks to Anne Marie Quint for data entry, copyediting, and a lot of great suggestions. And last but not least, a big heaping bowl of “couldn’t have done it without you” to Mark Taub, Catherine Nolan, Raina Chrobak, and Lara Wysong at Addison-Wesley.About the Authors Tom, Christine, and Strata know one another through attending USENIX conferences and being actively involved in the system administration com- munity. It was at one of these conferences that Tom and Christine first spoke about collaborating on this book. Strata and Christine were coworkers at Synopsys and GNAC, and coauthored Chalup, Hogan et al. (1998). Thomas A. Limoncelli Tom is an internationally recognized author and speaker on system adminis- tration, time management, and grass-roots political organizing techniques. A system administrator since 1988, he has worked for small and large compa- nies, including Google, Cibernet Corp, Dean for America, Lumeta, AT&T, Lucent/Bell Labs, and Mentor Graphics. At Google, he is involved in improv- ing how IT infrastructure is deployed at new offices. When AT&T trivested into AT&T, Lucent, and NCR, Tom led the team that split the Bell Labs computing and network infrastructure into the three new companies. In addition to the first and second editions of this book, his published works include Time Management for System Administration (2005), and papers on security, networking, project management, and personal career management. He travels to conferences and user groups frequently, often teachingtutorials,facilitatingworkshops,presentingpapers,orgivinginvited talks and keynote speeches. Outside of work, Tom is a grassroots civil-rights activist who has re- ceived awards and recognition on both state and national levels. Tom’s first published paper (Limoncelli 1997) extolled the lessons SAs can learn from activists. Tom doesn’t see much difference between his work and activism careers—both are about helping people. He holds a B.A. in computer science from Drew University. He lives in Bloomfield, New Jersey. xxxviixxxviii About the Authors For their community involvement, Tom and Christine shared the 2005 Outstanding Achievement Award from USENIX/SAGE. Christina J. Hogan Christine’s system administration career started at the Department of Mathe- matics in Trinity College, Dublin, where she worked for almost 5 years. After that, she went in search of sunshine and moved to Sicily, working for a year in a research company, and followed that with 5 years in California. She was the security architect at Synopsys for a couple of years before joining some friends at GNAC a few months after it was founded. While there, she worked with start-ups, e-commerce sites, biotech companies, and large multinational hardware and software companies. On the technical side, shefocusedonsecurityandnetworking,workingwithcustomersandhelping GNAC establish its data center and Internet connectivity. She also became involved with project management, customer management, and people man- agement. After almost 3 years at GNAC, she went out on her own as an independent security consultant, working primarily at e-commerce sites. Since then, she has become a mother and made a career change: she now works as an aerodynamicist for the BMW Sauber Formula 1 Racing Team. She has a Ph.D. in aeronautical engineering from Imperial College, London;aB.A.inmathematicsandanM.Sc.incomputersciencefromTrinity College, Dublin; and a Diploma in legal studies from the Dublin Institute of Technology. Strata R. Chalup Strata is the owner and senior consultant of Virtual.Net, Inc., a strategic and best-practices IT consulting firm specializing in helping small to midsize firms scale their IT practices as they grow. During the first dot-com boom, Strata architected scalable infrastructures and managed some of the teams that built them for such projects as, the Palm VII, and Founded as a sole proprietorship in 1993, Virtual.Net was incorporated in 2005. Clients have included such firms as Apple, Sun, Cimflex Teknowledge, Cisco, McAfee, and Micronas USA. Strata joined the computing world on TOPS-20 on DEC mainframes in 1981, then got well and truly sidetracked onto administering UNIX by 1983, with Ultrix on the VAX 11-780, Unisys on Motorola 68K micro sys- tems, and a dash of Minix on Intel thrown in for good measure. She has theAbout the Authors xxxix unusual perspective of someone who has been both a user and an adminis- trator of Internet services since 1981 and has seen much of what we consider the modern Net evolve, sometimes from a front-row seat. An early adopter and connector, she was involved with the early National Telecommunica- tions Infrastructure Administration (NTIA) hearings and grant reviews from 1993–1995 and demonstrated the emerging possibilities of the Internet in 1994, creating NTIA’s groundbreaking virtual conference. A committed fu- turist, Strata avidly tracks new technologies for collaboration and leverages them for IT and management. Always a New Englander at heart, but marooned in California with a snow-hating spouse, Strata is an active gardener, reader of science fic- tion/fantasy, and emergency services volunteer in amateur radio (KF6NBZ). She is SCUBA-certified but mostly free dives and snorkles. Strata has spent a couple of years as a technomad crossing the country by RV, first in 1990 and again in 2002, consulting from the road. She has made a major hobby of studying energy-efficient building construction and design, including taking owner-builder classes, and really did grow up on a goat farm. Unlike her illustrious coauthors, she is an unrepentent college dropout, having left MIT during her sophmore year. She returned to manage the Cen- ter for Cognitive Science for several years, and to consult with the EECS Computing Services group, including a year as postmastermit-eddie, before heading to Silicon Valley.This page intentionally left blank PartI Getting StartedThis page intentionally left blank Chapter1 What to Do When ... In this chapter, we pull together the various elements from the rest of the book to provide an overview of how they can be used to deal with everyday situations or to answer common questions system administrators (SAs) and managers often have. 1.1 Building a Site from Scratch • Think about the organizational structure you need—Chapter 30. • Check in with management on the business priorities that will drive implementation priorities. • Plan your namespaces carefully—Chapter 8. • Build a rock-solid data center—Chapter 6. • Build a rock-solid network designed to grow—Chapter 7. • Build services that will scale—Chapter 5. • Build a software depot, or at least plan a small directory hierarchy that can grow into a software depot—Chapter 28. • Establish your initial core application services: – Authentication and authorization—Section 3.1.3 – Desktop life-cycle management—Chapter 3 – Email—Chapter 23 – File service, backups—Chapter 26 – Network configuration—Section 3.1.3 – Printing—Chapter 24 – Remote access—Chapter 27 3

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.