O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Linux: Powerful Server Administration

Book Description

Get hands-on recipes to make the most of Ubuntu Server, CentOS 7 Linux Server and RHEL 7 Server

About This Book

  • Get Linux servers up and running in seconds,
  • In-depth guide to explore new features and solutions in server administration
  • Maintain performance and security of your server solution by deploying expert configuration advice

Who This Book Is For

This Learning Path is intended for system administrators with a basic understanding of Linux operating systems and written with the novice-to-intermediate Linux user in mind. To get the most of this Learning Path, you should have a working knowledge of basic system administration and management tools.

What You Will Learn

  • Set up high performance, scalable, and fault-tolerant back ends with web and database servers
  • Facilitate team communication with a real-time chat service and collaboration tools
  • Monitor, manage and develop your server's file system to maintain a stable performance
  • Gain best practice methods on sharing files and resources through a network
  • Install and configure common standard services such as web, mail, FTP, database and domain name server technologies
  • Create kickstart scripts to automatically deploy RHEL 7 systems
  • Use Orchestration and configuration management tools to manage your environment

In Detail

Linux servers are frequently selected over other server operating systems for their stability, security and flexibility advantages.This Learning Path will teach you how to get up and running with three of the most popular Linux server distros: Ubuntu Server, CentOS 7 Server, and RHEL 7 Server. We will begin with the Ubuntu Server and show you how to make the most of Ubuntu’s advanced functionalities. Moving on, we will provide you with all the knowledge that will give you access to the inner workings of the latest CentOS version 7. Finally, touching RHEL 7, we will provide you with solutions to common RHEL 7 Server challenges.This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

1) Ubuntu Server Cookbook

2) CentOS 7 Linux Server Cookbook, Second Edition

3) Red Hat Enterprise Linux Server Cookbook

Style and approach

This easy-to-follow practical guide contains hands on examples and solutions to real word administration problems and problems faced when building your RHEL 7 system from scratch using orchestration tools.

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. Linux: Powerful Server Administration
    1. Table of Contents
    2. Linux: Powerful Server Administration
    3. Linux: Powerful Server Administration
    4. Credits
    5. Preface
      1. What this learning path covers
      2. What you need for this learning path
      3. Who this learning path is for
        1. Reader feedback
      4. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    6. 1. Module 1
      1. 1. Managing Users and Groups
        1. Introduction
        2. Creating a user account
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Creating user accounts in batch mode
          1. Getting ready
          2. How to do it...
          3. How it works…
        4. Creating a group
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
        5. Adding group members
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        6. Deleting a user account
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
        7. Managing file permissions
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        8. Getting root privileges with sudo
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
            1. Setting password less sudo
            2. Other uses of sudo
          5. See also
        9. Setting resource limits with limits.conf
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
        10. Setting up public key authentication
          1. Getting ready
          2. How to do it...
          3. How it works…
            1. Working of SSH authentication
          4. There's more…
                1. Troubleshooting SSH connections
                2. SSH tools for the Windows platform
          5. See also
        11. Securing user accounts
          1. How to do it...
          2. How it works…
      2. 2. Networking
        1. Introduction
        2. Connecting to a network with a static IP
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. IPv6 configuration
          5. See also
        3. Installing the DHCP server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Installing the DNS server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Hiding behind the proxy with squid
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. Access control list
            2. Set cache refresh rules
            3. Sarg – tool to analyze squid logs
            4. Squid guard
          5. See also
        6. Being on time with NTP
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        7. Discussing load balancing with HAProxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more …
          5. See also
        8. Tuning the TCP stack
          1. Getting ready…
          2. How to do it…
          3. How it works…
          4. See also
        9. Troubleshooting network connectivity
          1. Getting ready
          2. How to do it…
          3. There's more…
        10. Securing remote access with OpenVPN
          1. Getting ready…
          2. How to do it…
          3. How it works…
          4. There's more…
        11. Securing a network with uncomplicated firewall
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        12. Securing against brute force attacks
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        13. Discussing Ubuntu security best practices
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      3. 3. Working with Web Servers
        1. Introduction
        2. Installing and configuring the Apache web server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. HTTP version 2 support
          5. See also
        3. Serving dynamic contents with PHP
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. PHP settings
          4. There's more…
            1. Installing the LAMP stack
            2. Upgrading PHP under Ubuntu 14
        4. Hosting multiple websites with a virtual domain
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Securing web traffic with HTTPS
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Installing Nginx with PHP_FPM
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Setting Nginx as a reverse proxy
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. HAProxy and Varnish
          5. See also
        8. Load balancing with Nginx
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Setting HTTPs on Nginx
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        10. Benchmarking and performance tuning of Apache
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        11. Securing the web server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        12. Troubleshooting the web server
          1. Getting ready
          2. How to do it…
            1. Web server not accessible
            2. Virtual host not accessible
            3. Access denied or forbidden errors
            4. Apache downloads .php files
      4. 4. Working with Mail Servers
        1. Introduction
        2. Sending e-mails with Postfix
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Enabling IMAP and POP3 with Dovecot
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        4. Adding e-mail accounts
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. Web console for virtual mailbox administration
          5. See also
        5. Mail filtering with spam-assassin
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Troubleshooting the mail server
          1. Getting ready
          2. How to do it…
          3. See also
        7. Installing the Zimbra mail server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      5. 5. Handling Databases
        1. Introduction
        2. Installing relational databases with MySQL
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
            1. Securing MySQL installation
          5. See also
        3. Storing and retrieving data with MySQL
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Importing and exporting bulk data
          1. How to do it…
          2. See also
        5. Adding users and assigning access rights
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
            1. Removing user accounts
            2. Setting resource limits
          5. See also
        6. Installing web access for MySQL
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
          5. See also
        7. Setting backups
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Optimizing MySQL performance – queries
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
            1. Sharding MySQL
          5. See also
        9. Optimizing MySQL performance – configuration
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
            1. Percona configuration wizard
            2. MySQL table compression
          5. See also
        10. Creating MySQL replicas for scaling and high availability
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
          5. See also
        11. Troubleshooting MySQL
          1. Getting ready
          2. How to do it…
          3. See also
        12. Installing MongoDB
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        13. Storing and retrieving data with MongoDB
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There’s more…
          5. See also
      6. 6. Network Storage
        1. Introduction
        2. Installing the Samba server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. Tools for personal file sharing
          5. See also
        3. Adding users to the Samba server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Installing the secure FTP server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Synchronizing files with Rsync
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        6. Performance tuning the Samba server
          1. Getting ready
          2. How to do it…
          3. How it works…
        7. Troubleshooting the Samba server
          1. How to do it…
            1. Checking network connectivity
            2. Checking the Samba service
            3. Checking Samba logs
            4. Checking Samba configuration
          2. See also
        8. Installing the Network File System
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      7. 7. Cloud Computing
        1. Introduction
        2. Creating virtual machine with KVM
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Managing virtual machines with virsh
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. Easy cloud images with uvtool
          5. See also
        4. Setting up your own cloud with OpenStack
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Adding a cloud image to OpenStack
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Launching a virtual instance with OpenStack
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Installing Juju a service orchestration framework
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        8. Managing services with Juju
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      8. 8. Working with Containers
        1. Introduction
        2. Installing LXD, the Linux container daemon
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Deploying your first container with LXD
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Managing LXD containers
          1. Getting ready…
          2. How to do it…
          3. There's more…
          4. See also
        5. Managing LXD containers – advanced options
          1. How to do it…
          2. How it works…
        6. Setting resource limits on LXD containers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        7. Networking with LXD
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        8. Installing Docker
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Starting and managing Docker containers
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        10. Creating images with a Dockerfile
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        11. Understanding Docker volumes
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        12. Deploying WordPress using a Docker network
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        13. Monitoring Docker containers
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        14. Securing Docker containers
          1. How to do it…
          2. See also
      9. 9. Streaming with Ampache
        1. Introduction
        2. Installing the Ampache server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Uploading contents and creating catalogs
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Setting on-the-fly transcoding
          1. Getting ready
          2. How to do it…
        5. Enabling API access for remote streaming
          1. Getting ready
          2. How to do it…
          3. How it works…
        6. Streaming music with Ampache
          1. Getting ready
          2. How to do it…
      10. 10. Communication Server with XMPP
        1. Introduction
        2. Installing Ejabberd
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Creating users and connecting with the XMPP client
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Configuring the Ejabberd installation
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Creating web client with Strophe.js
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Enabling group chat
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Chat server with Node.js
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
      11. 11. Git Hosting
        1. Introduction
        2. Installing Git
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Creating a local repository with Git CLI
          1. Getting ready

          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Storing file revisions with Git commit
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        5. Synchronizing the repository with a remote server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
            1. GitHub pages
          5. See also
        6. Receiving updates with Git pull
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        7. Creating repository clones
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        8. Installing GitLab, your own Git hosting
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        9. Adding users to the GitLab server
          1. Getting ready
          2. How to do it…
        10. Creating a repository with GitLab
          1. Getting ready
          2. How to do it…
        11. Automating common tasks with Git hooks
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      12. 12. Collaboration Tools
        1. Introduction
        2. Installing the VNC server
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Installing Hackpad, a collaborative document editor
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more
            1. Using Hackpad with Docker
          5. See also
        4. Installing Mattermost – a self-hosted slack alternative
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more …
          5. See also
        5. Installing OwnCloud, self-hosted cloud storage
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      13. 13. Performance Monitoring
        1. Introduction
        2. Monitoring the CPU
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Monitoring memory and swap
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Monitoring the network
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        5. Monitoring storage
          1. Getting ready
          2. How to do it…
        6. Setting performance benchmarks
          1. Getting ready
          2. How to do it…
          3. There's more…
            1. Graphing tools
            2. More options
          4. See also
      14. 14. Centralized Authentication Service
        1. Introduction
        2. Installing OpenLDAP
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        3. Installing phpLDAPadmin
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        4. Ubuntu server logins with LDAP
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
        5. Authenticating Ejabberd users with LDAP
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
    7. 2. Module 2
      1. 1. Installing CentOS
        1. Introduction
        2. Downloading CentOS and confirming the checksum on Windows or OS X
          1. Getting ready
          2. How to do it...
          3. How it works…
        3. Creating USB installation media on Windows or OS X
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Performing an installation of CentOS using the graphical installer
          1. Getting ready
          2. How to do it...
          3. How it works…
        5. Running a netinstall over HTTP
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Installing CentOS 7 using a kickstart file
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Getting started and customising the boot loader
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Troubleshooting the system in rescue mode
          1. Getting ready
          2. How to do it...
            1. Reaching rescue mode
            2. Accessing the filesystem
            3. Accessing the filesystem
            4. Re-install the CentOS boot loader
          3. How it works...
        9. Updating the installation and enhancing the minimal install with additional administration and development tools
          1. Getting ready
          2. How to do it...
          3. How it works...
      2. 2. Configuring the System
        1. Introduction
        2. Navigating text files with less
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Introduction to Vim
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Speaking the right language
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        5. Synchronizing the system clock with NTP and the chrony suite
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Setting your hostname and resolving the network
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Building a static network connection
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Becoming a superuser
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Customizing your system banners and messages
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        10. Priming the kernel
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      3. 3. Managing the System
        1. Introduction
        2. Knowing and managing your background services
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Troubleshooting background services
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Tracking system resources with journald
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Configuring journald to make it persistent
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Managing users and their groups
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Scheduling tasks with cron
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        8. Synchronizing files and doing more with rsync
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Maintaining backups and taking snapshots
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Monitoring important server infrastructure
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Taking control with GIT and Subversion
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
      4. 4. Managing Packages with YUM
        1. Introduction
        2. Using YUM to update the system
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Using YUM to search for packages
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Using YUM to install packages
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Using YUM to remove packages
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Keeping YUM clean and tidy
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Knowing your priorities
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Using a third-party repository
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        9. Creating a YUM repository
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        10. Working with the RPM package manager
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      5. 5. Administering the Filesystem
        1. Introduction
        2. Creating a virtual block device
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Formatting and mounting a filesystem
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more...
        4. Using disk quotas
          1. Getting ready
          2. How to do it...
            1. Enabling user and group quotas
            2. Enabling project (directory) quotas
          3. How it works...
          4. There's more...
        5. Maintaining a filesystem
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Extending the capacity of the filesystem
          1. Getting ready
          2. How to do it...
          3. How it works...
      6. 6. Providing Security
        1. Introduction
        2. Locking down remote access and hardening SSH
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Changing the SSH port number of your server
            2. Limiting SSH access by user or group
        3. Installing and configuring fail2ban
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Working with a firewall
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Forging the firewall rules by example
          1. Getting ready
          2. How to do it...
            1. To change an existing firewalld service (ssh)
            2. To create your own new service
          3. How it works...
          4. There's more...
        6. Generating self-signed certificates
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Using secure alternatives to FTP
          1. Getting ready
          2. How to do it...
            1. Securing your vsftpd server with SSL–FTPS
            2. Securing your vsftpd server using SSH – SFTP
          3. How it works...
          4. There's more...
      7. 7. Building a Network
        1. Introduction
        2. Printing with CUPS
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. How to add a network printer to the CUPS server
            2. How to share a local printer to the CUPS server
        3. Running a DHCP server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Using WebDAV for file sharing
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. Installing and configuring NFS
          1. Getting ready
          2. How to do it...
            1. Installing and configuring the NFS server
            2. Creating an export share
          3. How it works...
        6. Working with NFS
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Securely sharing resources with Samba
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      8. 8. Working with FTP
        1. Introduction
        2. Installing and configuring the FTP service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Working with virtual FTP users
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Customizing the FTP service
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Troubleshooting users and file transfers
          1. Getting ready
          2. How to do it...
          3. How it works...
      9. 9. Working with Domains
        1. Introduction
        2. Installing and configuring a caching-only nameserver
          1. Getting ready
          2. How to do it...
            1. Configuring a caching-only Unbound DNS server
            2. Configuring a forwarding only DNS server
          3. How it works...
          4. There's more...
        3. Setting up an authoritative-only DNS server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Creating an integrated nameserver solution
          1. Getting ready
          2. How to do it...
          3. How it works
          4. There's more...
        5. Populating the domain
          1. Getting ready
          2. How to do it...
          3. How it works…
        6. Building a secondary (slave) DNS server
          1. Getting ready
          2. How to do it...
            1. Changes to the primary DNS server
            2. Changes to the secondary DNS server(s)
          3. How it works...
      10. 10. Working with Databases
        1. Introduction
        2. Installing a MariaDB database server
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Managing a MariaDB database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Reviewing and revoking permissions or dropping a user
        4. Allowing remote access to a MariaDB server
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Installing a PostgreSQL server and managing a database
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Configuring remote access to PostgreSQL
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Installing phpMyAdmin and phpPgAdmin
          1. Getting ready
          2. How to do it...
            1. Installing and configuring phpMyAdmin
            2. Installing and configuring phpPgAdmin
          3. How it works...
      11. 11. Providing Mail Services
        1. Introduction
        2. Configuring a domain-wide mail service with Postfix
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Changing an e-mail's appearing domain name
            2. Using TLS- (SSL) encryption for SMTP communication
            3. Configure BIND to use your new mailserver
        3. Working with Postfix
          1. How to do it...
            1. Connecting mailx to a remote MTA
            2. Reading your local mails from the mailbox
          2. How it works...
        4. Delivering the mail with Dovecot
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Setting up e-mail software
        5. Using Fetchmail
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Configuring Fetchmail with gmail.com and outlook.com e-mail accounts
            2. Automating Fetchmail
      12. 12. Providing Web Services
        1. Introduction
        2. Installing Apache and serving web pages
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Enabling system users and building publishing directories
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Implementing name-based hosting
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Implementing CGI with Perl and Ruby
          1. Getting ready
          2. How to do it...
            1. Creating your first Perl CGI script
            2. Creating your first Ruby CGI script
          3. How it works...
          4. There's more...
        6. Installing, configuring, and testing PHP
          1. Getting ready
          2. How to do it...
          3. How to do it...
        7. Securing Apache
          1. Getting ready
          2. How to do it...
            1. Configuring httpd.conf to provide better security
            2. Removing unneeded httpd modules
            3. Protecting your Apache files
          3. How it works...
        8. Setting up HTTPS with Secure Sockets Layer (SSL)
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      13. 13. Operating System-Level Virtualization
        1. Introduction
        2. Installing and configuring Docker
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Downloading an image and running a container
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Stopping and starting a container
            2. Attaching and interacting with your container
        4. Creating your own images from Dockerfiles and uploading to Docker Hub
          1. Getting ready
          2. How to do it...
            1. Uploading your image to the Docker Hub
          3. How it works...
        5. Setting up and working with a private Docker registry
          1. Getting ready
          2. How to do it...
            1. Steps to be done on our Docker registry server (192.168.1.100)
            2. Steps to be done on every client needing access to our registry
          3. How it works...
      14. 14. Working with SELinux
        1. Introduction
        2. Installing and configuring important SELinux tools
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Working with SELinux security contexts
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Working with policies
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Troubleshooting SELinux
          1. Getting ready
          2. How to do it...
          3. How it works...
      15. 15. Monitoring IT Infrastructure
        1. Introduction
        2. Installing and configuring Nagios Core
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Setting up NRPE on remote client hosts
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Monitoring important remote system metrics
          1. Getting ready
          2. How to do it...
          3. How it works...
    8. 3. Module 3
      1. 1. Working with KVM Guests
        1. Introduction
        2. Installing and configuring a KVM
          1. Getting ready
          2. How to do it…
            1. Manual installation
            2. Kickstart installation
            3. Graphical setup during the system's setup
          3. See also
        3. Configuring resources
          1. Getting ready
          2. How to do it…
            1. Creating storage pools
            2. Querying storage pools
            3. Removing storage pools
            4. Creating a virtual network
            5. Removing networks
          3. How it works…
          4. There's more…
            1. Local storage pools
            2. Networked or shared storage pools
          5. See also
        4. Building guests
          1. Getting ready
          2. How to do it…
            1. Create a guest
            2. Deleting a guest
          3. How it works…
          4. There's more…
          5. See also
        5. Adding CPUs on the fly
          1. Getting ready
          2. How to do it…
            1. On the KVM host, perform the following steps:
            2. On the KVM guest, perform the following:
        6. Adding RAM on the fly
          1. Getting ready
          2. How to do it…
        7. Adding disks on the fly
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        8. Moving disks to another storage
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        9. Moving VMs
          1. Getting ready
          2. How to do it…
            1. Live native migration over the default network
            2. Live native migration over a dedicated network
          3. How it works…
          4. There's more…
          5. See also
        10. Backing up your VM metadata
          1. How to do it…
          2. How it works…
          3. See also
      2. 2. Deploying RHEL "En Masse"
        1. Introduction
        2. Creating a kickstart file
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Publishing your kickstart file using httpd
          1. How to do it…
          2. There's more…
          3. See also
        4. Deploying a system using PXE
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Deploying a system using a custom boot ISO file
          1. How to do it…
          2. How it works…
      3. 3. Configuring Your Network
        1. Introduction
        2. Creating a VLAN interface
          1. Getting ready
          2. How to do it…
            1. Creating the VLAN connection with nmcli
            2. Creating the VLAN connection with nmtui
            3. Creating the VLAN connection with kickstart
          3. There's more…
          4. See also
        3. Creating a teamed interface
          1. Getting ready
          2. How to do it…
            1. Creating the teamed interface using nmcli
            2. Creating the teamed interface using nmtui
            3. Creating the teamed interface with kickstart
          3. There's more…
            1. nmcli
            2. nmtui
            3. kickstart
          4. See also
        4. Creating a bridge
          1. Getting ready
          2. How to do it…
            1. Creating a bridge using nmcli
            2. Creating a bridge using nmtui
            3. Creating a bridge with kickstart
          3. There's more…
          4. See also
        5. Configuring IPv4 settings
          1. How to do it…
            1. Setting your IPv4 configuration using nmcli
            2. Setting your IPv4 configuration using nmtui
          2. There's more…
        6. Configuring your DNS resolvers
          1. How to do it…
            1. Setting your DNS resolvers using nmcli
            2. Setting your DNS resolvers using nmtui
          2. There's more…
        7. Configuring static network routes
          1. How to do it…
            1. Configuring static network routes using nmcli
            2. Configuring network routes using nmtui
      4. 4. Configuring Your New System
        1. Introduction
        2. The systemd service and setting runlevels
          1. How to do it…
          2. There's more…
          3. See also
        3. Starting and stopping systemd services
          1. How to do it…
          2. There's more…
          3. See also
        4. Configuring the systemd journal for persistence
          1. How to do it…
          2. There's more…
          3. See also
        5. Monitoring services using journalctl
          1. How to do it…
          2. There's more…
          3. See also
        6. Configuring logrotate
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        7. Managing time
          1. How to do it…
            1. Managing time through chrony
            2. Managing time through ntpd
          2. There's more…
          3. See also
        8. Configuring your boot environment
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        9. Configuring smtp
          1. How to do it…
          2. There's more…
          3. See also
      5. 5. Using SELinux
        1. Introduction
        2. Changing file contexts
          1. Getting ready
          2. How to do it…
            1. Temporary context changes
            2. Persistent file context changes
          3. There's more…
          4. See also
        3. Configuring SELinux booleans
          1. How to do it…
            1. Listing SELinux booleans
            2. Changing SELinux booleans
          2. There's more…
        4. Configuring SELinux port definitions
          1. How to do it…
          2. There's more…
        5. Troubleshooting SELinux
          1. Getting ready
          2. How to do it…
            1. audit.log
            2. syslog
            3. ausearch
          3. There's more…
          4. See also
        6. Creating SELinux policies
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        7. Applying SELinux policies
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more…
          5. See also
      6. 6. Orchestrating with Ansible
        1. Introduction
        2. Install Ansible
          1. Getting ready
          2. How to do it…
            1. Installing the latest tarball
            2. Installing cutting edge from Git
            3. Installing Ansible from the EPEL repository
          3. There's more…
        3. Configuring the Ansible inventory
          1. How to do it…
            1. The static inventory file
            2. The dynamic inventory file
            3. host_vars files
            4. group_vars files
          2. How it works…
          3. There's more…
          4. See also
        4. Creating a template for a kickstart file
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Creating a playbook to deploy a new VM with kickstart
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Creating a playbook to perform system configuration tasks
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        7. Troubleshooting Ansible
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
      7. 7. Puppet Configuration Management
        1. Introduction
        2. Installing and configuring Puppet Master
          1. How to do it…
          2. There's more…
          3. See also
        3. Installing and configuring the Puppet agent
          1. How to do it…
          2. There's more…
        4. Defining a simple module to configure time
          1. Getting ready
          2. How to do it…
          3. How it works...
          4. There's more...
          5. See also
        5. Defining nodes and node grouping
          1. How to do it…
            1. Create the configuration node
            2. Create a node group
          2. There's more…
        6. Deploying modules to single nodes and node groups
          1. How to do it…
            1. Configure to deploy a module or manifest to a single client
            2. Configure to deploy a module or manifest to a node group
            3. Configure to deploy to all registered systems
            4. Deploy to a system
          2. There's more…
      8. 8. Yum and Repositories
        1. Introduction
        2. Managing yum history
          1. How to do it…
            1. Your yum history
            2. Information about a yum transaction or package
            3. Undoing/redoing certain yum transactions
            4. Roll back to a certain point in your transaction history
          2. There's more…
          3. See also
        3. Creating a copy of an RHN repository
          1. Getting ready
          2. How to do it…
            1. Syncing RHN repositories
          3. There's more…
          4. See also
        4. Configuring additional repositories
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        5. Setting up yum to automatically update
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        6. Configuring logrotate for yum
          1. How to do it…
          2. How it works…
          3. See also
        7. Recovering from a corrupted RPM database
          1. Getting ready
          2. How to do it…
          3. There's more…
      9. 9. Securing RHEL 7
        1. Introduction
        2. Installing and configuring IPA
          1. Getting ready
          2. How to do it…
            1. Installing the IPA server
            2. Installing the IPA client
          3. There's more…
          4. See also
        3. Securing the system login
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        4. Configuring privilege escalation with sudo
          1. Getting ready
          2. How to do it…
          3. There's more…
          4. See also
        5. Secure the network with firewalld
          1. How to do it…
            1. Showing the currently allowed services and ports on your system
            2. Allowing incoming requests for NFS (v4)
            3. Allowing incoming requests on an arbitrary port
          2. There's more…
          3. See also
        6. Using kdump and SysRq
          1. How to do it…
            1. Installing and configuring kdump and SysRq
            2. Using kdump tools to analyze the dump
          2. There's more…
          3. See also…
        7. Using ABRT
          1. How to do it…
            1. Installing and configuring abrtd
            2. Using abrt-cli
          2. There's more…
          3. See also
        8. Auditing the system
          1. How to do it…
            1. Configuring a centralized syslog server to accept audit logs
            2. Some audit rules
            3. Showing audit logs for the preceding rules
          2. See also
      10. 10. Monitoring and Performance Tuning
        1. Introduction
        2. Tuning your system's performance
          1. How to do it…
          2. There's more…
          3. See also
        3. Setting up PCP – Performance Co-Pilot
          1. How to do it…
            1. The default installation
            2. The central collector
          2. There's more…
          3. See also
        4. Monitoring basic system performance
          1. How to do it…
          2. There's more…
        5. Monitoring CPU performance
          1. How to do it…
        6. Monitoring RAM performance
          1. How to do it…
        7. Monitoring storage performance
          1. How to do it…
        8. Monitoring network performance
          1. How to do it…
    9. Bibliography
    10. Index