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

Creating a RAM disk


This recipe teaches you how to take advantage of RAM's low latency using a RAM disk, a section of memory made available as if it were a standard storage device. RAM disks often store volatile data that is constantly read and updated in memory. For example, on desktop systems they're used for storing a browser's cache to speed up web surfing. In server environments, RAM disks can store cache data for high-load proxy services to reduce latency.

Getting ready

This recipe requires a CentOS system with administrative privileges provided by logging in with the root account or using sudo.

How to do it...

Perform the following steps to create and use a RAM disk:

  1. Check whether there is sufficient memory available for the RAM disk using free command (a practical RAM disk will need to be smaller than the amount of free memory):

    free -h
    
  2. Use mount to mount a tmpfs filesystem at the desired mount point, giving the target size as a mount option:

    mount -t tmpfs -o size=512M tmpfs /mnt
    
  3. When...