GL250 Enterprise Linux Systems Administration
Total Page:16
File Type:pdf, Size:1020Kb
EVALUATION COPY Unauthorized Reproduction or Enterprise Distribution Linux Systems AdministrationProhibited Student Workbook EVALUATION COPY Unauthorized Reproduction GL250 ENTERPRISE LINUX SYSTEMS ADMINISTRATION RHEL7 SLES12 or Distribution The contents of this course and all its modules and related materials, including handouts to audience members, are copyright ©2017 Guru Labs L.C. 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 Guru Labs. This curriculum contains proprietary information which is for the exclusive use of customers of Guru Labs L.C., and is not to be shared with personnel other than those in attendance at this course. This instructional program, including all material provided herein, is supplied without any guarantees from Guru Labs L.C. Guru Labs L.C. assumes no liability for damages or legal action arising from Prohibited the use or misuse of contents or details contained herein. Photocopying any part of this manual without prior written consent of Guru Labs L.C. is a violation of federal law. This manual should not appear to be a photocopy. If you believe that Guru Labs training materials are being photocopied without permission, please email [email protected] or call 1-801-298-5227. Guru Labs L.C. accepts no liability for any claims, demands, losses, damages, costs or expenses suffered or incurred howsoever arising from or in connection with the use of this courseware. All trademarks are the property of their respective owners. Version: GL250S-R7S12-P06 EVALUATION COPY Unauthorized Reproduction or Distribution Prohibited Table of Contents Chapter 1 EVALUATIONChapter 3 COPY LINUX KERNEL & DEVICES 1 GRUB2/SYSTEMD BOOT PROCESS 1 Hardware Discovery Tools 2 Booting Linux on PCs 2 Configuring New Hardware with hwinfo 3 GRUB 2 4 Kernel Hardware InfoUnauthorized – /sys/ 4 GRUB 2 Configuration 6 /sys/ Structure 5 GRUB 2 Security 8 udev 6 Boot Parameters 10 Managing Linux Device Files 8 Initial RAM Filesystem 12 List Block Devices 11 init 15 SCSI Devices 13 Systemd local-fs.target and sysinit.target 16 USB Devices 15 Systemd basic.target and multi-user.target 18 USB Architecture 17 Legacy local bootup script support 20 Kernel Modules 19 System Configuration Files 21 Configuring Kernel Components and ModulesReproduction 21 RHEL7 Configuration Utilities 22 Handling Module Dependencies 22 SLES12 Configuration Utilities 23 Configuring the Kernel via /proc/ 23 Shutdown and Reboot 24 Console 25 Lab Tasks 25 Virtual Terminals 27 1. Boot Process 26 Keyboard & locale configuration 29 2. Booting directly to a bash shell 30 Serial Ports 31 3. GRUB Command Line 33 Random Numbers and /dev/random 32 4. Basic GRUB Security 36 Lab Tasks 34 5. Troubleshooting Practice: Boot Process 39 1. Adjusting Kernel Options 35or 2. Linux Kernel Driver Compilation 41 DistributionChapter 4 3. Introduction to Troubleshooting Labs 45 SOFTWARE MAINTENANCE 1 4. Troubleshooting Practice: Kernel Modules 50 Managing Software 2 RPM Features 3 Chapter 2 RPM Architecture 4 SYSTEMD OVERVIEW 1 RPM Package Files 5 System Boot Method Overview 2 Working With RPMs 6 systemd System and Service Manager 3 Querying and Verifying with RPM 7 Modifying systemd services 5 Updating theProhibited Kernel RPM 9 Systemd Service Sandboxing Features 6 Dealing With RPM & Yum Digest Changes 10 systemd Targets 7 Yum Plugins & RHN Subscription Manager 11 Using systemd 8 YUM Repositories 12 Linux Runlevels Aliases 10 YUM Repository Groups 13 Legacy Support for SysV init 11 Compiling/Installing from Source 14 Lab Tasks 12 Manually Installed Shared Libraries 16 1. Managing Services With Systemd's systemctl 13 Rebuilding Source RPM Packages 17 2. Creating a systemd unit file 19 Lab Tasks 19 1. Managing Software with RPM 20 ii 2. Creating a Custom RPM Repository 24 Advanced LVM: Striping & Mirroring 16 3. Querying the RPM Database 28 Advanced LVM: RAID Volumes 17 4. Installing SoftwareEVALUATION via RPM & Source and Rebuilding SLES Graphical COPY Disk Tool 18 SRPMs 32 RAID Concepts 19 5. Troubleshooting Practice: Package Management 36 Array Creation with mdadm 20 Unauthorized Software RAID Monitoring 21 Chapter 5 Software RAID Control and Display 22 LOCAL STORAGE ADMINISTRATION 1 Lab Tasks 23 Partitioning Disks with fdisk & gdisk 2 1. Creating and Managing LVM Volumes 24 Resizing a GPT Partition with gdisk 5 2. Creating LVM Thin Volumes 34 Partitioning Disks with parted 8 3. Troubleshooting Practice: LVM 41 Non-Interactive Disk Partitioning with sfdisk 9 4. Creating and Managing a RAID-5 Array 42 Filesystem Creation 10 Persistent Block Devices 11 Chapter 7 Mounting Filesystems Reproduction 12 REMOTE STORAGE ADMINISTRATION 1 Resizing Filesystems 14 Remote Storage Overview 2 Filesystem Maintenance 15 Remote Filesystem Protocols 4 Managing an XFS Filesystem 18 Remote Block Device Protocols 5 Swap 20 File Sharing via NFS 7 Filesystem Structures 21 NFSv4+ 8 Determining Disk Usage With df and du 22 NFS Clients 9 Configuring Disk Quotas 23 NFS Server Configuration 10 Setting Quotas 24 YaST NFS Server Administration 12 Viewing and Monitoring Quotas or25 Implementing NFSv4 13 Filesystem Attributes 26 AutoFS 15 Lab Tasks 27DistributionAutoFS Configuration 16 1. Creating and Managing Filesystems 28 Accessing Windows/Samba Shares from Linux 18 2. Hot Adding Swap 35 SAN Multipathing 19 3. Setting User Quotas 37 Multipath Configuration 20 Multipathing Best Practices 22 Chapter 6 iSCSI Architecture 24 LVM & RAID 1 Open-iSCSI Initiator Implementation 27 Logical Volume Management 2 iSCSI Initiator Discovery 29 Implementing LVM 3 iSCSI InitiatorProhibited Node Administration 31 Creating Logical Volumes 4 Mounting iSCSI Targets at Boot 33 Activating LVM VGs 5 iSCSI Multipathing Considerations 34 Exporting and Importing a VG 6 Lab Tasks 36 Examining LVM Components 7 1. Using autofs 37 Changing LVM Components 8 2. NFS Server Configuration 42 Advanced LVM Overview 10 3. iSCSI Initiator Configuration 47 Advanced LVM: Components & Object Tags 11 4. Multipathing with iSCSI 55 Advanced LVM: Automated Storage Tiering 12 Advanced LVM: Thin Provisioning 14 iii Chapter 8 File Access Control Lists 10 USER/GROUP ADMINISTRATION 1 Manipulating FACLs 11 Approaches to StoringEVALUATION User Accounts 2 Viewing FACLs COPY 12 User and Group Concepts 3 Backing Up FACLs 13 User Administration 4 File Creation Permissions with umask 14 Modifying AccountsUnauthorized 6 User Private Group Scheme 16 Group Administration 7 Alternatives to UPG 18 Password Aging 9 AppArmor 19 Default User Files 11 SELinux Security Framework 20 Controlling Login Sessions 12 SELinux Modes 22 RHEL DS Client Configuration 14 SELinux Commands 24 SLES DS Client Configuration 16 Choosing an SELinux Policy 25 System Security Services Daemon (SSSD) 18 SELinux Booleans 27 Lab Tasks 20 Permissive Domains 28 1. User and Group Administration Reproduction 21 SELinux Policy Tools 29 2. Using LDAP for Centralized User Accounts 24 SUSE Basic Firewall Configuration 31 3. Troubleshooting Practice: Account Management 30 FirewallD 32 Lab Tasks 33 Chapter 9 1. User Private Groups 34 PLUGGABLE AUTHENTICATION MODULES (PAM) 1 2. Using Filesystem ACLs 39 PAM Overview 2 3. Exploring AppArmor [S12] 48 PAM Module Types 3 4. Exploring SELinux Modes 53 PAM Order of Processing 4 5. SELinux File Contexts [R7] 59 PAM Control Statements or6 6. SELinux Contexts in Action [R7] 61 PAM Modules 7 pam_unix 9 DistributionChapter 11 pam_nologin.so 10 BASIC NETWORKING 1 pam_limits.so 11 IPv4 Fundamentals 2 pam_wheel.so 12 TCP/UDP Fundamentals 3 pam_xauth.so 13 Linux Network Interfaces 4 Lab Tasks 14 Ethernet Hardware Tools 6 1. Restricting superuser access to wheel group membership 15 Network Configuration with ip Command 8 2. Using pam_nologin to Restrict Logins 17 Configuring Routing Tables 9 3. Setting Limits with the pam_limits Modules 21 IP to MAC AddressProhibited Mapping with ARP 12 4. Using pam_limits to Restrict Simultaneous Logins 25 Starting and Stopping Interfaces 13 NetworkManager 15 Chapter 10 DNS Clients 17 SECURITY ADMINISTRATION 1 DHCP Clients 19 Security Concepts 2 SUSE YaST Network Configuration Tool 21 Tightening Default Security 4 Network Diagnostics 22 SuSE Security Checker 6 Information from ss and netstat 25 Security Advisories 7 Hardware and System Clock 27 Fine Grained Authorizations with Polkit 8 Managing Network-Wide Time 29 iv Continual Time Sync with NTP 31 Chapter 14 Configuring NTP Clients 32 MONITORING & TROUBLESHOOTING 1 Useful NTP CommandsEVALUATION34 System StatusCOPY – Memory 2 Lab Tasks 35 System Status – I/O 3 1. Network Discovery 36 System Status – CPU 4 2. Basic ClientUnauthorized Networking 39 Performance Trending with sar 6 3. NTP Client Configuration 43 Determining Service to Process Mapping 7 Real-time Monitoring of Resources — Cgroups 8 Chapter 12 Troubleshooting Basics: The Process 9 ADVANCED NETWORKING 1 Troubleshooting Basics: The Tools 11 Multiple IP Addresses 2 strace and ltrace 15 Configuring a DHCP server 4 Common Problems 17 IPv6 6 Troubleshooting Incorrect File Permissions 18 Interface Aggregation 8 Inability to Boot 19 Interface Bonding Reproduction 9 Typos in Configuration Files 20 Network Teaming 11 Corrupt Filesystems 21 Interface Bridging 15 RHEL7 Rescue Environment 22 802.1q VLANS 17 SUSE Rescue Environment 24 Tuning Kernel Network Settings 19 Lab Tasks 26 Lab Tasks 20 1. System Activity Reporter 27 1. Multiple IP Addresses Per Network Interface 21 2. Cgroup for