Troubleshooting CentOS

A practical guide to troubleshooting the CentOS 7 community-based enterprise server

Troubleshooting CentOS

This ebook is included in a Mapt subscription
Jonathan Hobson

1 customer reviews
A practical guide to troubleshooting the CentOS 7 community-based enterprise server
$0.00
$12.00
$29.99
$29.99p/m after trial
RRP $23.99
RRP $29.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Code Files
Preview in Mapt

Book Details

ISBN 139781785289828
Paperback190 pages

Book Description

CentOS is the enterprise-grade Linux operating system built using the same source code as Red Hat Enterprise Linux (RHEL) to provide a free-to-use alternative to Red Hat's commercial Linux offering.

The purpose of this book is to build on your understanding of CentOS and to explore those mission-critical services you are entrusted to manage and maintain. Starting with a brief introduction to the overall subject of troubleshooting a CentOS server, this book will take you on a journey across the whole spectrum of issue-based problem solving, which includes active processes, the networking environment, package management, users, folders, files, shared resources, security, databases, and web-based services. By the end of the book, you will have expert-level competency in identifying and diagnosing the root causes of CentOS storage, network, and administration issues and resolving them.

Table of Contents

Chapter 1: Basics of Troubleshooting CentOS
Installing some basic tools
Gathering hardware information
Understanding dmesg
Understanding log files
Reading log files and affecting the output
Using tail to monitor log files
Using cat, less, and more
Using grep
Using diff
Using truncation
Summary
References
Chapter 2: Troubleshooting Active Processes
Tuning server performance with memory management and swap
Managing memory with vmstat
Checking the system load with the top command
Monitoring disk I/O with iotop
Checking processes with the ps command
Checking performance with iostat and lsof
Calculating the system load
Discovering process IDs with pgrep and systemctl
More about systemd
Issuing the kill signal
Dealing with an orphaned process
Summary
References
Chapter 3: Troubleshooting the Network Environment
Using ping, dig, host, traceroute, and mtr
Monitoring network connections with the ss command
Packet analysis with tcpdump
Summary
References
Chapter 4: Troubleshooting Package Management and System Upgrades
Gathering software information
Using Yum plugins
Fixing Yum operations
Installing additional Yum repositories
Downloading an RPM package with Yum
Diagnosing a corrupt RPM database
Minor release upgrades
Summary
References
Chapter 5: Troubleshooting Users, Directories, and Files
Users
Monitoring user activity with utmpdump
Resetting the root password and enhancing logging
Recovering lost or deleted files with Scalpel
Restoring file and directory permissions
Working with and extending the XFS filesystem
Running repairs on XFS
Investigating fragmentation on XFS
Auditing directories and files
Visualizing directories and files
Summary
References
Chapter 6: Troubleshooting Shared Resources
Providing NFS shares on a CentOS 7 server
About NFS exports
Mounting NFS shares on a CentOS client
Mounting an external drive with CIFS
Using autofs to mount an external drive
Summary
References
Chapter 7: Troubleshooting Security Issues
Auditing SELinux with aureport and setroubleshoot
SSH banners
Tuning SSH
Intrusion detection with Tripwire
Firewalld – zone, service, and port management
Removing Firewalld and returning to iptables
Summary
References
Chapter 8: Troubleshooting Database Services
Getting up-and-running with MariaDB
Resetting and recovering a root password with MariaDB
Tuning MariaDB and MySQL
Obtaining metrics from MariaDB and MySQL
Returning to MySQL
Installing and configuring PostgreSQL 9
Summary
References
Chapter 9: Troubleshooting Web Services
Auditing the server with cURL
Debugging Akamai headers with cURL
Adding Varnish to Apache
Testing Varnish with cURL
Using cURL to access an FTP directory
Enabling mod_status in Apache
Summary
References
Chapter 10: Troubleshooting DNS Services
Changing the hostname and managing the FQDN
Performing system sanity checks with BIND
Monitoring bandwidth with iftop
Flushing the cache
Summary
References

What You Will Learn

  • Consider the need to understand, manipulate, and make use of the relevant system log files
  • Analyze, review, and make decisions regarding how and what to do with troublesome active processes on a CentOS server
  • Discover how to approach issues regarding the network environment
  • Approach issues regarding package management and learn how to make the necessary steps to diagnose and fix the problems found in relation to their YUM- and RPM-based needs
  • Diagnose and troubleshoot issues related to Samba, NFS, and various external storage methods
  • Diagnose and troubleshoot issues related to iptables, SELinux, some common firewalls, shell access, and SSH

Authors

Table of Contents

Chapter 1: Basics of Troubleshooting CentOS
Installing some basic tools
Gathering hardware information
Understanding dmesg
Understanding log files
Reading log files and affecting the output
Using tail to monitor log files
Using cat, less, and more
Using grep
Using diff
Using truncation
Summary
References
Chapter 2: Troubleshooting Active Processes
Tuning server performance with memory management and swap
Managing memory with vmstat
Checking the system load with the top command
Monitoring disk I/O with iotop
Checking processes with the ps command
Checking performance with iostat and lsof
Calculating the system load
Discovering process IDs with pgrep and systemctl
More about systemd
Issuing the kill signal
Dealing with an orphaned process
Summary
References
Chapter 3: Troubleshooting the Network Environment
Using ping, dig, host, traceroute, and mtr
Monitoring network connections with the ss command
Packet analysis with tcpdump
Summary
References
Chapter 4: Troubleshooting Package Management and System Upgrades
Gathering software information
Using Yum plugins
Fixing Yum operations
Installing additional Yum repositories
Downloading an RPM package with Yum
Diagnosing a corrupt RPM database
Minor release upgrades
Summary
References
Chapter 5: Troubleshooting Users, Directories, and Files
Users
Monitoring user activity with utmpdump
Resetting the root password and enhancing logging
Recovering lost or deleted files with Scalpel
Restoring file and directory permissions
Working with and extending the XFS filesystem
Running repairs on XFS
Investigating fragmentation on XFS
Auditing directories and files
Visualizing directories and files
Summary
References
Chapter 6: Troubleshooting Shared Resources
Providing NFS shares on a CentOS 7 server
About NFS exports
Mounting NFS shares on a CentOS client
Mounting an external drive with CIFS
Using autofs to mount an external drive
Summary
References
Chapter 7: Troubleshooting Security Issues
Auditing SELinux with aureport and setroubleshoot
SSH banners
Tuning SSH
Intrusion detection with Tripwire
Firewalld – zone, service, and port management
Removing Firewalld and returning to iptables
Summary
References
Chapter 8: Troubleshooting Database Services
Getting up-and-running with MariaDB
Resetting and recovering a root password with MariaDB
Tuning MariaDB and MySQL
Obtaining metrics from MariaDB and MySQL
Returning to MySQL
Installing and configuring PostgreSQL 9
Summary
References
Chapter 9: Troubleshooting Web Services
Auditing the server with cURL
Debugging Akamai headers with cURL
Adding Varnish to Apache
Testing Varnish with cURL
Using cURL to access an FTP directory
Enabling mod_status in Apache
Summary
References
Chapter 10: Troubleshooting DNS Services
Changing the hostname and managing the FQDN
Performing system sanity checks with BIND
Monitoring bandwidth with iftop
Flushing the cache
Summary
References

Book Details

ISBN 139781785289828
Paperback190 pages
Read More
From 1 reviews

Read More Reviews