CentOS High Performance
()
About this ebook
About This Book
- Master the concepts of high performance and high availability to eliminate performance bottlenecks
- Maximize the uptime of services running in a CentOS 7 cluster
- A step-by-step guide that will provide knowledge of methods and approaches to optimize the performance of CentOS clusters
Who This Book Is For
This book is targeted at system administrators: those who want a detailed, step-by-step guide to learn how to set up a high-availability CentOS 7 cluster, and those who are looking for a reference book to help them learn or refresh the necessary skills to ensure their systems and respective resources are utilized optimally. No previous knowledge of high-availability systems is needed, though the reader is expected to have at least some degree of familiarity with any spin-off of the Fedora family of Linux distributions, preferably CentOS.
What You Will Learn
- Install a CentOS 7 cluster and network infrastructure
- Configure firewall, networking, and clustering services and settings
- Set up and test a HAC (high-availability cluster) to host an Apache web server and a MariaDB database server
- Monitor performance and availability
- Identify bottlenecks and troubleshoot issues
- Improve performance and ensure high availability
In Detail
CentOS is the enterprise level Linux OS, which is 100% binary compatible to Red Hat Enterprise Linux (RHEL). It acts as a free alternative to RedHat's commercial Linux offering, with only a change in the branding. A high performance cluster consists in a group of computers that work together as one set parallel, hence minimizing or eliminating the downtime of critical services and enhancing the performance of the application.
Starting with the basic principles of clustering, you will learn the necessary steps to install a cluster with two CentOS 7 servers. We will then set up and configure the basic required network infrastructure and clustering services. Further, you will learn how to take a proactive approach to the split-brain issue by configuring the failover and fencing of the cluster as a whole and the quorum of each node individually. Further, we will be setting up HAC and HPC clusters as a web server and a database server. You will also master the art of monitoring performance and availability, identifying bottlenecks, and exploring troubleshooting techniques.
At the end of the book, you’ll review performance-tuning techniques for the recently installed cluster, test performance using a payload simulation, and learn the necessary skills to ensure that the systems, and the corresponding resources and services, are being utilized to their best capacity.
Style and approach
An easy-to-follow and step-by-step guide with hands-on instructions to set up real-world simple cluster scenarios that will start you on the path to building more complex applications on your own.
Related to CentOS High Performance
Related ebooks
Troubleshooting OpenVPN Rating: 0 out of 5 stars0 ratingsCentOS High Availability Rating: 5 out of 5 stars5/5Mastering Linux Network Administration Rating: 4 out of 5 stars4/5Mastering Linux Shell Scripting Rating: 4 out of 5 stars4/5Mastering CentOS 7 Linux Server Rating: 0 out of 5 stars0 ratingsCentOS System Administration Essentials Rating: 0 out of 5 stars0 ratingsUbuntu Server Essentials Rating: 0 out of 5 stars0 ratingsMastering Python Networking Rating: 5 out of 5 stars5/5Nginx Essentials Rating: 0 out of 5 stars0 ratingsMastering Ubuntu Server Rating: 5 out of 5 stars5/5Monitoring Docker Rating: 0 out of 5 stars0 ratingsMastering Ansible Rating: 5 out of 5 stars5/5Learning Nagios 4 Rating: 5 out of 5 stars5/5Working with Linux – Quick Hacks for the Command Line Rating: 5 out of 5 stars5/5Learning Ansible 2 - Second Edition Rating: 5 out of 5 stars5/5OpenStack Essentials Rating: 0 out of 5 stars0 ratingsPractical DevOps Rating: 3 out of 5 stars3/5Instant Debian - Build a Web Server Rating: 0 out of 5 stars0 ratingsMastering NGINX - Second Edition Rating: 0 out of 5 stars0 ratingsGit Best Practices Guide Rating: 0 out of 5 stars0 ratingsNginx Troubleshooting Rating: 0 out of 5 stars0 ratingsGetting Started with Terraform Rating: 5 out of 5 stars5/5Implementing DevOps on AWS Rating: 0 out of 5 stars0 ratingsCompTIA Linux+/LPIC-1: Training and Exam Preparation Guide (Exam Codes: LX0-103/101-400 and LX0-104/102-400) Rating: 0 out of 5 stars0 ratingsRed Hat Certified Engineer (RHCE) Study Guide: Ansible Automation for the Red Hat Enterprise Linux 8 Exam (EX294) Rating: 0 out of 5 stars0 ratingsApache ZooKeeper Essentials Rating: 5 out of 5 stars5/5Mastering Ceph Rating: 0 out of 5 stars0 ratings
Operating Systems For You
Hacking : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Ethical Hacking Rating: 5 out of 5 stars5/5Mastering Windows PowerShell Scripting Rating: 4 out of 5 stars4/5Make Your PC Stable and Fast: What Microsoft Forgot to Tell You Rating: 4 out of 5 stars4/5AppleScript Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5Bash Command Line Pro Tips Rating: 5 out of 5 stars5/5The Mac Terminal Reference and Scripting Primer Rating: 4 out of 5 stars4/5Raspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsUNIX Shell Programming Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsPowerShell: A Comprehensive Guide to Windows PowerShell Rating: 4 out of 5 stars4/5COBOL Basic Training Using VSAM, IMS and DB2 Rating: 5 out of 5 stars5/5Networking for System Administrators: IT Mastery, #5 Rating: 5 out of 5 stars5/5Exploring Windows 11: The Illustrated, Practical Guide to Using Microsoft Windows Rating: 0 out of 5 stars0 ratingsHacking for Beginners: Mastery Guide to Learn and Practice the Basics of Computer and Cyber Security Rating: 0 out of 5 stars0 ratingsLearn Windows PowerShell in a Month of Lunches Rating: 0 out of 5 stars0 ratingsUNIX For Dummies Rating: 3 out of 5 stars3/5Linux for Beginners: Linux Command Line, Linux Programming and Linux Operating System Rating: 4 out of 5 stars4/5iPhone 12, iPhone Pro, and iPhone Pro Max For Senirs: A Ridiculously Simple Guide to the Next Generation of iPhone and iOS 14 Rating: 0 out of 5 stars0 ratingsGetting Started With MacBook Air (2020 Model): A Guide For New MacOS Users Rating: 0 out of 5 stars0 ratingsHacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5CompTIA Linux+ Study Guide: Exam XK0-004 Rating: 0 out of 5 stars0 ratingsWindows Server 2019 & PowerShell All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsThe Linux Command Line Beginner's Guide Rating: 4 out of 5 stars4/5Windows 11 All-in-One For Dummies Rating: 5 out of 5 stars5/5
Reviews for CentOS High Performance
0 ratings0 reviews
Book preview
CentOS High Performance - Cánepa Gabriel
Table of Contents
CentOS High Performance
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
Downloading the example code
Errata
Piracy
Questions
1. Cluster Basics and Installation on CentOS 7
Clustering fundamentals
Why Linux and CentOS 7?
Downloading CentOS
Setting up CentOS 7 nodes
Installing CentOS 7
Setting up the network infrastructure
Installing the packages required for clustering
Key software components
Setting up key-based authentication for SSH access
Summary
2. Installing Cluster Services and Configuring Network Components
Configuring and starting clustering services
Starting and enabling clustering services
Troubleshooting
Security fundamentals
Letting in and letting out
Getting acquainted with PCS
Managing authentication and creating the cluster
Setting up a virtual IP for the cluster
Adding a virtual IP as a cluster resource
Viewing the status of the virtual IP
Summary
3. A Closer Look at High Availability
Failover – an introduction to high availability and performance
Fencing – isolating the malfunctioning nodes
Installing and configuring a STONITH device
Split-brain – preparing to avoid inconsistencies
Quorum – scoring inside your cluster
Configuring our cluster with PCS GUI
Summary
4. Real-world Implementations of Clustering
Setting up storage
ELRepo repository and DRBD availability
Configuring DRBD
Adding DRBD as a PCS cluster resource
Installing the web and database servers
Configuring the web server as a cluster resource
Mounting the DRBD resource and using it with Apache
Testing the DRBD resource along with Apache
Setting up a high-availability database with replicated storage
Troubleshooting
Summary
5. Monitoring the Cluster Health
Cluster services and performance
Monitoring the node status
Monitoring the resources
When a resource refuses to start
Checking the availability of core components
Summary
6. Measuring and Increasing Performance
Setting up a sample database
Downloading and installing the Employees database
Introducing initial cluster tests
Test 1 – retrieving all fields from all records
Test 2 – performing JOIN operations
Performing a failover
Measuring and improving performance
Apache's configuration and settings
Loading and disabling modules
Placing limits on the number of Apache processes and children
Database resource
Creating indexes
Using query cache
Moving to an A/A cluster
Summary
Index
CentOS High Performance
CentOS High Performance
Copyright © 2016 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: January 2016
Production reference: 1250116
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-868-5
www.packtpub.com
Credits
Author
Gabriel Cánepa
Reviewers
Muhammad Kamran Azeem
Denis Fateyev
Lekshminarayanan K
Oliver Pelz
Commissioning Editor
Veena Pagare
Acquisition Editor
Subho Gupta
Content Development Editor
Zeeyan Pinheiro
Technical Editor
Vivek Pala
Copy Editor
Pranjali Chury
Project Coordinator
Suzanne Coutinho
Proofreader
Safis Editing
Indexer
Mariammal Chettiyar
Graphics
Disha Haria
Production Coordinator
Nilesh Mohite
Cover Work
Nilesh Mohite
About the Author
Gabriel Cánepa is a Linux Foundation certified system administrator (LFCS-1500-0576-0100) and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work. When he's not typing commands or writing code or articles, he enjoys telling bedtime stories with his wife to his two little daughters and playing with them, which is a great pleasure in his life.
I would like to thank God for the many blessings and the growth opportunities in personal, family, and professional life that He has given throughout my life.
I would like to thank my mother, who always encouraged me to get as much education as possible and to excel in everything I do. I'd also like to thank my wife, Monica, and our two daughters, Camila and Francesca, for their support, understanding, and patience during the long hours of troubleshooting and writing this book.
Next, I'd like to thank Andrea de Ampalio and Diego Cordoba from Carrera Linux Argentina (www.carreralinux.com.ar), who helped me learn and love Linux in the best Linux training academy—their people and Linux skills are without match, and Subho Gupta, Manasi Pandire, Zeeyan Pinheiro and Vivek Pala from Packt Publishing for their remarkable talent and support while we worked together on this book.
Last but not least, I'd like to thank Andrew Beekhoff and the team at Cluster Labs (http://clusterlabs.org/) for putting together the best and most complete cluster resource information guide out there, which served as the main source of my research.
About the Reviewers
Muhammad Kamran Azeem is a seasoned IT professional with twenty years of experience in IT. He started working as a PC technician in 1995 and gradually got into database administration, system administration, high performance computing, and, lately, information security. He also taught undergraduate and graduate level courses for C/C++, data structures and algorithm design, Oracle developer, and a lot more, in different universities in Pakistan.
Kamran holds a master's degree in IT, and is certified under CISSP, CEH, RHCE, OCP, and CCNA programs. He is the author of Pakistan's first book on Linux system administration titled Linux Pocket Reference for System.
Administrators, and many training videos on using Linux as the main desktop operating system, as well as Linux system administration, all available through his website http://wbitt.com.
He is an advocate of Free and Open Source Software (FOSS), and for the last ten years, he is the driving force behind the wave of adaptation of Linux in Pakistan.
He is currently working as a senior DevOps consultant for Praqma AS in Oslo, Norway, helping companies adopt modern software and IT infrastructure practices.
First, I would like to thank my wife, Rohina, for being the greatest support in what I do. I would also like to thank Mike Long, my employer, for encouraging me to undertake this book review project.
Denis Fateyev holds a master's degree in Computer Science and has been working with Linux for more than 10 years (mostly with RedHat and CentOS). He currently works as a Perl programmer and DevOps for a small German company. He has reviewed several books mostly related to CentOS, DevOps, and high availability technologies, including GitLab Cookbook, CentOS High Availability, CentOS High Performance by Packt Publishing. Being a keen participant in the open source community, he is a package maintainer at Fedora and Repoforge projects. He has a passion for foreign languages, namely, German and Spanish, and linguistics.
He can be reached at denis@fateyev.com.
Lekshminarayanan K has been administering Linux/Unix servers since 2009. He had his first experience with the open source on Ubuntu 8.04 ever since then he has experienced many flavors of Linux like CentOS, Red-hat, Fedora and Debian. Lekshminarayan is also experienced in application administrations like Apache, Qmail, SVN, and GIT. He is currently teaching himself Shell and Python scripting and working as a Linux administrator at COMODO Inc.
During his free time, he enjoys photography and is too fond of books.
Oliver Pelz has more than 10 years of experience as a software developer and system administrator. He graduated with a diploma in Bioinformatics and is currently working at the German Cancer Research center in Heidelberg, where he has authored and coauthored several scientific publications in the field of Bioinformatics. Next to developing web applications and biological databases for his department and scientists all over the world, he is administrating a division-wide Linux-based data center and has set up two high-performance CentOS clusters for the analysis of high-throughput microscope and genome sequencing data. He loves writing code, riding his mountain bike in the Black Forest of Germany and is an absolute Linux and open source enthusiast for many years. He has contributed to several open source projects in the past and is also the author of the book CentOS 7 Linux Server Cookbook, Packt Publishing. He maintains an IT tech blog at www.oliverpelz.de.
I would like to thank my family and especially my wonderful wife Beatrice and little son Jonah for their patience and understanding for all these long working hours and the folks at Packt Publishing for the opportunity to review this manuscript, it was a great pleasure for me.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT