Praise For The Official Ubuntu Server Book

3y ago
27 Views
2 Downloads
1.01 MB
135 Pages
Last View : 14d ago
Last Download : 3m ago
Upload by : Troy Oden
Transcription

Rankin 3e FM Rankin 6/26/13 10:34 AM Page iPraise for The Official Ubuntu Server Book“Murphy’s Law is never truer than when it comes to administering a Linuxserver. You can pretty much count on something happening to your machine at a time when you need it the most. That’s when a book with somebasic troubleshooting instructions is worth every penny you paid for it.Chapter 11 covers the steps you should take when something goes wrong.”—Paul Ferrill, LinuxPlanet.com reviewer“College-level collections catering to Linux programmers and developerswill find The Official Ubuntu Server Book, a top addition to the collection,covering a complete, free server operating system in a guide to gettinggoing quickly. From making the most of Ubuntu Server’s latest technologies to automating installs and protecting the server using Ubuntu’s builtin security tools, The Official Ubuntu Server Book, is packed with keys tosuccess for any Ubuntu user.”—Jim Cox, Midwest Book Review“This book will get you started on the path of the server admin, bothwithin the context of Ubuntu server and in the larger realm of managing aserver infrastructure. The desktop and server versions of Ubuntu are continuing to mature. Read this book if you want to keep up.”—James Pyles, author

Rankin 3e FM Rankin 6/26/13 10:34 AM Page ii

Rankin 3e FM Rankin 6/26/13 10:34 AM Page iiiThe OfficialUbuntuServer BookThird EditionKyle RankinBenjamin Mako HillUpper Saddle River, NJ Boston Indianapolis San FranciscoNew York Toronto Montreal London Munich Paris MadridCapetown Sydney Tokyo Singapore Mexico City

Rankin 3e FM Rankin 6/26/13 10:34 AM Page ivMany of the designations used by manufacturers and sellers to distinguish their products are claimedas trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.The authors and publisher have taken care in the preparation of this book, but make no expressed orimplied warranty of any kind and assume no responsibility for errors or omissions. No liability isassumed for incidental or consequential damages in connection with or arising out of the use of theinformation or programs contained herein.The publisher offers excellent discounts on this book when ordered in quantity for bulk purchasesor special sales, which may include electronic versions and/or custom covers and content particularto your business, training goals, marketing focus, and branding interests. For more information,please contact:U.S. Corporate and Government Sales(800) 382-3419corpsales@pearsontechgroup.comFor sales outside the United States please contact:International Salesinternational@pearson.comVisit us on the Web: informit.com/phCataloging-in-Publication Data is on file with the Library of Congress.Copyright 2014 Canonical, Ltd.All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction,storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical,photocopying, recording, or likewise. For information regarding permissions, write to:Pearson Education, Inc.Rights and Contracts Department501 Boylston Street, Suite 900Boston, MA 02116Fax: (617) 671-3447The Introduction and Chapter 3 of this book are published under the Creative CommonsAttribution-ShareAlike 3.0 license, N-13: 978-0-13-301753-3ISBN-10:0-13-301753-2Text printed in the United States on recycled paper at Edwards Brothers Malloy in Ann Arbor, Michigan.First printing, July 2013

Rankin 3e FM Rankin 6/26/13 10:34 AM Page vI dedicate this book to my wife, Joy. It is not easy to balance a full-timejob and writing a book while still having time for a family. She hasendured many a book-writing process at this point and has always beenmy main source of support and motivation.—Kyle Rankin

Rankin 3e FM Rankin 6/26/13 10:34 AM Page vi

Rankin 3e FM Rankin 6/26/13 10:34 AM Page viiContents at a GlanceContentsixPrefacexixAcknowledgmentsxxvAbout the AuthorsxxviiIntroductionxxixChapter 1: Installation1Chapter 2: Essential System Administration17Chapter 3: Package Management51Chapter 4: Automated Ubuntu Installs83Chapter 5: Guide to Common Ubuntu Servers125Chapter 6: Security199Chapter 7: Backups239Chapter 8: Monitoring267Chapter 9: Virtualization and Cloud Computing297Chapter 10: Fault Tolerance341Chapter 11: Troubleshooting399Chapter 12: Rescue and Recovery429Chapter 13: Help and Resources449Chapter 14: Basic Linux Administration463Appendix: Cool Tips and Tricks485Index495vii

Rankin 3e FM Rankin 6/26/13 10:34 AM Page viii

Rankin 3e FM Rankin 6/26/13 10:34 AM Page ixContentsPrefacexixAcknowledgmentsxxvAbout the AuthorsxxviiIntroductionxxixWelcome to Ubuntu ServerFree Software, Open Source, and LinuxFree Software and GNULinuxOpen SourceA Brief History of the Ubuntu ProjectMark ShuttleworthThe WarthogsWhat Does Ubuntu Mean?Creating CanonicalThe Ubuntu CommunityUbuntu Promises and GoalsPhilosophical GoalsConduct Goals and Code of ConductTechnical GoalsCanonical and the Ubuntu FoundationCanonical, Ltd.Canonical’s Service and SupportThe Ubuntu FoundationHistory of Ubuntu ServerSimple, Secure, ixliCHAPTER 1 Installation1Get UbuntuBoot Screen23ix

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xxContentsDisk PartitioningWhat Is a Partition?Guided—Use Entire DiskGuided with LVMManualServer RolesInstaller ConsoleReboot the SystemCHAPTER 2 Essential System AdministrationBasic Command-Line AdministrationMove Around the SystemFile OwnershipCheck Running ProcessesEdit FilesBecome RootUbuntu Boot ProcessGRUBThe Kernel Boot Process/sbin/initServicesFile System HierarchyNetworkingNetwork Configuration FilesCore Networking ProgramsCHAPTER 3 Package ManagementIntroduction to Package ManagementBackground on PackagesWhat Are Packages?Basic Functions of Package ManagementAdvanced Functions of Package Management SystemsDebian PackagesSource PackagesBinary PackagesPackage Management in UbuntuStaying Up-to-DateSearching and BrowsingInstallation and RemovalManipulating Installed PackagesManipulating 54648515253535558606063636465676971

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xiContentsUbuntu Default RepositoriesUsing Other RepositoriesUpgrading a Whole SystemMirroring a SystemMaking Your Own PackagesRebuilding PackagesNew Upstream VersionsBuilding Packages from ScratchHosting Your Own PackagesCHAPTER 4 Automated Ubuntu InstallsPreseedingBasic Preseed Configuration for CD-ROMNetworking OptionsPartitioningPackages and MirrorsUser SettingsGRUBMiscellaneousDynamic PreseedingKickstartBasic Kickstart Configuration for CD-ROMChanges and Limitations in Ubuntu KickstartRun Custom Commands during the InstallPXE Boot Server DeploymentDHCPTFTPDConfigure PxelinuxWebTest Your PXE ServerCustomize Automated InstallsMultiple Kickstart FilesBoot Cheat CodesDHCP SelectionDHCP Selection by SubnetCHAPTER 5 Guide to Common Ubuntu ServersDNS ServerInstall BINDUbuntu ConventionsCaching Name 27127129

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xiixiiContentsDNS MasterDNS SlaveManage BIND with rndcWeb ServerInstall a Web ServerUbuntu Apache Conventionsapache2ctlApache DocumentationWordPress, a Sample LAMP EnvironmentMail ServerInstall PostfixPostfix Configuration TypesUbuntu Postfix ConventionsAdministering PostfixDefault Postfix ExampleSecondary Mail ServerGreylisting Mail ServerPOP/IMAP ServerEnable Maildirs on PostfixInstall DovecotUbuntu Dovecot ConventionsOpenSSH ServerUbuntu OpenSSH ConventionsDHCP ServerInstall DHCPUbuntu DHCP ConventionsConfigure DHCPDatabase ServerMySQLPostgreSQLFile ServerSambaNFSEdubuntu and LTSPWhat Is LTSP?Technical Details of the LTSP Boot ProcessThe Benefits of LTSPOther UsesLTSP Availability in UbuntuInstalling an LTSP 74177180180181182183183183

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xiiiContentsLTSP Server ConfigurationsThe Installation ProcedureInitial LTSP Server SetupInitial LTSP Client SetupInstalling the LTSP Environment in Ubuntu oron a Desktop InstallationSpecial LTSP CasesChanging Your IP AddressLocal Devices over LTSPSound over LTSPCHAPTER 6 SecurityGeneral Security PrinciplesSudoConfigure sudosudo AliasesAppArmorAppArmor ProfilesEnforce and Complain ModesUbuntu AppArmor ConventionsSSH Securitysshd configKey-Based AuthenticationSSH Brute-Force AttacksFirewallsufw Commandsufw Rule SyntaxExtended ufw Rulesufw ExamplesUbuntu ufw ConventionsIntrusion DetectionUpdate Tripwire PolicyInitialize the Tripwire DatabaseUpdate the Tripwire DatabaseUbuntu Tripwire ConventionsIncident ResponseDo You Prosecute?Pull the PlugImage the ServerServer 218220224226227229230232233233233234234235

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xivxivContentsCHAPTER 7 BackupsBackup PrinciplesDrive ImagingDatabase BackupsMySQLPostgreSQLBackupPCBackupPC StorageDefault BackupPC ConfigurationConfigure the Client MachineAdd the Client to BackupPCStart the First Backup Jobrsync TweaksRestore FilesUbuntu BackupPC ConventionsCHAPTER 8 MonitoringLocal Monitoring ToolsSmartmontoolssysstatGangliaInstall ganglia-monitor on All HostsConfigure Ganglia ServerInstall the Ganglia Web Front EndNagiosInstall GroundWorkGroundWork File ConventionsInitial ConfigurationConfigure NagiosCommit Changes to NagiosConfigure Contact ListEnable Notifications for NagiosAdd a Service Check to a HostAdd a New HostAdvanced ConfigurationMore GroundWork InformationCHAPTER 9 Virtualization and Cloud ComputingKVMInstall KVMEnable Support in 291292296297298298299

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xvContentsxvInstall KVM PackagesConfigure KVM NetworkingCreate a New VMExtra vmbuilder OptionsManage VMs with virshKVM Graphical Console and Management ToolsAmazon EC2Register an AccountSetting Up EC2 API ToolsCreate an ssh Key PairPick an Amazon AMISecurity GroupsSSH into the InstanceStart, Stop, and Terminate an InstanceUserdata ScriptsJujuInstall and Configure JujuJuju BootstrapDeploy Juju ServicesFault ToleranceDestroying 7328330330333333337338CHAPTER 10 Fault ToleranceFault Tolerance PrinciplesRAIDRAID LevelsConfigure RAID during InstallationConfigure RAID after InstallationSoftware RAID ManagementMigrate Non-RAID to Software RAIDMigrate from RAID 1 to RAID 5Add a Drive to a RAID 5 ArrayLVMLVM Theory and JargonSetting Up LVMEthernet BondingUbuntu 10.04 Network ConfigurationUbuntu 12.04 and Newer Network ConfigurationEnable the Bonded 2375376377

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xvixviContentsClustersHeartbeatDRBDCHAPTER 11 TroubleshootingGeneral Troubleshooting PhilosophyDivide the Problem SpaceFavor Quick, Simple Tests over Slow, Complex TestsFavor Past SolutionsGood Communication Is CriticalWhen CollaboratingUnderstand How Systems WorkDocument Your Problems and SolutionsUse the Internet, but CarefullyResist RebootingLocalhost TroubleshootingHost Is Sluggish or UnresponsiveOut of Disk SpaceNetwork TroubleshootingServer A Can’t Talk to Server BCan I Route to the Remote Host?Test the Remote Host LocallyHardware TroubleshootingNetwork Card ErrorsTest Hard DrivesTest RAMCHAPTER 12 Rescue and RecoveryUbuntu Recovery ModeFile Systems Won’t MountProblem Init ScriptsReset PasswordsUbuntu Server Recovery CDBoot into the Recovery CDRecover GRUBRepair the Root File SystemUbuntu Desktop Live CDBoot the Live CDAdd the Universe RepositoryRecover Deleted 8438439439439440

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xviiContentsRestore the Partition TableRescue Dying DrivesCHAPTER 13 Help and ResourcesPaid Support from CanonicalForumsInternet Relay ChatMailing ListsOnline DocumentationLocalhost DocumentationLocal Community TeamsOther LanguagesTech Answers System (Launchpad)Bug ReportingFor More InformationCHAPTER 14 Basic Linux 457458459459459461463Shell GlobsRegular ExpressionsPipes and RedirectionRedirectionFile Permissions and OwnershipchmodLinux File TypesSymbolic LinksHard LinksDevice FilesAt and ool Tips and Tricks485Avoid That grep Command in grep OutputShortcut to a Command PathWipe a Drive in One LineRun a Command Over and OverMake a Noise When the Server Comes Back UpSearch and Replace Text in a Filefind and exec Commands485486486487487487488

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xviiixviiiContentsBash Commands with Too Many ArgumentsUse Your Bash HistoryAre These Files Identical?Go Back to Your Previous DirectoryFind Out Who Is Tying Up a File System YouWant to UnmountSend a Test E-mail Using telnetEasy SSH Key SharingGet the Most Out of DigIndex488489489489490490491492495

Rankin 3e FM Rankin 6/26/13 10:34 AM Page xixPrefaceWELCOME to the third edition of The Official Ubuntu Server Book!When most people talk about Ubuntu these days, they tend to talk aboutthe Ubuntu Desktop. After all, it’s the easy-to-use, “just works” approachto the desktop that has made Ubuntu one of the most popular desktopLinux distributions. What has gotten less attention, although even that isstarting to change, is Ubuntu Se

in security tools, The Official Ubuntu Server Book, is packed with keys to success for any Ubuntu user.” —Jim Cox, Midwest Book Review “This book will get you started on the path of the server admin, both within the context of Ubuntu server and in the larger realm of managing a server infrastructure.

Related Documents:

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

covering a complete, free server operating system in a guide to getting going quickly. From making the most of Ubuntu Server's latest technolo-gies to automating installs and protecting the server using Ubuntu's built-in security tools, The Official Ubuntu Server Book, is packed with keys to success for any Ubuntu user."

Song of Praise Knut Nystedt Praise the Lord! Praise the Lord from the heavens. Praise the Lord! Praise the Lord in the heights. Praise him all his angels, praise him all his hosts. Praise him sun and moon, praise him all you shining stars! Praise him you highest heavens, and the waters above the heavens.

Ubuntu Hardware Summit 2011 Ubuntu is the leading Linux OS in the cloud Ubuntu is the default solution for OpenStack implementations. Dell, HP and Rackspace endorse Ubuntu with Openstack #1 Cloud IaaS infrastructure Four of the six leading PaaS platforms are built on Ubuntu including: Cloud Foundry, EngineYard, Active State & Heroku