Red Hat Cert Guide

Transcription

Red Hat RHCSA /RHCE 7Cert Guide:Red Hat Enterprise Linux 7(EX200 and EX300)Sander van Vugt800 East 96th StreetIndianapolis, Indiana 46240 USA

Red Hat RHCSA/RHCE 7 Cert Guide: Red Hat EnterpriseLinux 7 (EX200 and EX300)PublisherPaul BogerSander van VugtAssociate PublisherDavid DusthimerCopyright 2016 Pearson CertificationPublished by:Pearson IT Certification800 East 96th StreetIndianapolis, IN 46240 USAAll rights reserved. No part of this book may be reproduced or transmittedin any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system,without written permission from the publisher, except for the inclusion ofbrief quotations in a review.Printed in the United States of America 1 2 3 4 5 6 7 8 9 0First Printing August 2015Library of Congress Control Number: 2015942167ISBN-13: 978-0-7897-5405-9ISBN-10: 0-7897-5405-3Warning and DisclaimerThis book is designed to provide information about Red Hat RHCSA andRed Hat RHCE certification. Every effort has been made to make thisbook as complete and as accurate as possible, but no warranty or fitness isimplied.TrademarksAll terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Pearson IT Certificationcannot attest to the accuracy of this information. Use of a term in this bookshould not be regarded as affecting the validity of any trademark or servicemark.Warning and DisclaimerEvery effort has been made to make this book as complete and as accurateas possible, but no warranty or fitness is implied. The information providedis on an “as is” basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss ordamages arising from the information contained in this book or from theuse of the companion website, DVD, or programs accompanying it.Special SalesFor information about buying this title in bulk quantities, or for specialsales opportunities (which may include electronic versions; custom coverdesigns; and content particular to your business, training goals, marketingfocus, or branding interests), please contact our corporate sales departmentat corpsales@pearsoned.com or (800) 382-3419.For government sales inquiries, please contactgovernmentsales@pearsoned.com.For questions about sales outside the U.S., please contactinternational@pearsoned.com.Acquisitions EditorDenise LincolnProduction ManagerSandra SchroederDevelopment EditorEllie BruProject EditorMandie FrankCopy EditorKeith ClineTechnical EditorsFrederik VosRoss BrunsonWilliam “Bo” RothwellPublishing CoordinatorVanessa EvansDesignerAlan ClementsCompositionNonie RatcliffSenior IndexerCheryl LenserProofreaderThe Wordsmithery LLC

About the AuthorSander van Vugt is an independent Linux trainer, author, and consultant livingin the Netherlands. Sander is the author of the best-selling Red Hat CertifiedSystem Administrator (RHCSA) Complete Video Course and also of the Red HatCertified Engineer (RHCE) Complete Video Course. He has also written numerousbooks about different Linux-related topics, and many articles for Linux publications around the world. Sander has been teaching Red Hat, SUSE, and LPI Linuxclasses since 1994. As a consultant, he specializes in Linux high-availability solutionsand performance optimization. You can find more information about Sander on hiswebsite at http://www.sandervanvugt.com.For more information about RHAT certification and additional resources, visit theauthor’s Red Hat Certification page at http://www.rhatcert.com/.

About the Technical ReviewersFrederik Vos is a senior technical trainer in Linux training and also in severalvirtualization solutions, such as VMware vSphere, XenServer, and KVM. For thepast 8 years Frederik has working for XTG in Gouda, a training center specializingin virtualization solutions and Linux, as a teacher and Linux evangelist, responsiblefor the Linux portfolio at XTG.He has specialized in data center infrastructures (several Linux distributions),hypervisors, networking, and storage solutions and cloud computing (Cloudstack,Cloudplatform, and OpenStack). He has a lot of knowledge as a teacher and alsoreal-world experience as a system engineer and as a long-time (1997) Linux user.Ross Brunson has more than 20 years of experience as a Linux and open sourcetrainer, training manager, and technologist and is author of the popular LPIC-1Exam Cram (Que Publishing), as well as the Pearson LPIC-1 Certification Guide.Ross recently spent almost 5 years as the director of member services for the LinuxProfessional Institute, building the member program, conducting dozens of Trainthe-Trainer sessions, and providing support for the worldwide Master Affiliate network spanning 100 countries.Ross holds a number of key IT certifications and is also author of several successful technical books, dozens of technical courses for major organizations (includingthe first LPI Certification Bootcamp). He is also skilled at both contributing to andbuilding community around IT products.He lives in Paradise Valley, Montana, with his family and enjoys traveling far andwide, winter sports, and photography.William “Bo” Rothwell, at the impressionable age of 14, crossed paths with aTRS-80 Micro Computer System (affectionately known as a Trash 80). Soon after,the adults responsible for Bo made the mistake of leaving him alone with theTSR-80. He immediately dismantled it and held his first computer class, showinghis friends what made this “computer thing” work.Since this experience, Bo’s passion for understanding how computers work andsharing this knowledge with others has resulted in a rewarding career in IT training. His experience includes Linux, UNIX, and programming languages such asPerl, Python, Tcl, and Bash. Bo owns several IT certifications, including earning hisoriginal RHCE in 2003. He is a former RHCI (Red Hat Certified Instructor) andthe founder and president of One Course Source, an IT training organization.

DedicationThis book is dedicated to my family: Florence, Franck, and Alex. Together we’ve made greataccomplishments over the past year.AcknowledgmentsThis book could not have been written without the help of all the people whocontributed to it. To start, I want to thank the people at Pearson, Denise Lincolnand Ellie Bru in particular. We’ve worked a lot together over the past year, and thisbook is another milestone on our road to success!Next I want to thank my technical proofreaders. What has made this book specialis that the first round of technical proofreading was completely done by volunteers.We started with 10 volunteers, but just 1 made it all the way to the end. Manythanks to Giles, the man behind the great and very useful website certdepot.net, theonly one who reviewed all the chapters.I also want to thank Jaques Weewer, Rob Mokkink, and all the other volunteertechnical reviewers. You made many suggestions without which the book would nothave the high quality that it has right now.

We Want to Hear from You!As the reader of this book, you are our most important critic and commentator. Wevalue your opinion and want to know what we’re doing right, what we could do better, what areas you’d like to see us publish in, and any other words of wisdom you’rewilling to pass our way.We welcome your comments. You can email or write to let us know what you did ordidn’t like about this book[md]as well as what we can do to make our books better.Please note that we cannot help you with technical problems related to the topic ofthis book.When you write, please be sure to include this book’s title and author as well as yourname and email address. We will carefully review your comments and share themwith the author and editors who worked on the :Pearson IT CertificationATTN: Reader Feedback800 East 96th StreetIndianapolis, IN 46240 USAReader ServicesVisit our website and register this book at www.pearsonitcertification.com/registerfor convenient access to any updates, downloads, or errata that might be availablefor this book.

Contents at a GlanceIntroductionxxxixPart 1: RHCSA3CHAPTER 1Installing Red Hat Enterprise Linux Server7CHAPTER 2Using Essential ToolsCHAPTER 3Essential File Management ToolsCHAPTER 4Working with Text FilesCHAPTER 5Connecting to Red Hat Enterprise Linux 7CHAPTER 6User and Group ManagementCHAPTER 7Configuring PermissionsCHAPTER 8Configuring NetworkingCHAPTER 9Managing Processes 205CHAPTER 10Working with Virtual MachinesCHAPTER 11Managing SoftwareCHAPTER 12Scheduling TasksCHAPTER 13Configuring Logging295CHAPTER 14Managing Partitions319CHAPTER 15Managing LVM Logical VolumesCHAPTER 16Basic Kernel ManagementCHAPTER 17Configuring a Basic Apache ServerCHAPTER 18Managing and Understanding the Boot ProcedureCHAPTER 19Troubleshooting the Boot ProcedureCHAPTER 20Using KickstartCHAPTER 21Managing SELinuxCHAPTER 22Configuring a FirewallCHAPTER 23Configuring Remote Mounts and FTPCHAPTER 24Configuring Time 473499539515405

viiiRed Hat RHCSA/RHCE 7 Cert GuidePart 2: RHCE555CHAPTER 25Configuring External Authentication and AuthorizationCHAPTER 26Configuring an iSCSI SANCHAPTER 27System Performance ReportingCHAPTER 28System Optimization BasicsCHAPTER 29Configuring Advanced Log FeaturesCHAPTER 30Configuring Routing and Advanced NetworkingCHAPTER 31An Introduction to Bash Shell ScriptingCHAPTER 32Advanced Firewall ConfigurationCHAPTER 33Managing Advanced Apache ServicesCHAPTER 34Configuring DNSCHAPTER 35Configuring a MariaDB DatabaseCHAPTER 36Configuring NFS 781CHAPTER 37Configuring Samba File ServicesCHAPTER 38Setting Up an SMTP ServerCHAPTER 39Configuring SSHCHAPTER 40Managing Time SynchronizationCHAPTER 41Final Preparation 875CHAPTER 42Theoretical Pre-Assessment ExamsRHCSA Practice Exam A887RHCSA Practice Exam B891RHCE Practice Exam A895RHCE Practice Exam 5859881902Elements on DVD and Companion WebsiteAPPENDIX AAnswers to the “Do I Know This Already” Quizzes and “ReviewQuestions”APPENDIX BMemory TablesAPPENDIX CMemory Tables Answer KeyAPPENDIX DSetting Up Identity ManagementAPPENDIX EStudy PlannerGlossary

ContentsIntroductionPart 1: RHCSAChapter 1xxxix3Installing Red Hat Enterprise Linux Server 7“Do I Know This Already?” Quiz 7Foundation Topics 11Preparing to Install Red Hat Enterprise Linux 11What Is Red Hat Enterprise Linux 7 Server? 11Getting the Software 12Using CentOS 12Other Distributions 13Understanding Access to Repositories 13Understanding Red Hat Enterprise Linux 7 Server Variantsand Add-Ons 14Setup Requirements 15Course Environment Description 16Performing a Manual Installation 17Summary29Exam Preparation Tasks 29Review All Key Topics 29Define Key Terms 30Review Questions 30End-of-Chapter Labs 30Lab 1.1 31Chapter 2Using Essential Tools 33“Do I Know This Already?” Quiz 33Foundation Topics 36Basic Shell Skills 36Executing Commands 36I/O Redirection 37Using Pipes 39History40Bash Completion 42

xRed Hat RHCSA/RHCE 7 Cert GuideEditing Files with vim 42Understanding the Shell Environment 45Understanding Variables 45Environment Configuration Files 46Using /etc/motd and /etc/issue 46Finding Help 47Using --help 48Using man 48Finding the Right man Page 48Updating mandb 50Using info 51Using /usr/share/doc Documentation Files 53Summary53Exam Prep Tasks 53Review All Key Topics 53Complete Tables and Lists from Memory 53Define Key Terms 54Review Questions 54End-of-Chapter Labs 54Lab 2.1 55Chapter 3Essential File Management Tools 57Do I Know This Already Quiz 57Foundation Topics 60Working with the File System Hierarchy 60Defining the File System Hierarchy 60Understanding Mounts 61Managing Files 66Working with Wildcards 67Managing and Working with Directories 67Working with Absolute and Relative Pathnames 68Listing Files and Directories 69Copying Files 70Moving Files 71Deleting Files 71

ContentsUsing Links 73Understanding Hard Links 73Understanding Symbolic Links 74Creating Links 74Removing Links 75Working with Archives and Compressed Files 76Managing Archives with tar 77Using Compression 78Summary80Exam Preparation Tasks 80Review All Key Topics 80Complete Tables and Lists from Memory 81Define Key Terms 81Review Questions 81End-of-Chapter Labs 82Lab 3.1 82Chapter 4Working with Text Files 85“Do I Know This Already?” Quiz 85Foundation Topics 88Using Common Text File-Related Tools 88Doing More with Less 88Showing File Contents with cat 89Displaying the First or Last Lines of a File with head and tail 90Filtering Specific Columns with cut 91Sorting File Contents and Output with sort 91Counting Lines, Words, and Characters with wc 93A Primer to Using Regular Expressions 93Using Line Anchors 94Using Escaping in Regular Expressions 95Using Wildcards and Multipliers 95Using grep to Analyze Text 96Working with Other Useful Text Processing Utilities 97Summary99Exam Preparation Tasks 99xi

xiiRed Hat RHCSA/RHCE 7 Cert GuideReview All Key Topics 99Complete Tables and Lists from Memory 99Define Key Terms 100Review Questions 100End-of-Chapter Labs 100Lab 4.1 100Chapter 5Connecting to Red Hat Enterprise Linux 7 103“Do I Know This Already?” Quiz 103Foundation Topics 106Working on Local Consoles 106Logging In to a Local Console 106Switching Between Terminals in a Graphical Environment 107Working with Multiple Terminals in a Nongraphical Environment 108Understanding Pseudo Terminal Devices 109Booting, Rebooting, and Shutting Down Systems 110Using SSH and Related Utilities 112Accessing Remote Systems Using SSH 112Using Graphical Applications in an SSH Environment 114Securely Transferring Files Between Systems 115Configuring Key-Based Authentication for SSH 116Using Passphrases or Not? 117Using the screen Command 118Summary119Exam Preparation Tasks 120Review All Key Topics 120Define Key Terms 120Review Questions 120End-of-Chapter Labs 121Lab 5.1 121Chapter 6User and Group Management 123“Do I Know This Already?” Quiz 123Foundation Topics 126

ContentsDifferent User Types 126Users on Linux 126Working as Root 126Using su 127sudo128PolicyKit 128Managing User Accounts 129System and Normal Accounts 129Creating Users 132Managing User Properties 134Configuration Files for User Management Defaults 134Managing Password Properties 135Creating a User Environment 136Creating and Managing Group Accounts 137Understanding Linux Groups 137Creating Groups 138Managing Group Properties 139Logging In Through an External Authentication Service 140Understanding LDAP 140Making the Authentication Platform Available 142Configuring RHEL 7 for LDAP Authentication 142Managing nslcd 143Managing sssd 144Summary146Exam Preparation Tasks 146Review All Key Topics 146Complete Tables and Lists from Memory 147Define Key Terms 147Review Questions 147End-of-Chapter Labs 148Lab 6.1 148Lab 6.2 148xiii

xivRed Hat RHCSA/RHCE 7 Cert GuideChapter 7Configuring Permissions 151“Do I Know This Already?” Quiz 151Foundation Topics 155Managing File Ownership 155Displaying Ownership 155Changing User Ownership 156Changing Group Ownership 156Understanding Default Ownership 157Managing Basic Permissions 158Understanding Read, Write, and Execute Permissions 158Applying Read, Write, and Execute Permissions 159Managing Advanced Permissions 161Understanding Advanced Permissions 161Applying Advanced Permissions 164Managing ACLs 165Understanding ACLs 166Preparing Your File System for ACLs 166Changing and Viewing ACL Settings with setfacl and getfacl 166Working with Default ACLs 168Setting Default Permissions with umask 169Working with User Extended Attributes 170Summary172Exam Preparation Tasks 172Review All Key Topics 172Define Key Terms 173Review Questions 173End-of-Chapter Labs 173Lab 7.1 173Chapter 8Configuring Networking 177“Do I Know This Already?” Quiz 177Foundation Topics 180Networking Fundamentals 180IP Addresses 180IPv6 Addresses 181

ContentsNetwork Masks 181Binary Notation 182MAC Addresses 183Protocol and Ports 183Managing Network Addresses and Interfaces 183Validating Network Configuration 184Validating Network Address Configuration 185Validating Routing 187Validating the Availability of Ports and Services 187Configuring Network Configuration with nmtuiand nmcli 189Configuring the Network with nmcli 189Configuring the Network with nmtui 193Working on Network Configuration Files 194Setting Up Hostname and Name Resolution 196Hostnames 196DNS Resolving 198Summary200Exam Prep Tasks 200Review All Key Topics 200Complete Tables and Lists from Memory 201Define Key Terms 201Review Questions 201End-of-Chapter Labs 201Lab 8.1 202Chapter 9Managing Processes 205“Do I Know This Already?” Quiz 205Foundation Topics 208Introduction to Process Management 208Managing Shell Jobs 208Running Jobs in the Foreground and Background 208Managing Shell Jobs 209Managing Parent Child Relations 211xv

xviRed Hat RHCSA/RHCE 7 Cert GuideUsing Common Command-Line Tools for Process Management 211Understanding Processes and Threads 211Using ps to Get Process Information 212Adjusting Process Priority with nice 214Sending Signals to Processes with kill, killall, and pkill 216Using top to Manage Processes 218Summary220Exam Preparation Tasks 220Review All Key Topics 220Complete Tables and Lists from Memory 221Define Key Terms 221Review Questions 221End-of-Chapter Labs 222Lab 9.1 222Chapter 10Working with Virtual Machines 225“Do I Know This Already?” Quiz 225Foundation Topics 228Understanding RHEL 7 Virtualization 228Understanding KVM Virtualization 228Understanding QEMU 228Red Hat Beyond KVM 229Understanding the Role of Libvirtd 229Making Your Server a KVM Host 231Checking Host Requirements 231Installing the KVM Software 232Understanding KVM Host Networking 233Managing Virtual Machines 234Installing Virtual Machines 234Using KVM Virtual Machines 240Accessing Virtual Machines from a Text-Only Console 241Managing Virtual Machine Properties 242Managing Virtual Machines from the Command Line 243Monitoring Virtual Machine Activity from Top 244

ContentsSummary245Exam Prep Tasks 245Review All Key Topics 245Define Key Terms 246Review Questions 246End-of-Chapter Labs 247Lab 10.1 247Chapter 11Managing Software 249“Do I Know This Already?” Quiz 249Foundation Topics 252Managing Software Packages with yum 252Understanding the Role of Repositories 252Specifying Which Repository to Use 253Understanding Repository Security 256Creating Your Own Repository 259Using yum 260Using yum to Find Software Packages 261Getting More Information About Packages 262Installing and Removing Software Packages 263Showing Lists of Packages 265Updating Packages 267Working with yum Package Groups 268Using yum History 270Managing Software Packages with rpm 271Understanding RPM Filenames 272Querying the RPM Database 273Querying RPM Package Files 273Using repoquery 275Summary276Exam Preparation Tasks 276Review All Key Topics 276Complete Tables and Lists from Memory 277Define Key Terms 277xvii

xviiiRed Hat RHCSA/RHCE 7 Cert GuideReview Questions 277End-of-Chapter Labs 278Lab 11.1 278Chapter 12Scheduling Tasks 281“Do I Know This Already?” Quiz 281Configuring cron to Automate Recurring Tasks 284Managing the cron Service 284Understanding cron Timing 285Managing cron Configuration Files 286Understanding the Purpose of anacron 288Managing cron Security 289Configuring at to Schedule Future Tasks 290Summary291Exam Preparation Tasks 291Review All Key Topics 291Define Key Terms 292Review Questions 292End-of-Chapter Labs 293Lab 12.1 293Chapter 13Configuring Logging 295“Do I Know This Already?” Quiz 295Foundation Topics 298Understanding System Logging 298Understanding the Role of rsyslogd and journald 298Reading Log Files 300Understanding Log File Contents 300Live Log File Monitoring 302Using logger 302Configuring rsyslogd 303Understanding rsyslogd Configuration Files 303Understanding rsyslog.conf Sections 304Understanding Facilities, Priorities, and Log Destinations 304Rotating Log Files 308

ContentsWorking with journald 310Using journalctl to Find Events 310Preserving the systemd Journal 314Summary316Exam Prep Tasks 316Review All Key Topics 316Define Key Terms 316Review Questions 317End-of-Chapter Labs 317Lab 13.1 317Chapter 14Managing Partitions 319“Do I Know This Already?” Quiz 319Understanding MBR and GPT Partitions 322Understanding the MBR Partitioning Scheme 322Understanding the Need for GPT Partitioning 323Understanding Storage Measurement Units 324Managing Partitions and File Systems 324Creating MBR Partitions with fdisk 325Using Extended and Logical Partitions on MBR 329Creating GPT Partitions with gdisk 330Creating File Systems 334Changing File System Properties 336Adding Swap Partitions 338Adding Swap Files 339Mounting File Systems 339Manually Mounting File Systems 340Using Device Names, UUIDs, or Disk Labels 340Automating File System Mounts Through /etc/fstab 341Summary344Exam Preparation Tasks 344Review All Key Topics 344Complete Tables and Lists from Memory 345Define Key Terms 345xix

xxRed Hat RHCSA/RHCE 7 Cert GuideReview Questions 345End-of-Chapter Labs 346Lab 14.1 346Lab 14.2 346Chapter 15Managing LVM Logical Volumes 349“Do I Know This Already?” Quiz 349Foundation Topics 352Understanding LVM 352LVM Architecture 352LVM Features 353Creating LVM Logical Volumes 354Creating the Physical Volumes 355Creating the Volume Groups 359Creating the Logical Volumes and File Systems 360Understanding LVM Device Naming 361Resizing LVM Logical Volumes 363Resizing Volume Groups 363Resizing Logical Volumes and File Systems 364Summary366Exam Preparation Tasks 366Review All Key Topics 366Define Key Terms 366Review Questions 366End-of-Chapter Labs 367Lab 15.1 367Chapter 16Basic Kernel Management 369“Do I Know This Already?” Quiz 369Foundation Topics 372Understanding the Role of the Linux Kernel 372Understanding the use of Kernel Threads and Drivers 372Analyzing What the Kernel Is Doing 374Working with Kernel Modules 375Understanding Hardware Initialization 376Managing Kernel Modules 378

ContentsChecking Driver Availability for Hardware Devices 381Managing Kernel Module Parameters 383Upgrading the Linux Kernel 384Summary384Exam Preparation Tasks 384Review All Key Topics 384Define Key Terms 385Review Questions 385End-of-Chapter Labs 386Lab 16.1 386Chapter 17Configuring a Basic Apache Server 389“Do I Know This Already?” Quiz 389Foundation Topics 392Configuring a Basic Apache Server 392Installing the Required Software 392Identifying the Main Configuration File 392Creating Web Server Content 395Understanding Apache Configuration Files 397Creating Apache Virtual Hosts 398Summary400Exam Preparation Tasks 401Review All Key Topics 401Define Key Terms 401Review Questions 401End-of-Chapter Labs 402Lab 17.1 402Chapter 18Managing and Understanding the Boot Procedure 405“Do I Know This Already?” Quiz 405Foundation Topics 408Working with Systemd 408Understanding Systemd 408Managing Units Through Systemd 413xxi

xxiiRed Hat RHCSA/RHCE 7 Cert GuideWorking with GRUB 2 420Understanding GRUB 2 420Modifying Default GRUB 2 Boot Options 423Summary424Exam Prep Tasks 424Review All Key Topics 424Complete Tables and Lists from Memory 425Define Key Terms 425Review Questions 425End-of-Chapter Labs 426Lab 18.1 426Lab 18.2 426Chapter 19Troubleshooting the Boot Procedure 429“Do I Know This Already?” Quiz 429Foundation Topics 432Understanding the RHEL 7 Boot Procedure 432Passing Kernel Boot Arguments 434Accessing the Boot Prompt 434Starting a Troubleshooting Target 435Using a Rescue Disk 436Restoring System Access Using a Rescue Disk 436Reinstalling GRUB Using a Rescue Disk 439Re-Creating the Initramfs Using a Rescue Disk 439Fixing Common Issues 441Reinstalling GRUB 2 441Fixing the Initramfs 442Recovering from File System Issues 442Resetting the Root Password 443Recovering Access to a Virtual Machine 444Summary446Exam Prep Tasks 446Review All Key Topics 446Complete Tables and Lists from Memory 446Define Key Terms 447

ContentsReview Questions 447End-of-Chapter Labs 448Lab 19.1 448Chapter 20Using Kickstart 451“Do I Know This Already?” Quiz 451Foundation Topics 454Setting Up an Installation Server 454Configuring a Network Server as Installation Server 454Setting Up a TFTP and DHCP Server for PXE Boot 455Installing the TFTP Server 456Configuring DHCP for PXE Boot 457Creating the TFTP PXE Server Content 458Creating a Kickstart File 462Using a Kickstart File to Perform an Automated Installation 462Modifying the Kickstart File with system-config-kickstart 464Making Manual Modifications to the Kickstart File 467Summary469Exam Preparation Tasks 470Review All Key Topics 470Define Key Terms 470Review Questions 470End-of-Chapter Labs 471Lab 20.1 471Chapter 21Managing SELinux 473“Do I Know This Already?” Quiz 474Foundation Topics 477Understanding SELinux Working and Modes 477Understanding Context Settings and the Policy 481Monitoring Current Context Labels 481Setting Context Types 483Finding the Context Type You Need 486Restoring Default File Contexts 487Using Boolean Settings to Modify SELinux Settings 489xxiii

xxivRed Hat RHCSA/RHCE 7 Cert GuideDiagnosing and Addressing SELinux Policy Violations 491Making SELinux Analyzing Easier 492Summary494Exam Prep Tasks 494Review All Key Topics 494Complete Tables and Lists from Memory 495Define Key Terms 495Review Questions 495End-of-Chapter Labs 496Lab 21.1 496Chapter 22Configuring a Firewall 499“Do I Know This Already?” Quiz 499Foundation Topics 502Understanding Linux Firewalling 502Understanding Previous Solutions 502Understanding Firewalld 502Understanding Firewalld Zones 503Understanding Firewalld Services 504Working with Firewalld 505Working with Firewall-cmd 506Working with Firewall-config 508Summary511Exam Prep Tasks 511Key Topics 511Define Key Terms 512Complete Tables and Lists from Memory 512Review Questions 512End-of-Chapter Labs 513Chapter 23Configuring Remote Mounts and FTP 515“Do I Know This Already?” Quiz 515Foundation Topics 519Mounting NFS Shares 519Understanding NFS Security Options 519Understanding Kerberos Requirements 520

ContentsRHEL 7 NFS Support 521Mounting the NFS Share 521Mounting SMB File Systems 522Discovering SMB Shares 523Mounting SMB Shares 525Authenticating to SMB Shares 525Accessing Samba Shares Through the Graphical Interface 526Mounting Remote File Systems Through fstab 528Mounting NFS Shares Through fstab 528Mounting SMB Shares Through fstab 529Using Automount to Mount Remote File Systems 530Understanding Automount 530Configuring Automount for NFS 531Using Wildcards in Automount 532Using Automount to Mount SMB Shares 533Configuring an FTP Server 533Summary535Exam Preparation Tasks 535Review All Key Topics 535Complete Tables and Lists from Memory 536Define Key Terms 536Review Questions 536End-of-Chapter Labs 537Lab 23.1 537Chapter 24Configuring Time Services 539“Do I Know This Already?” Quiz 539Foundation Topics 542Understanding Local Time 542Using Network Time Protocol 543Managing Time on Red Hat Enterprise Linux 543Using date 544Using hwclock 544Using timedatectl 545Managing Time Zone Settings 548xxv

xxviRed Hat RHCSA/RHCE 7 Cert GuideUsing Graphical Tools to Manage Time 550Summary551Exam Prep Tasks 551Review All Key Topics 551Complete Tables and Lists from Memory 551Define Key Terms 552Review Questions 552End-of-Chapter Labs 552Lab 24.1 552Part 2 RHCEChapter 25555Configuring External Authentication and Authorization 557“Do I Know This Already?” Quiz 557Foundation Topics 560Understanding Remote Authentication 560Understanding Kerberos Basics 561Understanding Kerberos Authentication 561Understanding Kerberos Principals 563Configuring LDAP Authentication with Kerberos Authorization 564Using nslcd or sssd as the Authentication Backend Service 568Setting Up External Authentication 569Using an IPA Server or Active Directory 572Summary572Exam Preparation Tasks 573Review All Key Topics 573Complete Tables and Lists from Memory 573Define Key Terms 573Review Questions 573End-of-Chapter Labs 574Lab 25.1 574Chapter 26Configuring an iSCSI SAN 577“Do I Know This Already” Quiz 578Foundation Topics 581Understanding iSCSI 581

ContentsComparing SAN Solutions 581Software Versus Hardware iSCSI SAN 582iSCSI SAN Architecture 582iSCSI SAN Terminology 583Setting Up the iSCSI Target 585Opening the Firewall 594Setting Up the iSCSI Initiator 596Setting the iSCSI Initiatorname 596Performing the Discovery 596Making the Connection 598Making iSCSI Connections Persistent 600Troubleshooting iSCSI 602Summary603Exam Preparation Tasks 603Review All Key Topics 603Complete Tables and Lists from Memory 603Define Key Terms 604Review Questions 604End-of-Chapter Labs 604Lab 26.1 604Lab 26.2 605Lab 26.3 605Chapter 27System Performance Reporting 607“Do I Know This Already?” Quiz 607Foundation Topics 610Understanding top Performance Data 610Understanding Load Average 610CPU Performance Data 611Memory Usage 612Understanding Swap Usage 613Process Memory Usage 615Customizing top Display 615xxvii

xxviiiRed Hat RHCSA/RHCE 7 Cert GuideUsing iostat, vmstat, and pidstat 616Using iostat 617Using vmstat 618Using pidstat 620Configuring sar 621Summary622Exam Preparation Tasks 622Review All Key Topics 622Complete Tables and Lists from Memory 623Define Key Terms 623Review Questions 623End-of-Chapter Labs 624Chapter 28System Optimization Basics 627“Do I Know This Already?” Quiz 627Foundation Topics 630Understanding System Optimization Basics 630Understanding the /proc File System 631Using /proc to Analyze Performance 631Using /proc/sys to Tune Linux Performance 633Using sysctl to Automate System Optimization Parameters 635Summary637Exam Preparation Tasks 638Review All Key Topics 638Complete Tables and Lists from Memory 638Define Key Terms 638Review Questions 639End-of-Chapter Labs 639Lab 28.1 639Chapter 29Configuring Advanced Log Features 641“Do I Know This Already?” Quiz 641Foundation Topics 644Understanding rsy

About the Author Sander van Vugt is an independent Linux trainer, author, and consultant living in the Netherlands. Sander is the author of the best-selling Red Hat Certified System Administrator (RHCSA) Com