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

Setting storage limits for users and groups


Imposing limits on the amount of storage a user can consume is an effective way to manage resources and ensure they are made available to everyone fairly, especially in a multiuser environment. This recipe shows you how to enable quotas and set limits by users and groups.

Getting ready

This recipe requires a CentOS system with administrative privileges provided by logging in with the root account or using sudo. It assumes /home mounts its own filesystem.

How to do it...

Follow these steps to set up quotas and specify storage limits:

  1. Open the /etc/fstab file for editing:

    vi /etc/fstab
    
  2. To enable user quotas, which enforce usage limits based on user accounts, add uquota to the mount options for /home. For group quotas, add gquota. Both uquota and gquota can be given together to enable both:

    /dev/mapper/centos-home /home xfs defaults,uquota,gquota 0  0
    
  3. Save your changes and close the file.

  4. Reboot the system:

    shutdown -r +5 'Reboot required for system maintenance...