Linux: Powerful Server Administration

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

Linux: Powerful Server Administration

Uday R. Sawant et al.

5 customer reviews
Get hands-on recipes to make the most of Ubuntu Server, CentOS 7 Linux Server and RHEL 7 Server
Mapt Subscription
FREE
$29.99/m after trial
eBook
$56.00
RRP $79.99
Save 29%
Print + eBook
$99.99
RRP $99.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$56.00
$99.99
$29.99p/m after trial
RRP $79.99
RRP $99.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Code Files
Preview in Mapt

Book Details

ISBN 139781788293778
Paperback995 pages

Book Description

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

Table of Contents

Chapter 1: Managing Users and Groups
Introduction
Creating a user account
Creating user accounts in batch mode
Creating a group
Adding group members
Deleting a user account
Managing file permissions
Getting root privileges with sudo
Setting resource limits with limits.conf
Setting up public key authentication
Securing user accounts
Chapter 2: Networking
Introduction
Connecting to a network with a static IP
Installing the DHCP server
Installing the DNS server
Hiding behind the proxy with squid
Being on time with NTP
Discussing load balancing with HAProxy
Tuning the TCP stack
Troubleshooting network connectivity
Securing remote access with OpenVPN
Securing a network with uncomplicated firewall
Securing against brute force attacks
Discussing Ubuntu security best practices
Chapter 3: Working with Web Servers
Introduction
Installing and configuring the Apache web server
Serving dynamic contents with PHP
Hosting multiple websites with a virtual domain
Securing web traffic with HTTPS
Installing Nginx with PHP_FPM
Setting Nginx as a reverse proxy
Load balancing with Nginx
Setting HTTPs on Nginx
Benchmarking and performance tuning of Apache
Securing the web server
Troubleshooting the web server
Chapter 4: Working with Mail Servers
Introduction
Sending e-mails with Postfix
Enabling IMAP and POP3 with Dovecot
Adding e-mail accounts
Mail filtering with spam-assassin
Troubleshooting the mail server
Installing the Zimbra mail server
Chapter 5: Handling Databases
Introduction
Installing relational databases with MySQL
Storing and retrieving data with MySQL
Importing and exporting bulk data
Adding users and assigning access rights
Installing web access for MySQL
Setting backups
Optimizing MySQL performance – queries
Optimizing MySQL performance – configuration
Creating MySQL replicas for scaling and high availability
Troubleshooting MySQL
Installing MongoDB
Storing and retrieving data with MongoDB
Chapter 6: Network Storage
Introduction
Installing the Samba server
Adding users to the Samba server
Installing the secure FTP server
Synchronizing files with Rsync
Performance tuning the Samba server
Troubleshooting the Samba server
Installing the Network File System
Chapter 7: Cloud Computing
Introduction
Creating virtual machine with KVM
Managing virtual machines with virsh
Setting up your own cloud with OpenStack
Adding a cloud image to OpenStack
Launching a virtual instance with OpenStack
Installing Juju a service orchestration framework
Managing services with Juju
Chapter 8: Working with Containers
Introduction
Installing LXD, the Linux container daemon
Deploying your first container with LXD
Managing LXD containers
Managing LXD containers – advanced options
Setting resource limits on LXD containers
Networking with LXD
Installing Docker
Starting and managing Docker containers
Creating images with a Dockerfile
Understanding Docker volumes
Deploying WordPress using a Docker network
Monitoring Docker containers
Securing Docker containers
Chapter 9: Streaming with Ampache
Introduction
Installing the Ampache server
Uploading contents and creating catalogs
Setting on-the-fly transcoding
Enabling API access for remote streaming
Streaming music with Ampache
Chapter 10: Communication Server with XMPP
Introduction
Installing Ejabberd
Creating users and connecting with the XMPP client
Configuring the Ejabberd installation
Creating web client with Strophe.js
Enabling group chat
Chat server with Node.js
Chapter 11: Git Hosting
Introduction
Installing Git
Creating a local repository with Git CLI
Storing file revisions with Git commit
Synchronizing the repository with a remote server
Receiving updates with Git pull
Creating repository clones
Installing GitLab, your own Git hosting
Adding users to the GitLab server
Creating a repository with GitLab
Automating common tasks with Git hooks
Chapter 12: Collaboration Tools
Introduction
Installing the VNC server
Installing Hackpad, a collaborative document editor
Installing Mattermost – a self-hosted slack alternative
Installing OwnCloud, self-hosted cloud storage
Chapter 13: Performance Monitoring
Introduction
Monitoring the CPU
Monitoring memory and swap
Monitoring the network
Monitoring storage
Setting performance benchmarks
Chapter 14: Centralized Authentication Service
Introduction
Installing OpenLDAP
Installing phpLDAPadmin
Ubuntu server logins with LDAP
Authenticating Ejabberd users with LDAP
Chapter 15: Installing CentOS
Introduction
Downloading CentOS and confirming the checksum on Windows or OS X
Creating USB installation media on Windows or OS X
Performing an installation of CentOS using the graphical installer
Running a netinstall over HTTP
Installing CentOS 7 using a kickstart file
Getting started and customising the boot loader
Troubleshooting the system in rescue mode
Updating the installation and enhancing the minimal install with additional administration and development tools
Chapter 16: Configuring the System
Introduction
Navigating text files with less
Introduction to Vim
Speaking the right language
Synchronizing the system clock with NTP and the chrony suite
Setting your hostname and resolving the network
Building a static network connection
Becoming a superuser
Customizing your system banners and messages
Priming the kernel
Chapter 17: Managing the System
Introduction
Knowing and managing your background services
Troubleshooting background services
Tracking system resources with journald
Configuring journald to make it persistent
Managing users and their groups
Scheduling tasks with cron
Synchronizing files and doing more with rsync
Maintaining backups and taking snapshots
Monitoring important server infrastructure
Taking control with GIT and Subversion
Chapter 18: Managing Packages with YUM
Introduction
Using YUM to update the system
Using YUM to search for packages
Using YUM to install packages
Using YUM to remove packages
Keeping YUM clean and tidy
Knowing your priorities
Using a third-party repository
Creating a YUM repository
Working with the RPM package manager
Chapter 19: Administering the Filesystem
Introduction
Creating a virtual block device
Formatting and mounting a filesystem
Using disk quotas
Maintaining a filesystem
Extending the capacity of the filesystem
Chapter 20: Providing Security
Introduction
Locking down remote access and hardening SSH
Installing and configuring fail2ban
Working with a firewall
Forging the firewall rules by example
Generating self-signed certificates
Using secure alternatives to FTP
Chapter 21: Building a Network
Introduction
Printing with CUPS
Running a DHCP server
Using WebDAV for file sharing
Installing and configuring NFS
Working with NFS
Securely sharing resources with Samba
Chapter 22: Working with FTP
Introduction
Installing and configuring the FTP service
Working with virtual FTP users
Customizing the FTP service
Troubleshooting users and file transfers
Chapter 23: Working with Domains
Introduction
Installing and configuring a caching-only nameserver
Setting up an authoritative-only DNS server
Creating an integrated nameserver solution
Populating the domain
Building a secondary (slave) DNS server
Chapter 24: Working with Databases
Introduction
Installing a MariaDB database server
Managing a MariaDB database
Allowing remote access to a MariaDB server
Installing a PostgreSQL server and managing a database
Configuring remote access to PostgreSQL
Installing phpMyAdmin and phpPgAdmin
Chapter 25: Providing Mail Services
Introduction
Configuring a domain-wide mail service with Postfix
Working with Postfix
Delivering the mail with Dovecot
Using Fetchmail
Chapter 26: Providing Web Services
Introduction
Installing Apache and serving web pages
Enabling system users and building publishing directories
Implementing name-based hosting
Implementing CGI with Perl and Ruby
Installing, configuring, and testing PHP
Securing Apache
Setting up HTTPS with Secure Sockets Layer (SSL)
Chapter 27: Operating System-Level Virtualization
Introduction
Installing and configuring Docker
Downloading an image and running a container
Creating your own images from Dockerfiles and uploading to Docker Hub
Setting up and working with a private Docker registry
Chapter 28: Working with SELinux
Introduction
Installing and configuring important SELinux tools
Working with SELinux security contexts
Working with policies
Troubleshooting SELinux
Chapter 29: Monitoring IT Infrastructure
Introduction
Installing and configuring Nagios Core
Setting up NRPE on remote client hosts
Monitoring important remote system metrics
Chapter 30: Working with KVM Guests
Introduction
Installing and configuring a KVM
Configuring resources
Building guests
Adding CPUs on the fly
Adding RAM on the fly
Adding disks on the fly
Moving disks to another storage
Moving VMs
Backing up your VM metadata
Chapter 31: Deploying RHEL "En Masse"
Introduction
Creating a kickstart file
Publishing your kickstart file using httpd
Deploying a system using PXE
Deploying a system using a custom boot ISO file
Chapter 32: Configuring Your Network
Introduction
Creating a VLAN interface
Creating a teamed interface
Creating a bridge
Configuring IPv4 settings
Configuring your DNS resolvers
Configuring static network routes
Chapter 33: Configuring Your New System
Introduction
The systemd service and setting runlevels
Starting and stopping systemd services
Configuring the systemd journal for persistence
Monitoring services using journalctl
Configuring logrotate
Managing time
Configuring your boot environment
Configuring smtp
Chapter 34: Using SELinux
Introduction
Changing file contexts
Configuring SELinux booleans
Configuring SELinux port definitions
Troubleshooting SELinux
Creating SELinux policies
Applying SELinux policies
Chapter 35: Orchestrating with Ansible
Introduction
Install Ansible
Configuring the Ansible inventory
Creating a template for a kickstart file
Creating a playbook to deploy a new VM with kickstart
Creating a playbook to perform system configuration tasks
Troubleshooting Ansible
Chapter 36: Puppet Configuration Management
Introduction
Installing and configuring Puppet Master
Installing and configuring the Puppet agent
Defining a simple module to configure time
Defining nodes and node grouping
Deploying modules to single nodes and node groups
Chapter 37: Yum and Repositories
Introduction
Managing yum history
Creating a copy of an RHN repository
Configuring additional repositories
Setting up yum to automatically update
Configuring logrotate for yum
Recovering from a corrupted RPM database
Chapter 38: Securing RHEL 7
Introduction
Installing and configuring IPA
Securing the system login
Configuring privilege escalation with sudo
Secure the network with firewalld
Using kdump and SysRq
Using ABRT
Auditing the system
Chapter 39: Monitoring and Performance Tuning
Introduction
Tuning your system's performance
Setting up PCP – Performance Co-Pilot
Monitoring basic system performance
Monitoring CPU performance
Monitoring RAM performance
Monitoring storage performance
Monitoring network performance

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

Authors

Table of Contents

Chapter 1: Managing Users and Groups
Introduction
Creating a user account
Creating user accounts in batch mode
Creating a group
Adding group members
Deleting a user account
Managing file permissions
Getting root privileges with sudo
Setting resource limits with limits.conf
Setting up public key authentication
Securing user accounts
Chapter 2: Networking
Introduction
Connecting to a network with a static IP
Installing the DHCP server
Installing the DNS server
Hiding behind the proxy with squid
Being on time with NTP
Discussing load balancing with HAProxy
Tuning the TCP stack
Troubleshooting network connectivity
Securing remote access with OpenVPN
Securing a network with uncomplicated firewall
Securing against brute force attacks
Discussing Ubuntu security best practices
Chapter 3: Working with Web Servers
Introduction
Installing and configuring the Apache web server
Serving dynamic contents with PHP
Hosting multiple websites with a virtual domain
Securing web traffic with HTTPS
Installing Nginx with PHP_FPM
Setting Nginx as a reverse proxy
Load balancing with Nginx
Setting HTTPs on Nginx
Benchmarking and performance tuning of Apache
Securing the web server
Troubleshooting the web server
Chapter 4: Working with Mail Servers
Introduction
Sending e-mails with Postfix
Enabling IMAP and POP3 with Dovecot
Adding e-mail accounts
Mail filtering with spam-assassin
Troubleshooting the mail server
Installing the Zimbra mail server
Chapter 5: Handling Databases
Introduction
Installing relational databases with MySQL
Storing and retrieving data with MySQL
Importing and exporting bulk data
Adding users and assigning access rights
Installing web access for MySQL
Setting backups
Optimizing MySQL performance – queries
Optimizing MySQL performance – configuration
Creating MySQL replicas for scaling and high availability
Troubleshooting MySQL
Installing MongoDB
Storing and retrieving data with MongoDB
Chapter 6: Network Storage
Introduction
Installing the Samba server
Adding users to the Samba server
Installing the secure FTP server
Synchronizing files with Rsync
Performance tuning the Samba server
Troubleshooting the Samba server
Installing the Network File System
Chapter 7: Cloud Computing
Introduction
Creating virtual machine with KVM
Managing virtual machines with virsh
Setting up your own cloud with OpenStack
Adding a cloud image to OpenStack
Launching a virtual instance with OpenStack
Installing Juju a service orchestration framework
Managing services with Juju
Chapter 8: Working with Containers
Introduction
Installing LXD, the Linux container daemon
Deploying your first container with LXD
Managing LXD containers
Managing LXD containers – advanced options
Setting resource limits on LXD containers
Networking with LXD
Installing Docker
Starting and managing Docker containers
Creating images with a Dockerfile
Understanding Docker volumes
Deploying WordPress using a Docker network
Monitoring Docker containers
Securing Docker containers
Chapter 9: Streaming with Ampache
Introduction
Installing the Ampache server
Uploading contents and creating catalogs
Setting on-the-fly transcoding
Enabling API access for remote streaming
Streaming music with Ampache
Chapter 10: Communication Server with XMPP
Introduction
Installing Ejabberd
Creating users and connecting with the XMPP client
Configuring the Ejabberd installation
Creating web client with Strophe.js
Enabling group chat
Chat server with Node.js
Chapter 11: Git Hosting
Introduction
Installing Git
Creating a local repository with Git CLI
Storing file revisions with Git commit
Synchronizing the repository with a remote server
Receiving updates with Git pull
Creating repository clones
Installing GitLab, your own Git hosting
Adding users to the GitLab server
Creating a repository with GitLab
Automating common tasks with Git hooks
Chapter 12: Collaboration Tools
Introduction
Installing the VNC server
Installing Hackpad, a collaborative document editor
Installing Mattermost – a self-hosted slack alternative
Installing OwnCloud, self-hosted cloud storage
Chapter 13: Performance Monitoring
Introduction
Monitoring the CPU
Monitoring memory and swap
Monitoring the network
Monitoring storage
Setting performance benchmarks
Chapter 14: Centralized Authentication Service
Introduction
Installing OpenLDAP
Installing phpLDAPadmin
Ubuntu server logins with LDAP
Authenticating Ejabberd users with LDAP
Chapter 15: Installing CentOS
Introduction
Downloading CentOS and confirming the checksum on Windows or OS X
Creating USB installation media on Windows or OS X
Performing an installation of CentOS using the graphical installer
Running a netinstall over HTTP
Installing CentOS 7 using a kickstart file
Getting started and customising the boot loader
Troubleshooting the system in rescue mode
Updating the installation and enhancing the minimal install with additional administration and development tools
Chapter 16: Configuring the System
Introduction
Navigating text files with less
Introduction to Vim
Speaking the right language
Synchronizing the system clock with NTP and the chrony suite
Setting your hostname and resolving the network
Building a static network connection
Becoming a superuser
Customizing your system banners and messages
Priming the kernel
Chapter 17: Managing the System
Introduction
Knowing and managing your background services
Troubleshooting background services
Tracking system resources with journald
Configuring journald to make it persistent
Managing users and their groups
Scheduling tasks with cron
Synchronizing files and doing more with rsync
Maintaining backups and taking snapshots
Monitoring important server infrastructure
Taking control with GIT and Subversion
Chapter 18: Managing Packages with YUM
Introduction
Using YUM to update the system
Using YUM to search for packages
Using YUM to install packages
Using YUM to remove packages
Keeping YUM clean and tidy
Knowing your priorities
Using a third-party repository
Creating a YUM repository
Working with the RPM package manager
Chapter 19: Administering the Filesystem
Introduction
Creating a virtual block device
Formatting and mounting a filesystem
Using disk quotas
Maintaining a filesystem
Extending the capacity of the filesystem
Chapter 20: Providing Security
Introduction
Locking down remote access and hardening SSH
Installing and configuring fail2ban
Working with a firewall
Forging the firewall rules by example
Generating self-signed certificates
Using secure alternatives to FTP
Chapter 21: Building a Network
Introduction
Printing with CUPS
Running a DHCP server
Using WebDAV for file sharing
Installing and configuring NFS
Working with NFS
Securely sharing resources with Samba
Chapter 22: Working with FTP
Introduction
Installing and configuring the FTP service
Working with virtual FTP users
Customizing the FTP service
Troubleshooting users and file transfers
Chapter 23: Working with Domains
Introduction
Installing and configuring a caching-only nameserver
Setting up an authoritative-only DNS server
Creating an integrated nameserver solution
Populating the domain
Building a secondary (slave) DNS server
Chapter 24: Working with Databases
Introduction
Installing a MariaDB database server
Managing a MariaDB database
Allowing remote access to a MariaDB server
Installing a PostgreSQL server and managing a database
Configuring remote access to PostgreSQL
Installing phpMyAdmin and phpPgAdmin
Chapter 25: Providing Mail Services
Introduction
Configuring a domain-wide mail service with Postfix
Working with Postfix
Delivering the mail with Dovecot
Using Fetchmail
Chapter 26: Providing Web Services
Introduction
Installing Apache and serving web pages
Enabling system users and building publishing directories
Implementing name-based hosting
Implementing CGI with Perl and Ruby
Installing, configuring, and testing PHP
Securing Apache
Setting up HTTPS with Secure Sockets Layer (SSL)
Chapter 27: Operating System-Level Virtualization
Introduction
Installing and configuring Docker
Downloading an image and running a container
Creating your own images from Dockerfiles and uploading to Docker Hub
Setting up and working with a private Docker registry
Chapter 28: Working with SELinux
Introduction
Installing and configuring important SELinux tools
Working with SELinux security contexts
Working with policies
Troubleshooting SELinux
Chapter 29: Monitoring IT Infrastructure
Introduction
Installing and configuring Nagios Core
Setting up NRPE on remote client hosts
Monitoring important remote system metrics
Chapter 30: Working with KVM Guests
Introduction
Installing and configuring a KVM
Configuring resources
Building guests
Adding CPUs on the fly
Adding RAM on the fly
Adding disks on the fly
Moving disks to another storage
Moving VMs
Backing up your VM metadata
Chapter 31: Deploying RHEL "En Masse"
Introduction
Creating a kickstart file
Publishing your kickstart file using httpd
Deploying a system using PXE
Deploying a system using a custom boot ISO file
Chapter 32: Configuring Your Network
Introduction
Creating a VLAN interface
Creating a teamed interface
Creating a bridge
Configuring IPv4 settings
Configuring your DNS resolvers
Configuring static network routes
Chapter 33: Configuring Your New System
Introduction
The systemd service and setting runlevels
Starting and stopping systemd services
Configuring the systemd journal for persistence
Monitoring services using journalctl
Configuring logrotate
Managing time
Configuring your boot environment
Configuring smtp
Chapter 34: Using SELinux
Introduction
Changing file contexts
Configuring SELinux booleans
Configuring SELinux port definitions
Troubleshooting SELinux
Creating SELinux policies
Applying SELinux policies
Chapter 35: Orchestrating with Ansible
Introduction
Install Ansible
Configuring the Ansible inventory
Creating a template for a kickstart file
Creating a playbook to deploy a new VM with kickstart
Creating a playbook to perform system configuration tasks
Troubleshooting Ansible
Chapter 36: Puppet Configuration Management
Introduction
Installing and configuring Puppet Master
Installing and configuring the Puppet agent
Defining a simple module to configure time
Defining nodes and node grouping
Deploying modules to single nodes and node groups
Chapter 37: Yum and Repositories
Introduction
Managing yum history
Creating a copy of an RHN repository
Configuring additional repositories
Setting up yum to automatically update
Configuring logrotate for yum
Recovering from a corrupted RPM database
Chapter 38: Securing RHEL 7
Introduction
Installing and configuring IPA
Securing the system login
Configuring privilege escalation with sudo
Secure the network with firewalld
Using kdump and SysRq
Using ABRT
Auditing the system
Chapter 39: Monitoring and Performance Tuning
Introduction
Tuning your system's performance
Setting up PCP – Performance Co-Pilot
Monitoring basic system performance
Monitoring CPU performance
Monitoring RAM performance
Monitoring storage performance
Monitoring network performance

Book Details

ISBN 139781788293778
Paperback995 pages
Read More
From 5 reviews

Read More Reviews

Recommended for You

SQL Server on Linux Book Cover
SQL Server on Linux
$ 31.99
$ 22.40
CentOS 7 Linux Server Cookbook - Second Edition Book Cover
CentOS 7 Linux Server Cookbook - Second Edition
$ 39.99
$ 28.00
Mastering CentOS 7 Linux Server Book Cover
Mastering CentOS 7 Linux Server
$ 39.99
$ 28.00
Red Hat Enterprise Linux Server Cookbook Book Cover
Red Hat Enterprise Linux Server Cookbook
$ 39.99
$ 28.00
CentOS 6 Linux Server Cookbook Book Cover
CentOS 6 Linux Server Cookbook
$ 29.99
$ 21.00
Linux Email: Set up and Run a Small Office Email Server Book Cover
Linux Email: Set up and Run a Small Office Email Server
$ 23.99
$ 16.80