ebook img

RHCSA/RHCE Red Hat Linux certification study guide : (exams EX200 & EX300) PDF

930 Pages·2016·48.18 MB·English
by  Jang
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview RHCSA/RHCE Red Hat Linux certification study guide : (exams EX200 & EX300)

® RHCSA/RHCE Red Hat® Linux® Certification Study Guide, Seventh Edition (Exams EX200 & EX300) Michael Jang Alessandro Orsaria This study/training guide and/or material is not sponsored by, endorsed by, or affiliated with Red Hat, Inc. in any manner. Red Hat®, Red Hat® Enterprise Linux®, RHCE™, RHCSA™, and the Red Hat logo and Red Hat “Shadowman” logo are trademarks or registered trademarks of Red Hat, Inc. in the United States and certain other countries. All other trademarks are trademarks of their respective owners. This publication and DVD-ROM may be used in assisting students to prepare for a Red Hat RHCSA or RHCE certification exam. Neither Red Hat nor McGraw-Hill warrants that New York Chicago San Francisco Athens London Madrid Mexico City use of this publication and DVD-ROM will ensure passing any exam. Milan New Delhi Singapore Sydney Toronto Cataloging-in-Publication Data is on file with the Library of Congress McGraw-Hill Education books are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. To contact a representative, please visit the Contact Us pages at www.mhprofessional.com. RHCSA/RHCE® Red Hat® Linux® Certification Study Guide, Seventh Edition (Exams EX200 & EX300) Copyright © 2016 by McGraw-Hill Education. All rights reserved. Printed in the United States of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication. All trademarks or copyrights mentioned herein are the possession of their respective owners and McGraw-Hill Education makes no claim of ownership by the mention of products that contain these marks. 1 2 3 4 5 6 7 8 9 0 DOC DOC 1 0 9 8 7 6 ISBN: Book p/n 978-0-07-184193-1 and DVD p/n 978-0-07-184195-5 of set 978-0-07-184196-2 MHID: Book p/n 0-07-184193-8 and DVD p/n 0-07-184195-4 of set 0-07-184196-2 Sponsoring Editor Copy Editor Illustration Timothy Green Bart Reed Cenveo Publisher Services Editorial Supervisor Proofreader Art Director, Cover Jody McKenzie Lisa McCoy Jeff Weeks Project Editor Indexer Cover Designer LeeAnn Pickrell Rebecca Plunkett Jeff Weeks Acquisitions Coordinator Production Supervisor Amy Stonebraker James Kussow Technical Editor Composition Alex Davies Cenveo® Publisher Services Information has been obtained by McGraw-Hill Education from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information. For the young widows and widowers: may they find the courage to face their fears, to navigate their way through the pain, and to find hope for a brighter future. ABOUT THE AUTHORS Michael Jang (RHCE, LPIC-2, UCP, LCP, Linux+, MCP) is currently a Senior Technical Writer for ForgeRock. His experience with computers goes back to the days of jumbled punch cards. He has written other books on Linux certification, including LPIC-1 in Depth, Mike Meyers’ Linux+ Certification Passport, and Sair GNU/Linux Installation and Configuration Exam Cram. His other Linux books include Linux Annoyances for Geeks, Linux Patch Management, and Mastering Fedora Core Linux 5. He has also written or contributed to books on Microsoft operating systems, including MCSE Guide to Microsoft Windows 98 and Mastering Windows XP Professional, Second Edition. Alessandro Orsaria (RHCE, RHCA, CCIE x 2) is an IT professional with more than 15 years’ experience in the industry. He has authored articles for technical Linux magazines and is currently employed by a global equity hedge fund as an IT Infrastructure Architect. Alessandro is Red Hat RHCE and RHCA certified and has achieved two Cisco CCIE certifications in Routing & Switching and Datacenter. He holds an MBA from Imperial College of London and a degree in physics. About the Technical Editor Alex Davies works for a proprietary trading firm, where he is responsible for Linux systems and manages a team of Linux engineers across Chicago, New York, London, and Singapore. Alex is the author of MySQL Clustering and MySQL High Availability Cookbook. Earlier in his career he was both RHCE and RHCA certified and received the RHCE of the Year award in 2009 from Red Hat. Alex also holds a degree in economics from the University of Durham. CONTENTS AT A GLANCE 1 Prepare for Red Hat Hands-on Certifications ................................. 1 2 Virtual Machines and Automated Installations ............................... 55 3 Fundamental Command-Line Skills ............................................. 115 4 RHCSA-Level Security Options .................................................. 175 5 The Boot Process .................................................................... 241 6 Linux Filesystem Administration ................................................. 285 7 Package Management .............................................................. 343 8 User Administration ................................................................ 395 9 RHCSA-Level System Administration Tasks .................................. 443 10 A Security Primer ................................................................... 479 11 System Services and SELinux ..................................................... 537 12 RHCE Administrative Tasks ...................................................... 579 13 Network Services: DNS, SMTP, iSCSI, and NTP ............................. 631 14 The Apache Web Server ........................................................... 679 15 The Samba File Server .............................................................. 733 16 NFS Secured with Kerberos ....................................................... 773 17 The MariaDB Server ................................................................ 807 A Prepare a System for the Sample Exams ........................................ 843 B Sample Exam 1: RHCSA ........................................................... 847 C Sample Exam 2: RHCSA ........................................................... 851 v vi RHCSA/RHCE Red Hat Linux Certification Study Guide D Sample Exam 3: RHCE Sample Exam 1 ......................................... 855 E Sample Exam 4: RHCE Sample Exam 2 ......................................... 861 F About the DVD ...................................................................... 865 Glossary ............................................................................... 867 Index ................................................................................... 883 CONTENTS Acknowledgments ..................................................................... xxv Preface ................................................................................... xxvii Introduction ............................................................................ xxxviii 1 Prepare for Red Hat Hands-on Certifications ................. 1 The RHCSA and RHCE Exams ................................................... 4 The Exam Experience ................................................... 5 The RHCSA Exam ....................................................... 5 The RHCE Exam ......................................................... 6 If You’re Studying “Just” for the RHCSA Exam ..................... 6 Evolving Requirements .................................................. 6 Basic Hardware Requirements ................................................... 7 Hardware Compatibility ................................................ 7 Architectures .............................................................. 8 RAM Requirements ..................................................... 8 Hard Drive Options ...................................................... 9 Networking ................................................................ 9 Virtual Machine Options ............................................... 10 Get Red Hat Enterprise Linux .................................................... 11 Purchase a Subscription ................................................ 11 Get an Evaluation Copy ................................................. 12 Third-party Rebuilds .................................................... 12 Check the Download .................................................... 13 Installation Requirements ......................................................... 13 You Won’t Start from Scratch .......................................... 14 The Advantages of Network Installation ............................ 14 Red Hat and Virtual Machines ........................................ 15 Virtual and Physical Systems ........................................... 15 A Pre-installed Environment for Practice Labs .................... 15 System Roles .............................................................. 16 Installation Options ................................................................ 18 Boot Media ................................................................ 18 CD/DVD or Boot USB Starts Installation ........................... 19 Basic Installation Steps .................................................. 20 vii viii RHCSA/RHCE Red Hat Linux Certification Study Guide The Installation Perspective on Partitions .......................... 25 Partition Creation Exercise ............................................. 28 Exercise 1-1: Partitioning During Installation ................... 30 Wow, Look at All That Software! ...................................... 32 Baseline Packages ........................................................ 34 Package Groups .......................................................... 34 During the Installation .................................................. 35 System Setup Options .............................................................. 36 Initial Setup and Firstboot .............................................. 37 Default Security Settings ............................................... 37 Special Setup Options for Virtual Machines ........................ 38 Configure Default File Sharing Services ........................................ 39 Mount and Copy the Installation DVD .............................. 40 Set Up a Default Configuration Apache Server .................... 40 Exercise 1-2: Configure Apache as an Installation Server ..... 42 Share Copied Files via FTP Server .................................... 43 Certification Summary .................................................. 45 ✓ Two-Minute Drill ........................................................ 46 Q&A Self Test .................................................................... 48 Lab Questions ............................................................ 49 Self Test Answers ......................................................... 52 Lab Answers .............................................................. 53 2 Virtual Machines and Automated Installations .............. 55 Configure KVM for Red Hat ...................................................... 56 Why Virtual Machines .................................................. 57 If You Have to Install KVM ............................................. 58 The Right KVM Modules ............................................... 59 Configure the Virtual Machine Manager ............................ 60 Configuration by Hypervisor .......................................... 61 Virtual Networks on a Hypervisor .................................... 62 Exercise 2-1: Create a Second Virtual Network ................. 63 Configure a Virtual Machine on KVM .......................................... 68 Configure a Virtual Machine on KVM ............................... 68 Exercise 2-2: Add Virtual Hard Drives ............................ 73 KVM Configuration Files ............................................... 75 Control Virtual Machines from the Command Line .............. 76 Automated Installation Options ................................................. 80 Kickstart Concepts ....................................................... 81 Set Up Local Access to Kickstart ...................................... 81 Set Up Network Access to Kickstart ................................. 83 Contents ix Sample Kickstart File .................................................... 83 Exercise 2-3: Create and Use a Sample Kickstart File .......... 89 The Kickstart Configurator ............................................ 90 Administration with the Secure Shell and Secure Copy ..................... 95 Configure an SSH Client ................................................ 95 Command-Line Access ................................................. 96 More SSH Command-Line Tools ..................................... 97 Graphical Secure Shell Access ......................................... 97 Consider Adding These Command-Line Tools ............................... 98 Checking Ports with telnet ............................................. 99 Checking Ports with nmap ............................................. 100 Configure an E-mail Client ............................................. 100 The Use of Text and Graphical Browsers ............................ 102 Using lftp to Access URLs .............................................. 103 Certification Summary .................................................. 105 ✓ Two-Minute Drill ........................................................ 105 Q&A Self Test .................................................................... 107 Lab Questions ............................................................ 108 Self Test Answers ......................................................... 110 Lab Answers .............................................................. 111 3 Fundamental Command-Line Skills ............................ 115 Shells ................................................................................... 118 Other Shells ............................................................... 119 Virtual Terminals ......................................................... 119 GUI Shell Interfaces ..................................................... 120 Differences Between Regular and Administrative Users ......... 121 Text Streams and Command Redirection ........................... 121 Standard Command-Line Tools .................................................. 122 File and Directory Concepts ........................................... 123 File Lists and ls ............................................................ 126 File-Creation Commands ............................................... 127 Wildcards .................................................................. 130 File Searches .............................................................. 130 The Management of Text Files ................................................... 131 Commands to Read Text Streams ..................................... 132 Commands to Process Text Streams ................................. 134 Edit Text Files at the Console .......................................... 137 Exercise 3-1: Using vi to Create a New User ..................... 139 If You Don’t Like vi ....................................................... 141 Edit Text Files in the GUI ............................................... 141 x RHCSA/RHCE Red Hat Linux Certification Study Guide Local Online Documentation ..................................................... 142 When You Need Help ................................................... 142 A Variety of man Pages ................................................. 143 The info Manuals ........................................................ 145 Detailed Documentation in /usr/share/doc ......................... 146 A Networking Primer .............................................................. 146 IPv4 Networks ............................................................ 146 Networks and Routing .................................................. 147 Tools and Commands ................................................... 148 Network Configuration and Troubleshooting ................................. 154 Network Configuration Files ........................................... 155 Network Configuration Tools ......................................... 158 Exercise 3-2: Configure a Network Card ......................... 161 Configure Name Resolution ........................................... 164 Hostname Configuration Files ......................................... 165 Hostname Configuration Options .................................... 166 Certification Summary .................................................. 167 ✓ Two-Minute Drill ........................................................ 168 Q&A Self Test .................................................................... 170 Lab Questions ............................................................ 171 Self Test Answers ......................................................... 172 Lab Answers .............................................................. 173 4 RHCSA-Level Security Options .................................. 175 Basic File Permissions .............................................................. 178 File Permissions and Ownership ...................................... 178 Commands to Change Permissions and Ownership .............. 181 Basic User and Group Concepts ...................................... 184 Access Control Lists and More ................................................... 186 The getfacl Command ................................................... 186 Make a Filesystem ACL Friendly ...................................... 187 Manage ACLs on a File ................................................. 188 Configure a Directory for ACLs ....................................... 190 Configure Default ACLs ................................................ 191 ACLs and Masks ......................................................... 192 Exercise 4-1: Use ACLs to Deny a User ........................... 192 NFS Shares and ACLs ................................................... 193 Basic Firewall Control .............................................................. 195 Standard Ports ............................................................ 196 A Focus on iptables ...................................................... 196 Keep That Firewall in Operation ...................................... 198

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.