Table of Contents Debian 7: System Administration Best Practices Credits About the Author About the Reviewers www.PacktPub.com Support files, eBooks, discount offers and more Why Subscribe? Free Access for Packt account holders Preface What this book covers What you need for this book Who this book is for Conventions Reader feedback Customer support Errata Piracy Questions 1. Debian Basics for Administrators Linux distributions The three branches SLS RPM DPKG or DEB Other differences The Debian Project The social contract Constitution Policies Licensing What happened to Firefox? Repositories Debian environments Impact on administration Debian support Proprietary features Where to find installation help and information Summary 2. Filesystem Layout Partition tables Single or multiboot BIOS versus UEFI Boot code under BIOS Boot code under UEFI Filesystem types ext2, ext3, and ext4 Journaled File System SGI's XFS File System Reiser File System B-Tree File System Clustered formats Non-Linux formats Other Unix formats Choosing a format Partitioning Partitioning for backup and recovery Space-limiting partitions Disk management Logical Volume Management The swap partition Selecting a partitioning scheme Encryption Why encrypt? Disk encryption Directory encryption Choosing encryption Installing Debian Summary 3. Package Management Package managers dpkg and dselect Advanced Package Tool aptitude Synaptic Package selection and maintenance Configuring media or repositories The significance of the release name Selecting packages Updating your package cache Command-line selection Selection lists Meta packages A word about dependency resolution Removing packages Keeping current Automatic updates Foreign packages Alien Manual builds Upgrading your system Prior to the upgrade During the upgrade After the upgrade Summary 4. Basic Package Configuration Configuration files /etc/default /etc/<package name> Initial configuration Configuration utilities dpkg-reconfigure gadmin Desktop configuration Other utilities Local configuration trends Local configuration files Configuration subdirectories Configuration advice Apache configuration Configuration files Enabling sites and modules Testing and activating the configuration Other examples Summary 5. System Management Startup and shutdown Debian run levels Dependency-based boot sequence Managing SysV scripts Third-party and local scripts Network administration The interfaces file Network Manager Combining methods Which method? Filesystem maintenance Partition maintenance Filesystem Check (FSCK) Partition resizing Backups Low-level backups File-level backups Backup utilities Choosing your solution System logging The logging facility Controlling the logs Monitoring the logs Display managers Where did my desktop go? GNOME KDE Other desktops Showing your best face Summary 6. Basic System Security User administration Default user group ACLs The root account Debian hardening packages Firewall tools IPTABLES Basic firewall design Inbound opens Outbound traffic Local loopback traffic The perimeter network Intrusion detection NIDS File Monitors System scanners A final word on remote logging Summary 7. Advanced System Management Remote backups Amanda Bacula Other backup systems Beyond backups Configuration management Fully Automated Installation Puppet Other packages Clusters High Availability clusters Beowulf clusters Common tools Webmin Installing Webmin Using Webmin Webmin and Debian Webmin security Usermin Summary Index Debian 7: System Administration Best Practices Debian 7: System Administration Best Practices Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: October 2013 Production Reference: 1181013 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK ISBN 978-1-78328-311-8 www.packtpub.com Cover Image by Vivek Sinha (<[email protected]>) Credits Author Rich Pinkall Pollei Reviewers Arturo Borrero González Daniele Raffo Ron Savage Acquisition Editor Rubal Kaur Commissioning Editor Govindan K Technical Editors Rohit Kumar Singh Harshad Vairat Project Coordinator Romal Karani Proofreader Kevin McGowan Indexer Rekha Nair Graphics Sheetal Aute Production Coordinator Aditi Gajjar Cover Work Aditi Gajjar