You are previewing CentOS 7 Server Deployment Cookbook.
O'Reilly logo
CentOS 7 Server Deployment Cookbook

Book Description

Deploy and manage today's essential services on an enterprise-class, open operating system

About This Book
  • Configure and manage Linux servers in varying scenarios and for a range of business requirements

  • Explore the up-to-date features of CentOS using real-world scenarios

  • See practical and extensive recipes to deploy and manage CentOS

  • Who This Book Is For

    This book is for Linux professionals with basic Unix/Linux functionality experience, perhaps even having set up a server before, who want to advance their knowledge in administering various services.

    What You Will Learn
  • See how to deploy CentOS easily and painlessly, even in multi-server environments

  • Configure various methods of remote access to the server so you don’t always have to be in the data center

  • Make changes to the default configuration of many services to harden them and increase the security of the system

  • Learn to manage DNS, emails and web servers

  • Protect yourself from threats by monitoring and logging network intrusion and system intrusion attempts, rootkits, and viruses

  • Take advantage of today’s powerful hardware by running multiple systems using virtualization

  • In Detail

    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.

    Style and approach

    This easy-to-read cookbook is filled with practical recipes. Hands-on, task-based exercises will present you with real-world solutions to deploy and manage CentOS in varying business scenarios.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. CentOS 7 Server Deployment Cookbook
      1. CentOS 7 Server Deployment Cookbook
      2. Credits
      3. About the Author
      4. About the Reviewer
      5. www.PacktPub.com
        1. Why subscribe?
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Errata
          2. Piracy
          3. Questions
      7. 1. Getting Started with CentOS
        1. Introduction
        2. Installing CentOS using Anaconda in graphics mode
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Installing CentOS using Anaconda in text mode
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Coordinating multiple installations using Kickstart
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Running a cloud image with Amazon Web Services' EC2
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Installing a container image from the Docker Registry
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Installing the GNOME desktop
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Installing the KDE Plasma desktop
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      8. 2. Networking
        1. Introduction
        2. Setting a static IP address
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Binding multiple addresses to a single Ethernet device
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Bonding two Ethernet devices
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Configuring the network firewall with FirewallD
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Configuring the network firewall using iptables
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Installing a DHCP server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Configuring an NFS server to share a filesystem
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Configuring an NFS client to use a shared filesystem
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        10. Serving Windows shares with Samba
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      9. 3. User and Permission Management
        1. Introduction
        2. Escalating privileges with sudo
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Enforcing password restrictions
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Setting default permissions for new files and directories
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Running binaries as a different user
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Working with SELinux for greater security
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      10. 4. Software Installation Management
        1. Introduction
        2. Registering the EPEL and Remi repositories
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Prioritizing repositories using the Priorities plugin
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Automating software updates with yum-cron
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Verifying installed RPM packages
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Compiling a program from source
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      11. 5. Managing Filesystems and Storage
        1. Introduction
        2. Viewing the size of files and available storage
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Setting storage limits for users and groups
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Creating a RAM disk
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Creating a RAID
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Replacing a device in a RAID
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Creating a new LVM volume
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Removing an existing LVM volume
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Adding storage and growing an LVM volume
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        10. Working with LVM snapshots
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      12. 6. Allowing Remote Access
        1. Introduction
        2. Running commands remotely through SSH
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Configuring a more secure SSH login
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Securely connecting to SSH without a password
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Restricting SSH access by user or group
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Protecting SSH with Fail2ban
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Confining sessions to a chroot jail
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Configuring TigerVNC
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Tunneling VNC connections through SSH
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      13. 7. Working with Databases
        1. Introduction
        2. Setting up a MySQL database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Backing up and restoring a MySQL database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Configuring MySQL replication
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Standing up a MySQL cluster
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Setting up a MongoDB database
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. See also
        7. Backing up and restoring a MongoDB database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Configuring a MongoDB replica set
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Setting up an OpenLDAP directory
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        10. Backing up and restoring an OpenLDAP database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      14. 8. Managing Domains and DNS
        1. Introduction
        2. Setting up BIND as a resolving DNS server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Configuring BIND as an authoritative DNS server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Writing a reverse lookup zone file
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Setting up a slave DNS server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Configuring rndc to control BIND
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      15. 9. Managing E-mails
        1. Introduction
        2. Configuring Postfix to provide SMTP services
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Adding SASL to Postfix with Dovecot
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Configuring Postfix to use TLS
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Configuring Dovecot for secure POP3 and IMAP access
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Targeting spam with SpamAssassin
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Routing messages with Procmail
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      16. 10. Managing Web Servers
        1. Introduction
        2. Installing Apache HTTP Server and PHP
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Configuring name-based virtual hosting
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Configuring Apache to serve pages over HTTPS
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Enabling overrides and performing URL rewriting
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Installing NGINX as a load balancer
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      17. 11. Safeguarding Against Threats
        1. Introduction
        2. Sending messages to Syslog
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Rotating log files with logrotate
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Using Tripwire to detect modified files
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Using ClamAV to fight viruses
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Checking for rootkits with chkrootkit
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Using Bacula for network backups
          1. Getting ready
          2. How to do it...
          3. How it works
          4. See also
      18. 12. Virtualization
        1. Introduction
        2. Creating a new virtual machine
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Cloning a virtual machine
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Adding storage to a virtual machine
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Connecting USB peripherals to a guest system
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Configuring a guest's network interface
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also