ebook img

Red Hat Enterprise Linux 8.0 (RH134) - Red Hat System Administration II PDF

430 Pages·2019·15.511 MB·English
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 Red Hat Enterprise Linux 8.0 (RH134) - Red Hat System Administration II

Join the explorers, builders, and individuals who boldly offer new solutions to old problems. For open source, innovation is only possible because of the people behind it. STUDENT WORKBOOK (ROLE) Red Hat Enterprise Linux 8.0 RH134 RED HAT SYSTEM ADMINISTRATION II Edition 1 RH134-RHEL8.0-en-1-20190531 Copyright ©2019 Red Hat, Inc. RED HAT SYSTEM ADMINISTRATION II RH134-RHEL8.0-en-1-20190531 Copyright ©2019 Red Hat, Inc. Red Hat Enterprise Linux 8.0 RH134 Red Hat System Administration II Edition 1 20190531 Publication date 20190531 Authors: Fiona Allen, Adrian Andrade, Herve Quatremain, Victor Costea, Snehangshu Karmakar, Marc Kesler, Saumik Paul Editor: Philip Sweany, Ralph Rodriguez, David Sacco, Seth Kenlon, Heather Charles Copyright © 2019 Red Hat, Inc. The contents of this course and all its modules and related materials, including handouts to audience members, are Copyright © 2019 Red Hat, Inc. No part of this publication may be stored in a retrieval system, transmitted or reproduced in any way, including, but not limited to, photocopy, photograph, magnetic, electronic or other record, without the prior written permission of Red Hat, Inc. This instructional program, including all material provided herein, is supplied without any guarantees from Red Hat, Inc. Red Hat, Inc. assumes no liability for damages or legal action arising from the use or misuse of contents or details contained herein. If you believe Red Hat training materials are being used, copied, or otherwise improperly distributed please e-mail [email protected] or phone toll-free (USA) +1 (866) 626-2994 or +1 (919) 754-3700. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, Hibernate, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a registered trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/ service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community. All other trademarks are the property of their respective owners. Contributors: Achyut Madhusudan, Rob Locke, Rudolf Kastl, Prashant Rastogi, Heider Souza, Michael Phillips, Dallas Spohn Document Conventions                                                                                                    ix Introduction                                                                                                                     xi Red Hat System Administration II ............................................................................... xi Orientation to the Classroom Environment ................................................................. xii Controlling Your Systems ................................................................................ xiii Internationalization .................................................................................................. xv 1. Improving Command-line Productivity                                                                            1 Writing Simple Bash Scripts ....................................................................................... 2 Guided Exercise: Writing Simple Bash Scripts .............................................................. 6 Running Commands More Efficiently Using Loops ....................................................... 9 Guided Exercise: Running Commands More Efficiently Using Loops ............................... 15 Matching Text in Command Output with Regular Expressions ....................................... 17 Guided Exercise: Matching Text in Command Output with Regular Expressions ............... 26 Lab: Improving Command-line Productivity ............................................................... 29 Summary ............................................................................................................... 36 2. Scheduling Future Tasks                                                                                             37 Scheduling a Deferred User Job .............................................................................. 38 Guided Exercise: Scheduling a Deferred User Job ...................................................... 40 Scheduling Recurring User Jobs .............................................................................. 44 Guided Exercise: Scheduling Recurring User Jobs ...................................................... 47 Scheduling Recurring System Jobs .......................................................................... 50 Guided Exercise: Scheduling Recurring System Jobs .................................................. 53 Managing Temporary Files ....................................................................................... 57 Guided Exercise: Managing Temporary Files .............................................................. 60 Quiz: Scheduling Future Tasks ................................................................................. 64 Summary ............................................................................................................... 68 3. Tuning System Performance                                                                                        69 Adjusting Tuning Profiles ......................................................................................... 70 Guided Exercise: Adjusting Tuning Profiles ................................................................ 75 Influencing Process Scheduling ................................................................................ 77 Guided Exercise: Influencing Process Scheduling ........................................................ 81 Lab: Tuning System Performance ............................................................................. 85 Summary ............................................................................................................... 90 4. Controlling Access to Files with ACLs                                                                            91 Interpreting File ACLs ............................................................................................. 92 Quiz: Interpreting File ACLs ..................................................................................... 99 Securing Files with ACLs ........................................................................................ 101 Guided Exercise: Securing Files with ACLs ............................................................... 105 Lab: Controlling Access to Files with ACLs ................................................................. 111 Summary .............................................................................................................. 120 5. Managing SELinux Security                                                                                         121 Changing the SELinux Enforcement Mode ................................................................ 122 Guided Exercise: Changing the SELinux Enforcement Mode ....................................... 126 Controlling SELinux File Contexts ........................................................................... 129 Guided Exercise: Controlling SELinux File Contexts ................................................... 133 Adjusting SELinux Policy with Booleans ................................................................... 136 Guided Exercise: Adjusting SELinux Policy with Booleans ........................................... 138 Investigating and Resolving SELinux Issues ............................................................... 141 Guided Exercise: Investigating and Resolving SELinux Issues ...................................... 145 Lab: Managing SELinux Security ............................................................................. 149 Summary .............................................................................................................. 155 RH134-RHEL8.0-en-1-20190531 v 6. Managing Basic Storage                                                                                             157 Adding Partitions, File Systems, and Persistent Mounts .............................................. 158 Guided Exercise: Adding Partitions, File Systems, and Persistent Mounts ...................... 168 Managing Swap Space ........................................................................................... 172 Guided Exercise: Managing Swap Space .................................................................. 176 Lab: Managing Basic Storage .................................................................................. 181 Summary ............................................................................................................... 191 7. Managing Logical Volumes                                                                                          193 Creating Logical Volumes ....................................................................................... 194 Guided Exercise: Creating Logical Volumes .............................................................. 201 Extending Logical Volumes .................................................................................... 207 Guided Exercise: Extending Logical Volumes ............................................................. 212 Lab: Managing Logical Volumes .............................................................................. 216 Summary ............................................................................................................. 223 8. Implementing Advanced Storage Features                                                                  225 Managing Layered Storage with Stratis ................................................................... 226 Guided Exercise: Managing Layered Storage with Stratis ............................................ 231 Compressing and Deduplicating Storage with VDO ................................................... 237 Guided Exercise: Compressing and Deduplicating Storage with VDO .......................... 240 Lab: Implementing Advanced Storage Features ........................................................ 245 Summary ............................................................................................................. 255 9. Accessing Network-Attached Storage                                                                        257 Mounting Network-Attached Storage with NFS ........................................................ 258 Guided Exercise: Managing Network-Attached Storage with NFS ............................... 263 Automounting Network-Attached Storage ............................................................... 268 Guided Exercise: Automounting Network-Attached Storage ........................................ 271 Lab: Accessing Network-Attached Storage .............................................................. 277 Summary ............................................................................................................. 284 10. Controlling the Boot Process                                                                                    285 Selecting the Boot Target ..................................................................................... 286 Guided Exercise: Selecting the Boot Target .............................................................. 291 Resetting the Root Password ................................................................................. 294 Guided Exercise: Resetting the Root Password ......................................................... 298 Repairing File System Issues at Boot ...................................................................... 300 Guided Exercise: Repairing File System Issues at Boot .............................................. 302 Lab: Controlling the Boot Process .......................................................................... 305 Summary ............................................................................................................... 311 11. Managing Network Security                                                                                       313 Managing Server Firewalls ...................................................................................... 314 Guided Exercise: Managing Server Firewalls ............................................................. 322 Controlling SELinux Port Labeling .......................................................................... 327 Guided Exercise: Controlling SELinux Port Labeling .................................................. 330 Lab: Managing Network Security ............................................................................ 334 Summary ............................................................................................................. 343 12. Installing Red Hat Enterprise Linux                                                                            345 Installing Red Hat Enterprise Linux ......................................................................... 346 Guided Exercise: Installing Red Hat Enterprise Linux ................................................. 350 Automating Installation with Kickstart ...................................................................... 353 Guided Exercise: Automating Installation with Kickstart ............................................. 362 Installing and Configuring Virtual Machines .............................................................. 365 Quiz: Installing and Configuring Virtual Machines ...................................................... 370 Lab: Installing Red Hat Enterprise Linux .................................................................. 372 vi RH134-RHEL8.0-en-1-20190531 Summary ............................................................................................................. 379 13. Comprehensive Review                                                                                             381 Comprehensive Review ........................................................................................ 382 Lab: Fixing Boot Issues and Maintaining Servers ....................................................... 385 Lab: Configuring and Managing File Systems and Storage ......................................... 393 Lab: Configuring and Managing Server Security ...................................................... 400 RH134-RHEL8.0-en-1-20190531 vii viii RH134-RHEL8.0-en-1-20190531 DOCUMENT CONVENTIONS REFERENCES "References" describe where to find external documentation relevant to a subject. NOTE "Notes" are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should have no negative consequences, but you might miss out on a trick that makes your life easier. IMPORTANT "Important" boxes detail things that are easily missed: configuration changes that only apply to the current session, or services that need restarting before an update will apply. Ignoring a box labeled "Important" will not cause data loss, but may cause irritation and frustration. WARNING "Warnings" should not be ignored. Ignoring warnings will most likely cause data loss. RH134-RHEL8.0-en-1-20190531 ix x RH134-RHEL8.0-en-1-20190531

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.