Troubleshooting CentOS
eBook - ePub

Troubleshooting CentOS

  1. 190 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Troubleshooting CentOS

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Troubleshooting CentOS


Table of Contents

Troubleshooting CentOS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
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
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
3. Troubleshooting the Network Environment
Using ping, dig, host, traceroute, and mtr
The ping command
The dig and host commands
The traceroute command
The mtr command
Monitoring network connections with the ss command
Packet analysis with tcpdump
Summary
References
4. Troubleshooting Package Management and System Upgrades
Gathering software information
Using Yum plugins
Fixing Yum operations
Installing additional Yum repositories
EPEL
Remi
The IUS repository
Downloading an RPM package with Yum
Diagnosing a corrupt RPM database
Minor release upgrades
Summary
References
5. Troubleshooting Users, Directories, and Files
Users
Adding users and forcing a password change
Deleting users
Modifying a user
Meet login.defs
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
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
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
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
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
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
Index

Troubleshooting CentOS

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2015
Production reference: 1220615
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-982-8
www.packtpub.com

Credits

Author
Jonathan Hobson
Reviewers
Mohamed Alibi
Toni de la Fuente
Commissioning Editor
Neil Alexander
Acquisition Editor
Usha Iyer
Content Development Editor
Anand Singh
Technical Editors
Dhiraj Chandanshive
Pramod Kumavat
Copy Editors
Janbal Dharmaraj
Rashmi Sawant
Project Coordinator
Vijay Kushlani
Proofreader
Safis Editing
Indexer
Hemangini Bari
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Jonathan Hobson is a professional Dev/Ops engineer who provides round-the-clock application and server support to one of the world's largest online newspapers. He has been using CentOS since its inception, and as the author of the best-selling CentOS 6 Linux Server Cookbook, Packt Publishing (ISBN-13: 978-1849519021), Jonathan maintains a strong reputation for the generation of ideas, problem solving, building business confidence, and finding innovative solutions in challenging environments.
Jonathan has worked in a variety of environments, and with more than 20 years of experience as a professional developer, database administrator, and server engineer, he continues to support the open source community at large.
Following a wide range of interests beyond the computer screen, Jonathan also enjoys walking his dogs and gett...

Table of contents

  1. Troubleshooting CentOS

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Troubleshooting CentOS by Jonathan Hobson in PDF and/or ePUB format, as well as other popular books in Computer Science & Cyber Security. We have over one million books available in our catalogue for you to explore.