Book Image

CentOS 7 Server Deployment Cookbook

By : Timothy Boronczyk, IRAKLI NADAREISHVILI
Book Image

CentOS 7 Server Deployment Cookbook

By: Timothy Boronczyk, IRAKLI NADAREISHVILI

Overview of this book

CentOS is derived from Red Hat Enterprise Linux (RHEL) sources and is widely used as a Linux server. This book will help you to better configure and manage Linux servers in varying scenarios and business requirements. Starting with installing CentOS, this book will walk you through the networking aspects of CentOS. You will then learn how to manage users and their permissions, software installs, disks, filesystems, and so on. You’ll then see how to secure connection to remotely access a desktop and work with databases. Toward the end, you will find out how to manage DNS, e-mails, web servers, and more. You will also learn to detect threats by monitoring network intrusion. Finally, the book will cover virtualization techniques that will help you make the most of CentOS.
Table of Contents (18 chapters)
CentOS 7 Server Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Rotating log files with logrotate


Log files are important because they provide better insight into what is happening on a system. The debugging and error messages in a log can be used to track down the source of a problem and resolve it quickly. Authentication messages maintain a record of who accessed the system and when, and repeated authentication failures can be a sign that an attacker is trying to gain unauthorized access. However, the usefulness of logs typically diminishes with age, and chatty applications that generate a lot of log entries could, if left unchecked, easily consume all of the system's storage resources. This recipe will show you how to rotate the log files to prevent the files from growing out of control and stale logs from wasting space.

Getting ready

This recipe requires a CentOS system with a working network connection. Administrative privileges are also required either by logging in with the root account or through the use of sudo.

How to do it...

Follow these steps...